[PATCH v2] drm: allow changing DPMS mode

Marta Lofstedt marta.lofstedt at intel.com
Mon Dec 5 12:04:08 UTC 2016


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
v2: edit of commit message
Cc: Chris Wilson <chris at chris-wilson.co.uk>
Cc: Daniel Vetter <daniel.vetter at ffwll.ch>
Cc: Eric Engestrom <eric.engestrom at imgtec.com>
Cc: Sean Paul <seanpaul at chromium.org>
Cc: dri-devel at lists.freedesktop.org
Cc: <drm-intel-fixes at lists.freedesktop.org>
Signed-off-by: Marta Lofstedt <marta.lofstedt at intel.com>
---
 drivers/gpu/drm/drm_atomic_helper.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/drm_atomic_helper.c b/drivers/gpu/drm/drm_atomic_helper.c
index 494680c..6a5acb9 100644
--- a/drivers/gpu/drm/drm_atomic_helper.c
+++ b/drivers/gpu/drm/drm_atomic_helper.c
@@ -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;
 
-- 
2.9.3



More information about the dri-devel mailing list