aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm
diff options
context:
space:
mode:
authorZhenyu Wang <zhenyuw@linux.intel.com>2010-02-08 20:46:20 -0500
committerEric Anholt <eric@anholt.net>2010-02-10 17:50:38 -0500
commitaacef09b59e99d9e919ede74d107d5d7f3721432 (patch)
tree2ba8295c11fd792bf813d047376a434feb8ce911 /drivers/gpu/drm
parentf072d2e77128c5b332ce217764cf170b660b99dc (diff)
drm/i915: fix pipe source image setting in flip command
The MI_DISPLAY_FLIP command needs to be set the same pipe source image like in pipe source register, e.g source image size minus one. This fixes screen corrupt issue on Ironlake. Signed-off-by: Zhenyu Wang <zhenyuw@linux.intel.com> Signed-off-by: Eric Anholt <eric@anholt.net>
Diffstat (limited to 'drivers/gpu/drm')
-rw-r--r--drivers/gpu/drm/i915/intel_display.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
index dc6ffe82d2cd..c161ace7132d 100644
--- a/drivers/gpu/drm/i915/intel_display.c
+++ b/drivers/gpu/drm/i915/intel_display.c
@@ -4180,7 +4180,8 @@ static int intel_crtc_page_flip(struct drm_crtc *crtc,
4180 struct intel_crtc *intel_crtc = to_intel_crtc(crtc); 4180 struct intel_crtc *intel_crtc = to_intel_crtc(crtc);
4181 struct intel_unpin_work *work; 4181 struct intel_unpin_work *work;
4182 unsigned long flags; 4182 unsigned long flags;
4183 int ret; 4183 int pipesrc_reg = (intel_crtc->pipe == 0) ? PIPEASRC : PIPEBSRC;
4184 int ret, pipesrc;
4184 RING_LOCALS; 4185 RING_LOCALS;
4185 4186
4186 work = kzalloc(sizeof *work, GFP_KERNEL); 4187 work = kzalloc(sizeof *work, GFP_KERNEL);
@@ -4236,7 +4237,8 @@ static int intel_crtc_page_flip(struct drm_crtc *crtc,
4236 OUT_RING(fb->pitch); 4237 OUT_RING(fb->pitch);
4237 if (IS_I965G(dev)) { 4238 if (IS_I965G(dev)) {
4238 OUT_RING(obj_priv->gtt_offset | obj_priv->tiling_mode); 4239 OUT_RING(obj_priv->gtt_offset | obj_priv->tiling_mode);
4239 OUT_RING((fb->width << 16) | fb->height); 4240 pipesrc = I915_READ(pipesrc_reg);
4241 OUT_RING(pipesrc & 0x0fff0fff);
4240 } else { 4242 } else {
4241 OUT_RING(obj_priv->gtt_offset); 4243 OUT_RING(obj_priv->gtt_offset);
4242 OUT_RING(MI_NOOP); 4244 OUT_RING(MI_NOOP);