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
4d0998cf
Commit
4d0998cf
authored
Feb 15, 2022
by
Xaver Hugl
Committed by
Vlad Zahorodnii
Feb 15, 2022
Browse files
backends/drm: fix legacy dpms
parent
76dbe9e5
Pipeline
#137635
passed with stage
in 15 minutes and 48 seconds
Changes
2
Pipelines
3
Hide whitespace changes
Inline
Side-by-side
src/backends/drm/drm_pipeline_legacy.cpp
View file @
4d0998cf
...
...
@@ -97,7 +97,6 @@ bool DrmPipeline::applyPendingChangesLegacy()
if
(
needsModeset
()
&&!
legacyModeset
())
{
return
false
;
}
m_connector
->
getProp
(
DrmConnector
::
PropertyIndex
::
Dpms
)
->
setCurrent
(
DRM_MODE_DPMS_ON
);
if
(
pending
.
gamma
&&
drmModeCrtcSetGamma
(
gpu
()
->
fd
(),
pending
.
crtc
->
id
(),
pending
.
gamma
->
size
(),
pending
.
gamma
->
red
(),
pending
.
gamma
->
green
(),
pending
.
gamma
->
blue
())
!=
0
)
{
qCWarning
(
KWIN_DRM
)
<<
"Setting gamma failed!"
<<
strerror
(
errno
);
...
...
@@ -106,7 +105,7 @@ bool DrmPipeline::applyPendingChangesLegacy()
setCursorLegacy
();
moveCursorLegacy
();
}
if
(
pending
.
crtc
&&
!
m_connector
->
getProp
(
DrmConnector
::
PropertyIndex
::
Dpms
)
->
setPropertyLegacy
(
pending
.
active
?
DRM_MODE_DPMS_ON
:
DRM_MODE_DPMS_OFF
))
{
if
(
!
m_connector
->
getProp
(
DrmConnector
::
PropertyIndex
::
Dpms
)
->
setPropertyLegacy
(
activePending
()
?
DRM_MODE_DPMS_ON
:
DRM_MODE_DPMS_OFF
))
{
qCWarning
(
KWIN_DRM
)
<<
"Setting legacy dpms failed!"
<<
strerror
(
errno
);
return
false
;
}
...
...
src/backends/drm/drm_property.cpp
View file @
4d0998cf
...
...
@@ -65,7 +65,12 @@ void DrmProperty::rollbackPending()
bool
DrmProperty
::
setPropertyLegacy
(
uint64_t
value
)
{
return
drmModeObjectSetProperty
(
m_obj
->
gpu
()
->
fd
(),
m_obj
->
id
(),
m_obj
->
type
(),
m_propId
,
value
)
==
0
;
if
(
drmModeObjectSetProperty
(
m_obj
->
gpu
()
->
fd
(),
m_obj
->
id
(),
m_obj
->
type
(),
m_propId
,
value
)
==
0
)
{
m_current
=
m_next
=
m_pending
=
value
;
return
true
;
}
else
{
return
false
;
}
}
void
DrmProperty
::
initEnumMap
(
drmModePropertyRes
*
prop
)
...
...
Xaver Hugl
@zamundaaa
mentioned in commit
c461149d
·
Feb 15, 2022
mentioned in commit
c461149d
mentioned in commit c461149d5516a1dcf896984e2b0adfd60cea9953
Toggle commit list
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