Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Plasma
KWin
Commits
3d556bba
Commit
3d556bba
authored
Apr 13, 2022
by
Xaver Hugl
Browse files
backends/drm: drop DrmGpu test mode
It's unused
parent
8cb8d2f6
Pipeline
#164786
passed with stage
in 15 minutes and 23 seconds
Changes
3
Pipelines
2
Hide whitespace changes
Inline
Side-by-side
src/backends/drm/drm_gpu.cpp
View file @
3d556bba
...
...
@@ -395,7 +395,7 @@ bool DrmGpu::checkCrtcAssignment(QVector<DrmConnector *> connectors, const QVect
return
false
;
}
bool
DrmGpu
::
testPendingConfiguration
(
TestMode
mode
)
bool
DrmGpu
::
testPendingConfiguration
()
{
QVector
<
DrmConnector
*>
connectors
;
for
(
const
auto
&
conn
:
qAsConst
(
m_connectors
))
{
...
...
@@ -417,14 +417,7 @@ bool DrmGpu::testPendingConfiguration(TestMode mode)
return
c1
->
getProp
(
DrmConnector
::
PropertyIndex
::
CrtcId
)
->
current
()
>
c2
->
getProp
(
DrmConnector
::
PropertyIndex
::
CrtcId
)
->
current
();
});
}
const
auto
&
test
=
[
&
connectors
,
&
crtcs
,
this
,
mode
]()
{
if
(
mode
==
TestMode
::
TestWithCrtcReallocation
)
{
return
checkCrtcAssignment
(
connectors
,
crtcs
);
}
else
{
return
testPipelines
();
}
};
if
(
test
())
{
if
(
checkCrtcAssignment
(
connectors
,
crtcs
))
{
return
true
;
}
else
{
// try again without hw rotation
...
...
@@ -433,7 +426,7 @@ bool DrmGpu::testPendingConfiguration(TestMode mode)
hwRotationUsed
|=
(
pipeline
->
pending
.
bufferTransformation
!=
DrmPlane
::
Transformations
(
DrmPlane
::
Transformation
::
Rotate0
));
pipeline
->
pending
.
bufferTransformation
=
DrmPlane
::
Transformation
::
Rotate0
;
}
return
hwRotationUsed
?
test
(
)
:
false
;
return
hwRotationUsed
?
checkCrtcAssignment
(
connectors
,
crtcs
)
:
false
;
}
}
...
...
src/backends/drm/drm_gpu.h
View file @
3d556bba
...
...
@@ -81,11 +81,7 @@ public:
DrmVirtualOutput
*
createVirtualOutput
(
const
QString
&
name
,
const
QSize
&
size
,
double
scale
,
VirtualOutputMode
mode
);
void
removeVirtualOutput
(
DrmVirtualOutput
*
output
);
enum
class
TestMode
{
TestOnly
,
TestWithCrtcReallocation
};
bool
testPendingConfiguration
(
TestMode
mode
=
TestMode
::
TestWithCrtcReallocation
);
bool
testPendingConfiguration
();
bool
needsModeset
()
const
;
bool
maybeModeset
();
...
...
src/backends/drm/drm_output.cpp
View file @
3d556bba
...
...
@@ -296,7 +296,7 @@ void DrmOutput::updateModes()
if
(
currentMode
!=
m_pipeline
->
pending
.
mode
)
{
// DrmConnector::findCurrentMode might fail
m_pipeline
->
pending
.
mode
=
currentMode
?
currentMode
:
m_pipeline
->
connector
()
->
modes
().
constFirst
();
if
(
m_gpu
->
testPendingConfiguration
(
DrmGpu
::
TestMode
::
TestWithCrtcReallocation
))
{
if
(
m_gpu
->
testPendingConfiguration
())
{
m_pipeline
->
applyPendingChanges
();
setCurrentModeInternal
(
m_pipeline
->
pending
.
mode
->
size
(),
m_pipeline
->
pending
.
mode
->
refreshRate
());
m_renderLoop
->
setRefreshRate
(
m_pipeline
->
pending
.
mode
->
refreshRate
());
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment