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

Commit 629598da authored by Jesse Barnes's avatar Jesse Barnes Committed by Eric Anholt
Browse files

drm/i915: update watermarks before enabling PLLs



When coming back from DPMS or turning on a display, make sure we have
the watermarks set up before turning on the display plane, otherwise we
may get underruns.

Signed-off-by: default avatarJesse Barnes <jbarnes@virtuousgeek.org>
Tested-by: default avatarDirk Hohndel <hohndel@infradead.org>
Signed-off-by: default avatarEric Anholt <eric@anholt.net>
parent 0e442c60
Loading
Loading
Loading
Loading
+2 −1
Original line number Original line Diff line number Diff line
@@ -1803,6 +1803,8 @@ static void i9xx_crtc_dpms(struct drm_crtc *crtc, int mode)
	case DRM_MODE_DPMS_ON:
	case DRM_MODE_DPMS_ON:
	case DRM_MODE_DPMS_STANDBY:
	case DRM_MODE_DPMS_STANDBY:
	case DRM_MODE_DPMS_SUSPEND:
	case DRM_MODE_DPMS_SUSPEND:
		intel_update_watermarks(dev);

		/* Enable the DPLL */
		/* Enable the DPLL */
		temp = I915_READ(dpll_reg);
		temp = I915_READ(dpll_reg);
		if ((temp & DPLL_VCO_ENABLE) == 0) {
		if ((temp & DPLL_VCO_ENABLE) == 0) {
@@ -1840,7 +1842,6 @@ static void i9xx_crtc_dpms(struct drm_crtc *crtc, int mode)


		/* Give the overlay scaler a chance to enable if it's on this pipe */
		/* Give the overlay scaler a chance to enable if it's on this pipe */
		//intel_crtc_dpms_video(crtc, true); TODO
		//intel_crtc_dpms_video(crtc, true); TODO
		intel_update_watermarks(dev);
	break;
	break;
	case DRM_MODE_DPMS_OFF:
	case DRM_MODE_DPMS_OFF:
		intel_update_watermarks(dev);
		intel_update_watermarks(dev);