From 52e2015152abcd506a7c9c138d3456d6e518fc0a Mon Sep 17 00:00:00 2001 From: Chris Wilson Date: Sat, 8 Jan 2011 10:17:08 +0000 Subject: [PATCH] reverse-engineer safe snb wm0 values --- drivers/gpu/drm/i915/intel_display.c | 8 ++++++-- 1 files changed, 6 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c index edc4535..c1cb695 100644 --- a/drivers/gpu/drm/i915/intel_display.c +++ b/drivers/gpu/drm/i915/intel_display.c @@ -4271,7 +4271,9 @@ static void sandybridge_update_wm(struct drm_device *dev) &sandybridge_cursor_wm_info, latency, &plane_wm, &cursor_wm)) { I915_WRITE(WM0_PIPEA_ILK, - (plane_wm << WM0_PIPE_PLANE_SHIFT) | cursor_wm); + ((sandybridge_display_wm_info.fifo_size - plane_wm) << WM0_PIPE_PLANE_SHIFT) | + (2 << WM0_PIPE_SPRITE_SHIFT) | + cursor_wm); DRM_DEBUG_KMS("FIFO watermarks For pipe A -" " plane %d, " "cursor: %d\n", plane_wm, cursor_wm); @@ -4283,7 +4285,9 @@ static void sandybridge_update_wm(struct drm_device *dev) &sandybridge_cursor_wm_info, latency, &plane_wm, &cursor_wm)) { I915_WRITE(WM0_PIPEB_ILK, - (plane_wm << WM0_PIPE_PLANE_SHIFT) | cursor_wm); + ((sandybridge_display_wm_info.fifo_size - plane_wm) << WM0_PIPE_PLANE_SHIFT) | + (2 << WM0_PIPE_SPRITE_SHIFT) | + cursor_wm); DRM_DEBUG_KMS("FIFO watermarks For pipe B -" " plane %d, cursor: %d\n", plane_wm, cursor_wm); -- 1.7.2.3