Skip to content

Commit

Permalink
drm/i915: Drop the iomem accessors when writing to the kmapped blt batch
Browse files Browse the repository at this point in the history
I presumed that we would be writing to the batch through the GTT having
bound it, so I converted it to use iomem. Even later as I spotted that
we didn't even move the batch to the GTT (now an issue since we default
to uncached memory on SNB) I still didn't realise that using iomem for
kmapped memory was incorrect. Fix it.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
  • Loading branch information
Chris Wilson committed Nov 2, 2010
1 parent 8c1812a commit 27153f7
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions drivers/gpu/drm/i915/intel_ringbuffer.c
Original file line number Diff line number Diff line change
Expand Up @@ -899,7 +899,7 @@ static int blt_ring_init(struct intel_ring_buffer *ring)
{
if (NEED_BLT_WORKAROUND(ring->dev)) {
struct drm_i915_gem_object *obj;
u32 __iomem *ptr;
u32 *ptr;
int ret;

obj = to_intel_bo(i915_gem_alloc_object(ring->dev, 4096));
Expand All @@ -913,8 +913,8 @@ static int blt_ring_init(struct intel_ring_buffer *ring)
}

ptr = kmap(obj->pages[0]);
iowrite32(MI_BATCH_BUFFER_END, ptr);
iowrite32(MI_NOOP, ptr+1);
*ptr++ = MI_BATCH_BUFFER_END;
*ptr++ = MI_NOOP;
kunmap(obj->pages[0]);

ret = i915_gem_object_set_to_gtt_domain(&obj->base, false);
Expand Down

0 comments on commit 27153f7

Please sign in to comment.