public inbox for intel-gfx@lists.freedesktop.org
 help / color / mirror / Atom feed
* [PATCH] drm/i915: fix up ring cleanup for the i830/i845 CS tlb w/a
@ 2013-07-05 21:39 Daniel Vetter
  2013-07-05 22:53 ` Chris Wilson
  0 siblings, 1 reply; 3+ messages in thread
From: Daniel Vetter @ 2013-07-05 21:39 UTC (permalink / raw)
  To: Intel Graphics Development; +Cc: Daniel Vetter, Chris Wilson, stable

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 b45305fce5bb1abec263fcff9d81ebecd6306ede
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
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
---
 drivers/gpu/drm/i915/intel_ringbuffer.c | 9 ++++-----
 1 file changed, 4 insertions(+), 5 deletions(-)

diff --git a/drivers/gpu/drm/i915/intel_ringbuffer.c b/drivers/gpu/drm/i915/intel_ringbuffer.c
index e51ab55..7b4ece9 100644
--- a/drivers/gpu/drm/i915/intel_ringbuffer.c
+++ b/drivers/gpu/drm/i915/intel_ringbuffer.c
@@ -518,9 +518,6 @@ cleanup_pipe_control(struct intel_ring_buffer *ring)
 	struct pipe_control *pc = ring->private;
 	struct drm_i915_gem_object *obj;
 
-	if (!ring->private)
-		return;
-
 	obj = pc->obj;
 
 	kunmap(sg_page(obj->pages->sgl));
@@ -528,7 +525,6 @@ cleanup_pipe_control(struct intel_ring_buffer *ring)
 	drm_gem_object_unreference(&obj->base);
 
 	kfree(pc);
-	ring->private = NULL;
 }
 
 static int init_render_ring(struct intel_ring_buffer *ring)
@@ -601,7 +597,10 @@ static void render_ring_cleanup(struct intel_ring_buffer *ring)
 	if (HAS_BROKEN_CS_TLB(dev))
 		drm_gem_object_unreference(to_gem_object(ring->private));
 
-	cleanup_pipe_control(ring);
+	if (INTEL_INFO(dev)->gen >= 5)
+		cleanup_pipe_control(ring);
+
+	ring->private = NULL;
 }
 
 static void
-- 
1.8.1.4

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] drm/i915: fix up ring cleanup for the i830/i845 CS tlb w/a
  2013-07-05 21:39 [PATCH] drm/i915: fix up ring cleanup for the i830/i845 CS tlb w/a Daniel Vetter
@ 2013-07-05 22:53 ` Chris Wilson
  2013-07-05 23:15   ` Daniel Vetter
  0 siblings, 1 reply; 3+ messages in thread
From: Chris Wilson @ 2013-07-05 22:53 UTC (permalink / raw)
  To: Daniel Vetter; +Cc: Intel Graphics Development, stable

On Fri, Jul 05, 2013 at 11:39:50PM +0200, Daniel Vetter wrote:
> 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 b45305fce5bb1abec263fcff9d81ebecd6306ede
> 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
> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>

Just promise me on the next ring->private, we will add a real
destructor.
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
-Chris

-- 
Chris Wilson, Intel Open Source Technology Centre

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] drm/i915: fix up ring cleanup for the i830/i845 CS tlb w/a
  2013-07-05 22:53 ` Chris Wilson
@ 2013-07-05 23:15   ` Daniel Vetter
  0 siblings, 0 replies; 3+ messages in thread
From: Daniel Vetter @ 2013-07-05 23:15 UTC (permalink / raw)
  To: Chris Wilson, Daniel Vetter, Intel Graphics Development, stable

On Fri, Jul 05, 2013 at 11:53:41PM +0100, Chris Wilson wrote:
> On Fri, Jul 05, 2013 at 11:39:50PM +0200, Daniel Vetter wrote:
> > 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 b45305fce5bb1abec263fcff9d81ebecd6306ede
> > 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
> > Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
> 
> Just promise me on the next ring->private, we will add a real
> destructor.
> Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
Picked up for -fixes, thanks for the patch.
-Daniel
-- 
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2013-07-05 23:15 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-07-05 21:39 [PATCH] drm/i915: fix up ring cleanup for the i830/i845 CS tlb w/a Daniel Vetter
2013-07-05 22:53 ` Chris Wilson
2013-07-05 23:15   ` Daniel Vetter

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox