[PATCH] drm/atomic-helper: Also update legacy dpms state

Daniel Vetter daniel.vetter at ffwll.ch
Wed Jul 15 08:44:51 PDT 2015


Avoids legacy userspace/code getting confused when dpms doesn't
reflect reality of what's going on.

Signed-off-by: Daniel Vetter <daniel.vetter at intel.com>
---
 drivers/gpu/drm/drm_atomic_helper.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/drivers/gpu/drm/drm_atomic_helper.c b/drivers/gpu/drm/drm_atomic_helper.c
index 91ad6bd13734..2a5f2907ca3a 100644
--- a/drivers/gpu/drm/drm_atomic_helper.c
+++ b/drivers/gpu/drm/drm_atomic_helper.c
@@ -661,6 +661,11 @@ drm_atomic_helper_update_legacy_modeset_state(struct drm_device *dev,
 
 		connector->encoder = connector->state->best_encoder;
 		connector->encoder->crtc = connector->state->crtc;
+
+		if (connector->state->crtc->state->active)
+			connector->dpms = DRM_MODE_DPMS_ON;
+		else
+			connector->dpms = DRM_MODE_DPMS_OFF;
 	}
 
 	/* set legacy state in the crtc structure */
-- 
2.1.4



More information about the dri-devel mailing list