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
adb46cbf
Commit
adb46cbf
authored
Apr 12, 2022
by
Xaver Hugl
Browse files
backends/drm: disable added outputs if finding a working setup fails
If the non-working outputs stay enabled, that may cause problems.
parent
255e9882
Pipeline
#163125
passed with stage
in 15 minutes and 45 seconds
Changes
1
Pipelines
2
Hide whitespace changes
Inline
Side-by-side
src/backends/drm/drm_gpu.cpp
View file @
adb46cbf
...
...
@@ -250,6 +250,7 @@ bool DrmGpu::updateOutputs()
}
// check for added and removed connectors
QVector
<
DrmOutput
*>
addedOutputs
;
QVector
<
DrmConnector
*>
removedConnectors
=
m_connectors
;
for
(
int
i
=
0
;
i
<
resources
->
count_connectors
;
++
i
)
{
const
uint32_t
currentConnector
=
resources
->
connectors
[
i
];
...
...
@@ -284,6 +285,7 @@ bool DrmGpu::updateOutputs()
auto
output
=
new
DrmOutput
(
conn
->
pipeline
());
m_drmOutputs
<<
output
;
m_outputs
<<
output
;
addedOutputs
<<
output
;
Q_EMIT
outputAdded
(
output
);
}
}
...
...
@@ -332,6 +334,11 @@ bool DrmGpu::updateOutputs()
for
(
const
auto
&
pipeline
:
qAsConst
(
m_pipelines
))
{
pipeline
->
revertPendingChanges
();
}
for
(
const
auto
&
output
:
qAsConst
(
addedOutputs
))
{
output
->
setEnabled
(
false
);
output
->
pipeline
()
->
pending
.
enabled
=
false
;
output
->
pipeline
()
->
applyPendingChanges
();
}
}
m_leaseDevice
->
setDrmMaster
(
true
);
return
true
;
...
...
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