From aa71b76752ebf79cab7ce726da8d568ed93ba3be Mon Sep 17 00:00:00 2001 From: Zhenyu Wang Date: Thu, 6 Aug 2009 22:11:54 +0800 Subject: [PATCH 2/2] drm/i915: fix batch buffer end address on 845G and 830M The batch buffer end address should be set to the last valid qword, e.g 1 qword size batch should have identical start and end address. Signed-off-by: Zhenyu Wang --- drivers/gpu/drm/i915/i915_dma.c | 2 +- drivers/gpu/drm/i915/i915_gem.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/i915/i915_dma.c b/drivers/gpu/drm/i915/i915_dma.c index 867943a..bd607ec 100644 --- a/drivers/gpu/drm/i915/i915_dma.c +++ b/drivers/gpu/drm/i915/i915_dma.c @@ -531,7 +531,7 @@ static int i915_dispatch_batchbuffer(struct drm_device * dev, BEGIN_LP_RING(4); OUT_RING(MI_BATCH_BUFFER); OUT_RING(batch->start | MI_BATCH_NON_SECURE); - OUT_RING(batch->start + batch->used - 4); + OUT_RING(batch->start + batch->used - 8); OUT_RING(0); ADVANCE_LP_RING(); } diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c index 5bf4203..a6fa21f 100644 --- a/drivers/gpu/drm/i915/i915_gem.c +++ b/drivers/gpu/drm/i915/i915_gem.c @@ -3118,7 +3118,7 @@ i915_dispatch_gem_execbuffer(struct drm_device *dev, BEGIN_LP_RING(4); OUT_RING(MI_BATCH_BUFFER); OUT_RING(exec_start | MI_BATCH_NON_SECURE); - OUT_RING(exec_start + exec_len - 4); + OUT_RING(exec_start + exec_len - 8); OUT_RING(0); ADVANCE_LP_RING(); } else { -- 1.6.3.3