Commit aaf8a516 authored by Daniel Vetter's avatar Daniel Vetter

drm/i915: fix up ring cleanup for the i830/i845 CS tlb w/a

It's not a good idea to also run the pipe_control cleanup.

This regression has been introduced whith the original cs tlb w/a in

commit b45305fc
Author: Daniel Vetter <daniel.vetter@ffwll.ch>
Date:   Mon Dec 17 16:21:27 2012 +0100

    drm/i915: Implement workaround for broken CS tlb on i830/845

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=64610
Cc: Chris Wilson <chris@chris-wilson.co.uk>
Cc: stable@vger.kernel.org
Reviewed-by: default avatarChris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
parent 06755608
...@@ -534,9 +534,6 @@ cleanup_pipe_control(struct intel_ring_buffer *ring) ...@@ -534,9 +534,6 @@ cleanup_pipe_control(struct intel_ring_buffer *ring)
struct pipe_control *pc = ring->private; struct pipe_control *pc = ring->private;
struct drm_i915_gem_object *obj; struct drm_i915_gem_object *obj;
if (!ring->private)
return;
obj = pc->obj; obj = pc->obj;
kunmap(sg_page(obj->pages->sgl)); kunmap(sg_page(obj->pages->sgl));
...@@ -544,7 +541,6 @@ cleanup_pipe_control(struct intel_ring_buffer *ring) ...@@ -544,7 +541,6 @@ cleanup_pipe_control(struct intel_ring_buffer *ring)
drm_gem_object_unreference(&obj->base); drm_gem_object_unreference(&obj->base);
kfree(pc); kfree(pc);
ring->private = NULL;
} }
static int init_render_ring(struct intel_ring_buffer *ring) static int init_render_ring(struct intel_ring_buffer *ring)
...@@ -617,7 +613,10 @@ static void render_ring_cleanup(struct intel_ring_buffer *ring) ...@@ -617,7 +613,10 @@ static void render_ring_cleanup(struct intel_ring_buffer *ring)
if (HAS_BROKEN_CS_TLB(dev)) if (HAS_BROKEN_CS_TLB(dev))
drm_gem_object_unreference(to_gem_object(ring->private)); drm_gem_object_unreference(to_gem_object(ring->private));
if (INTEL_INFO(dev)->gen >= 5)
cleanup_pipe_control(ring); cleanup_pipe_control(ring);
ring->private = NULL;
} }
static void static void
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment