Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit d8e70a25 authored by Jesse Barnes's avatar Jesse Barnes Committed by Keith Packard
Browse files

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: default avatarJesse Barnes <jbarnes@virtuousgeek.org>
Signed-off-by: default avatarKeith Packard <keithp@keithp.com>
parent 7a419866
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -5984,9 +5984,11 @@ 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);

	if (ret)
		intel_crtc->dpms_mode = DRM_MODE_DPMS_OFF;
	else
		intel_crtc->dpms_mode = DRM_MODE_DPMS_ON;

	return ret;