sna: Only apply a DPMS change for an enabled CRTC

Mostly paranoia, but we need to validate that the stored mode is valid
before applying the modeset.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
This commit is contained in:
Chris Wilson 2014-08-12 10:52:12 +01:00
parent 9cc72c2dc7
commit ec10cef592
1 changed files with 1 additions and 0 deletions

View File

@ -2157,6 +2157,7 @@ sna_crtc_dpms(xf86CrtcPtr crtc, int mode)
priv->dpms_mode = mode;
if (mode == DPMSModeOn &&
crtc->enabled &&
priv->bo == NULL &&
!__sna_crtc_set_mode(crtc))
mode = DPMSModeOff;