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
52c1155b
Commit
52c1155b
authored
Apr 08, 2022
by
Xaver Hugl
Browse files
backends/drm: prevent calling frameFailed multiple times per present
parent
972534eb
Pipeline
#161372
passed with stage
in 18 minutes and 45 seconds
Changes
3
Pipelines
3
Hide whitespace changes
Inline
Side-by-side
src/backends/drm/drm_output.cpp
View file @
52c1155b
...
...
@@ -320,14 +320,15 @@ bool DrmOutput::present()
setVrrPolicy
(
RenderLoop
::
VrrPolicy
::
Never
);
}
}
if
(
m_pipeline
->
present
())
{
bool
modeset
=
gpu
()
->
needsModeset
();
if
(
modeset
?
m_pipeline
->
maybeModeset
()
:
m_pipeline
->
present
())
{
Q_EMIT
outputChange
(
m_pipeline
->
pending
.
layer
->
currentDamage
());
return
true
;
}
else
{
}
else
if
(
!
modeset
)
{
qCWarning
(
KWIN_DRM
)
<<
"Presentation failed!"
<<
strerror
(
errno
);
frameFailed
();
return
false
;
}
return
false
;
}
int
DrmOutput
::
gammaRampSize
()
const
...
...
src/backends/drm/drm_pipeline.cpp
View file @
52c1155b
...
...
@@ -61,10 +61,6 @@ bool DrmPipeline::testScanout()
bool
DrmPipeline
::
present
()
{
Q_ASSERT
(
pending
.
crtc
);
if
(
gpu
()
->
needsModeset
())
{
m_modesetPresentPending
=
true
;
return
gpu
()
->
maybeModeset
();
}
if
(
gpu
()
->
atomicModeSetting
())
{
return
commitPipelines
({
this
},
CommitMode
::
Commit
);
}
else
{
...
...
@@ -79,6 +75,12 @@ bool DrmPipeline::present()
return
true
;
}
bool
DrmPipeline
::
maybeModeset
()
{
m_modesetPresentPending
=
true
;
return
gpu
()
->
maybeModeset
();
}
bool
DrmPipeline
::
commitPipelines
(
const
QVector
<
DrmPipeline
*>
&
pipelines
,
CommitMode
mode
,
const
QVector
<
DrmObject
*>
&
unusedObjects
)
{
Q_ASSERT
(
!
pipelines
.
isEmpty
());
...
...
src/backends/drm/drm_pipeline.h
View file @
52c1155b
...
...
@@ -63,6 +63,7 @@ public:
*/
bool
present
();
bool
testScanout
();
bool
maybeModeset
();
bool
needsModeset
()
const
;
void
applyPendingChanges
();
...
...
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