drm/atomic-helper: Also update legacy dpms state
diff mbox

Message ID 1436975091-2397-1-git-send-email-daniel.vetter@ffwll.ch
State New
Headers show

Commit Message

Daniel Vetter July 15, 2015, 3:44 p.m. UTC
Avoids legacy userspace/code getting confused when dpms doesn't
reflect reality of what's going on.

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

Comments

Daniel Stone July 15, 2015, 3:48 p.m. UTC | #1
On 15 July 2015 at 16:44, Daniel Vetter <daniel.vetter@ffwll.ch> wrote:
> Avoids legacy userspace/code getting confused when dpms doesn't
> reflect reality of what's going on.
>
> Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>

Reviewed-by: Daniel Stone <daniels@collabora.com>
Daniel Vetter July 16, 2015, 7:06 a.m. UTC | #2
On Wed, Jul 15, 2015 at 04:48:33PM +0100, Daniel Stone wrote:
> On 15 July 2015 at 16:44, Daniel Vetter <daniel.vetter@ffwll.ch> wrote:
> > Avoids legacy userspace/code getting confused when dpms doesn't
> > reflect reality of what's going on.
> >
> > Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
> 
> Reviewed-by: Daniel Stone <daniels@collabora.com>

Applied to drm-misc, thanks for the review.
-Daniel

Patch
diff mbox

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 */