drm: allow changing DPMS mode for non-CRTC displays
Subsystems (2)
PATCH 1/1 drm: allow changing DPMS mode for non-CRTC displays
For non-CRTC displays, the drm_atomic_helper_connector_dpms will always set the connector back the old DPMS state before returning. This makes it impossible to change DPMS state.
--- drivers/gpu/drm/drm_atomic_helper.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/gpu/drm/drm_atomic_helper.c +2 -2
@@ -2885,8 +2885,8 @@ int drm_atomic_helper_connector_dpms(struct drm_connector *connector, fail:if (ret == -EDEADLK ) goto backoff; - - connector->dpms = old_mode; +if (ret !=0 ) + connector->dpms = old_mode;drm_atomic_state_put (state);return ret;
Signature · 6 lines
2.9.3 _______________________________________________ dri-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/dri-devel
Quoted 1 line · Marta Lofstedt
For non-CRTC displays,
A connector not attached to a CRTC works. It is the active connectors that were broken.
Quoted 17 lines
the
drm_atomic_helper_connector_dpms
will always set the connector back the old DPMS state before returning. This makes it impossible to change DPMS state.Fixes 0853695c3ba46f97dfc0b5885f7b7e640ca212ddSigned-off-by Marta Lofstedt <[email protected]>--- drivers/gpu/drm/drm_atomic_helper.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)drivers/gpu/drm/drm_atomic_helper.c +0
-0
drivers/gpu/drm/drm_atomic_helper.c int drm_atomic_helper_connector_dpms(struct drm_connector *connector, · line 2889
Quoted 7 lines
drivers/gpu/drm/drm_atomic_helper.c +2
-2@@ -2885,8 +2885,8 @@ int drm_atomic_helper_connector_dpms(struct drm_connector *connector, fail:if (ret == -EDEADLK ) goto backoff; - - connector->dpms = old_mode; +if (ret !=0 ) + connector->dpms = old_mode;
Patch however is correct.
Fix the subject line to reflect the impact correctly, amend the fixes tag and add the appropriate CCs
And mention if there was a testcase exercising the failure. If not please suggest one.
-Chris
Signature · 5 lines
Chris Wilson, Intel Open Source Technology Centre _______________________________________________ dri-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/dri-devel
Quoted 54 lines
-----Original Message-----
From: Chris Wilson [mailto:[email protected]]
Sent: Thursday, December 1, 2016 4:15 PM
To: Lofstedt, Marta <[email protected]>
Cc: [email protected]
Subject: Re: [PATCH] drm: allow changing DPMS mode for non-CRTC displaysQuoted 1 line · Marta Lofstedt
For non-CRTC displays,
A connector not attached to a CRTC works. It is the active connectors that were broken.
Quoted 17 lines
the
drm_atomic_helper_connector_dpms
will always set the connector back the old DPMS state before returning. This makes it impossible to change DPMS state.Fixes 0853695c3ba46f97dfc0b5885f7b7e640ca212ddSigned-off-by Marta Lofstedt <[email protected]>--- drivers/gpu/drm/drm_atomic_helper.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)drivers/gpu/drm/drm_atomic_helper.c +0
-0drivers/gpu/drm/drm_atomic_helper.c int drm_atomic_helper_connector_dpms(struct · line 2890
Quoted 8 lines
drivers/gpu/drm/drm_atomic_helper.c +2
-2@@ -2885,8 +2885,8 @@ int drm_atomic_helper_connector_dpms(struct drm_connector *connector, fail: if (ret == -EDEADLK) goto backoff; - - connector->dpms = old_mode; +if (ret !=0 ) + connector->dpms = old_mode;Patch however is correct.
Fix the subject line to reflect the impact correctly, amend the fixes tag and add the appropriate CCs
Fixes 0853695c3ba4 ("drm: Add reference counting to drm_atomic_state")Cc Chris Wilson <[email protected]>Cc Daniel Vetter <[email protected]>Cc Eric Engestrom <[email protected]>Cc Sean Paul <[email protected]>Cc <[email protected]>
Quoted 2 lines
And mention if there was a testcase exercising the failure. If not please suggest one.
Thanks for the comments Chris.
About tests, I can't seem to find any test that is actually checking that we entered DPMS mode. The suggestion is to extend the kms_properties test, or maybe we should have a new dpms test. I CC Petri, so he can take part in such a discussion.
/Marta
Quoted 4 lines
-Chris
--
Chris Wilson, Intel Open Source Technology Centre
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
Eric Engestrom
Reviewed-byQuoted 33 lines · Chris Wilson
Quoted 1 line · Marta Lofstedt
For non-CRTC displays,
A connector not attached to a CRTC works. It is the active connectors that were broken.
Quoted 17 lines
the
drm_atomic_helper_connector_dpms
will always set the connector back the old DPMS state before returning. This makes it impossible to change DPMS state.Fixes 0853695c3ba46f97dfc0b5885f7b7e640ca212ddSigned-off-by Marta Lofstedt <[email protected]>--- drivers/gpu/drm/drm_atomic_helper.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)drivers/gpu/drm/drm_atomic_helper.c +0
-0drivers/gpu/drm/drm_atomic_helper.c int drm_atomic_helper_connector_dpms(struct drm_connector *connector, · line 2889
Quoted 7 lines
drivers/gpu/drm/drm_atomic_helper.c +2
-2@@ -2885,8 +2885,8 @@ int drm_atomic_helper_connector_dpms(struct drm_connector *connector, fail:if (ret == -EDEADLK ) goto backoff; - - connector->dpms = old_mode; +if (ret !=0 ) + connector->dpms = old_mode;Patch however is correct.
Quoted 7 lines
Fix the subject line to reflect the impact correctly, amend the fixes tag and add the appropriate CCs
Fixes 0853695c3ba4 ("drm: Add reference counting to drm_atomic_state")Cc Chris Wilson <[email protected]>Cc Daniel Vetter <[email protected]>Cc Eric Engestrom <[email protected]>
Good catch!
I just had another look at the change (0853695c3ba4) and I don't believe there was any other unintended behaviour change.
Quoted 10 lines
And mention if there was a testcase exercising the failure. If not please suggest one.
-ChrisSignature · 1 line
Chris Wilson, Intel Open Source Technology Centre
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
PATCH v2 1/1 drm: allow changing DPMS mode
In reply to Marta LofstedtThe drm_atomic_helper_connector_dpms
will set the connector back the old DPMS state before returning. This makes it impossible to change DPMS state of the connector.
v2: edit of commit message
--- drivers/gpu/drm/drm_atomic_helper.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/gpu/drm/drm_atomic_helper.c +2 -2
@@ -2885,8 +2885,8 @@ int drm_atomic_helper_connector_dpms(struct drm_connector *connector, fail:if (ret == -EDEADLK ) goto backoff; - - connector->dpms = old_mode; +if (ret !=0 ) + connector->dpms = old_mode;drm_atomic_state_put (state);return ret;
Signature · 6 lines
2.9.3 _______________________________________________ dri-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/dri-devel
Daniel Vetter
AppliedRe: [PATCH v2] drm: allow changing DPMS mode
Quoted 6 lines · Marta Lofstedt
The
drm_atomic_helper_connector_dpms
will set the connector back the old DPMS state before returning. This makes it impossible to change DPMS state of the connector.Fixes 0853695c3ba46f97dfc0b5885f7b7e640ca212dd
Quoted 8 lines
v2: edit of commit message
Cc Chris Wilson <[email protected]>Cc Daniel Vetter <[email protected]>Cc Eric Engestrom <[email protected]>Cc Sean Paul <[email protected]>Cc <[email protected]>Signed-off-by Marta Lofstedt <[email protected]>
Applied to drm-misc, thanks.
-Daniel
Quoted 22 lines
--- drivers/gpu/drm/drm_atomic_helper.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)drivers/gpu/drm/drm_atomic_helper.c +2
-2@@ -2885,8 +2885,8 @@ int drm_atomic_helper_connector_dpms(struct drm_connector *connector, fail:if (ret == -EDEADLK ) goto backoff; - - connector->dpms = old_mode; +if (ret !=0 ) + connector->dpms = old_mode;drm_atomic_state_put (state);return ret;Signature · 1 line
2.9.3
Signature · 7 lines
Daniel Vetter Software Engineer, Intel Corporation http://blog.ffwll.ch _______________________________________________ dri-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/dri-devel