aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu
diff options
context:
space:
mode:
authorVille Syrjälä <ville.syrjala@linux.intel.com>2013-12-05 08:51:41 -0500
committerDaniel Vetter <daniel.vetter@ffwll.ch>2013-12-17 07:17:58 -0500
commit1bd09ec7ad314313f15db733c7e9cb2225d95453 (patch)
tree39431bf05c0abb9ad9c93fc590441dfa1300434d /drivers/gpu
parentefb31d15dc16150a7a41947d712822e703c3e923 (diff)
drm/i915: Avoid underruns when disabling sprites
As the watermark registers aren't double bufferd, clearing the watermarks immediately after writing the sprite registers can be hazardous. Until we have something better, add a wait for vblank between the two steps to make sure the sprite no longer needs the watermark levels before we clear them. Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Reviewed-by: Imre Deak <imre.deak@intel.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Diffstat (limited to 'drivers/gpu')
-rw-r--r--drivers/gpu/drm/i915/intel_sprite.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/drivers/gpu/drm/i915/intel_sprite.c b/drivers/gpu/drm/i915/intel_sprite.c
index 050ec29e3150..606c27b7ae8f 100644
--- a/drivers/gpu/drm/i915/intel_sprite.c
+++ b/drivers/gpu/drm/i915/intel_sprite.c
@@ -336,6 +336,12 @@ ivb_disable_plane(struct drm_plane *plane, struct drm_crtc *crtc)
336 I915_MODIFY_DISPBASE(SPRSURF(pipe), 0); 336 I915_MODIFY_DISPBASE(SPRSURF(pipe), 0);
337 POSTING_READ(SPRSURF(pipe)); 337 POSTING_READ(SPRSURF(pipe));
338 338
339 /*
340 * Avoid underruns when disabling the sprite.
341 * FIXME remove once watermark updates are done properly.
342 */
343 intel_wait_for_vblank(dev, pipe);
344
339 intel_update_sprite_watermarks(plane, crtc, 0, 0, false, false); 345 intel_update_sprite_watermarks(plane, crtc, 0, 0, false, false);
340} 346}
341 347
@@ -503,6 +509,12 @@ ilk_disable_plane(struct drm_plane *plane, struct drm_crtc *crtc)
503 I915_MODIFY_DISPBASE(DVSSURF(pipe), 0); 509 I915_MODIFY_DISPBASE(DVSSURF(pipe), 0);
504 POSTING_READ(DVSSURF(pipe)); 510 POSTING_READ(DVSSURF(pipe));
505 511
512 /*
513 * Avoid underruns when disabling the sprite.
514 * FIXME remove once watermark updates are done properly.
515 */
516 intel_wait_for_vblank(dev, pipe);
517
506 intel_update_sprite_watermarks(plane, crtc, 0, 0, false, false); 518 intel_update_sprite_watermarks(plane, crtc, 0, 0, false, false);
507} 519}
508 520