From: Jesse Barnes Date: Tue, 15 Nov 2011 18:28:54 +0000 (-0800) Subject: drm/i915: only set the intel_crtc DPMS mode to on if the mode set succeeded X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=d8e70a254d8f2da141006e496a51502b79115e80;p=GitHub%2Fexynos8895%2Fandroid_kernel_samsung_universal8895.git drm/i915: only set the intel_crtc DPMS mode to on if the mode set succeeded If it failed, leave it in the "off" state. Signed-off-by: Jesse Barnes Signed-off-by: Keith Packard --- diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c index bdab82b999e0..29743dee54c2 100644 --- a/drivers/gpu/drm/i915/intel_display.c +++ b/drivers/gpu/drm/i915/intel_display.c @@ -5984,10 +5984,12 @@ static int intel_crtc_mode_set(struct drm_crtc *crtc, ret = dev_priv->display.crtc_mode_set(crtc, mode, adjusted_mode, x, y, old_fb); - drm_vblank_post_modeset(dev, pipe); - intel_crtc->dpms_mode = DRM_MODE_DPMS_ON; + if (ret) + intel_crtc->dpms_mode = DRM_MODE_DPMS_OFF; + else + intel_crtc->dpms_mode = DRM_MODE_DPMS_ON; return ret; }