On Fri, Jun 13, 2014 at 04:38:01PM +0100, oscar.mateo@xxxxxxxxx wrote: > From: Oscar Mateo <oscar.mateo@xxxxxxxxx> > > Since the ringbuffer does not belong per engine anymore, we have to > make sure that we are always recording the correct ringbuffer. > > TODO: This is only a small fix to keep basic error capture working, but > we need to add more information for it to be useful (e.g. dump the > context being executed). I think we should dump the two lrc submitted to the hw port (our decoder can deal with arbitrary amounts of rings, just name them foo1 and foo2) and the overall execlist submission queue with a few hints what's going on should be a useful start. The scheduler patches can then pimp this further I guess. -Daniel > > Signed-off-by: Oscar Mateo <oscar.mateo@xxxxxxxxx> > --- > drivers/gpu/drm/i915/i915_gpu_error.c | 16 ++++++++++++---- > 1 file changed, 12 insertions(+), 4 deletions(-) > > diff --git a/drivers/gpu/drm/i915/i915_gpu_error.c b/drivers/gpu/drm/i915/i915_gpu_error.c > index 87ec60e..f5897be 100644 > --- a/drivers/gpu/drm/i915/i915_gpu_error.c > +++ b/drivers/gpu/drm/i915/i915_gpu_error.c > @@ -825,9 +825,6 @@ static void i915_record_ring_state(struct drm_device *dev, > ering->hws = I915_READ(mmio); > } > > - ering->cpu_ring_head = ring->buffer->head; > - ering->cpu_ring_tail = ring->buffer->tail; > - > ering->hangcheck_score = ring->hangcheck.score; > ering->hangcheck_action = ring->hangcheck.action; > > @@ -887,6 +884,7 @@ static void i915_gem_record_rings(struct drm_device *dev, > > for (i = 0; i < I915_NUM_RINGS; i++) { > struct intel_engine_cs *ring = &dev_priv->ring[i]; > + struct intel_ringbuffer *ringbuf = ring->buffer; > > if (ring->dev == NULL) > continue; > @@ -929,8 +927,18 @@ static void i915_gem_record_rings(struct drm_device *dev, > } > } > > + if (intel_enable_execlists(dev)) { > + if (request) > + ringbuf = request->ctx->engine[ring->id].ringbuf; > + else > + ringbuf = ring->default_context->engine[ring->id].ringbuf; > + } > + > + error->ring[i].cpu_ring_head = ringbuf->head; > + error->ring[i].cpu_ring_tail = ringbuf->tail; > + > error->ring[i].ringbuffer = > - i915_error_ggtt_object_create(dev_priv, ring->buffer->obj); > + i915_error_ggtt_object_create(dev_priv, ringbuf->obj); > > if (ring->status_page.obj) > error->ring[i].hws_page = > -- > 1.9.0 > > _______________________________________________ > Intel-gfx mailing list > Intel-gfx@xxxxxxxxxxxxxxxxxxxxx > http://lists.freedesktop.org/mailman/listinfo/intel-gfx -- Daniel Vetter Software Engineer, Intel Corporation +41 (0) 79 365 57 48 - http://blog.ffwll.ch _______________________________________________ Intel-gfx mailing list Intel-gfx@xxxxxxxxxxxxxxxxxxxxx http://lists.freedesktop.org/mailman/listinfo/intel-gfx