drm/i915: Free wa_batchbuffer when freeing error state
Subsystems (2)
PATCH 1/2 drm/i915: Free wa_batchbuffer when freeing error state
wa_batchbuffer is part of some error states. Make sure it is freed.
--- drivers/gpu/drm/i915/i915_gpu_error.c | 1 + 1 file changed, 1 insertion(+)
drivers/gpu/drm/i915/i915_gpu_error.c +1 -0
@@ -554,6 +554,7 @@ static void i915_error_state_free(struct kref *error_ref)for (i =0 ; i <ARRAY_SIZE (error->ring); i++) {i915_error_object_free (error->ring[i].batchbuffer); +i915_error_object_free (error->ring[i].wa_batchbuffer);i915_error_object_free (error->ring[i].ringbuffer);i915_error_object_free (error->ring[i].hws_page);i915_error_object_free (error->ring[i].ctx);
Signature · 6 lines
1.9.1 _______________________________________________ Intel-gfx mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/intel-gfx
PATCH 2/2 drm/i915: Record the object matching actual head to error state
If we have chained batch, the request only contains the batch buffer that branched the execution into chained batch. We can try to find object for actual head and if it is different than the object from request, record and print its state also.
--- drivers/gpu/drm/i915/i915_drv.h | 3 ++- drivers/gpu/drm/i915/i915_gpu_error.c | 49 ++++++++++++++++++++++++++++++++--- 2 files changed, 47 insertions(+), 5 deletions(-)
drivers/gpu/drm/i915/i915_drv.h +2 -1
@@ -480,7 +480,8 @@ struct drm_i915_error_state {int page_count;u32 gtt_offset;u32 *pages[0 ]; - } *ringbuffer, *batchbuffer, *wa_batchbuffer, *ctx, *hws_page; + } *ringbuffer, *batchbuffer, *wa_batchbuffer, + *active_batchbuffer, *ctx, *hws_page;struct drm_i915_error_request {long jiffies;
drivers/gpu/drm/i915/i915_gpu_error.c +45 -4
96 lines not on this page · raw message
Signature · 6 lines
1.9.1 _______________________________________________ Intel-gfx mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: [PATCH 2/2] drm/i915: Record the object matching actual head to error state
drivers/gpu/drm/i915/i915_gpu_error.c static void i915_gem_record_rings(struct drm_device *dev, · line 1064
Quoted 11 lines · Mika Kuoppala
drivers/gpu/drm/i915/i915_gpu_error.c +11
-0+ obj =find_obj_for_addr (dev, error->ring[i].acthd); +if (request && request->batch_obj == obj) + obj =NULL ; + +if (obj) { +if (vm && !i915_gem_obj_bound (obj, vm)) + vm =NULL ; + + error->ring[i].active_batchbuffer = +i915_error_object_create (dev_priv, obj, vm); + }
I was ok up to here. But after seeing this, I really want to defer this until after i915_error_object_create() is fixed to just take the vma.
http://cgit.freedesktop.org/~ickle/linux-2.6/diff/drivers/gpu/drm/i915/i915_gpu_error.c?h=nightly&id=cc584ccfc109e5b13813548eb0ef1fd8f5751d16
which in about patch 150/200 that Daniel promised to review ;). -Chris
Signature · 5 lines
Chris Wilson, Intel Open Source Technology Centre _______________________________________________ Intel-gfx mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: [PATCH 2/2] drm/i915: Record the object matching actual head to error state
In reply to Mika KuoppalaQuoted 5 lines · Mika Kuoppala
If we have chained batch, the request only contains the batch buffer that branched the execution into chained batch. We can try to find object for actual head and if it is different than the object from request, record and print its state also.
I was also going to say if we want to add even more large objects (and chasing a random pointer can mean we see very, very large objects), we want to compress the output:
Signature · 5 lines
Chris Wilson, Intel Open Source Technology Centre _______________________________________________ Intel-gfx mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: [PATCH 2/2] drm/i915: Record the object matching actual head to error state
In reply to Mika KuoppalaTask id: 6313 -------------------------------------Summary-------------------------------------
Platform Delta drm-intel-nightly Series Applied
PNV 276/276 276/276 ILK 302/302 302/302 SNB 316/316 316/316 IVB 342/342 342/342 BYT 286/286 286/286 BDW 321/321 321/321
-------------------------------------Detailed-------------------------------------
Platform Test drm-intel-nightly Series Applied
Note: You need to pay more attention to line start with '*'
_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
Daniel Vetter
AppliedQuoted 4 lines · Mika Kuoppala
wa_batchbufferis part of some error states. Make sure it is freed.Signed-off-by Mika Kuoppala <[email protected]>
Queued for -next, thanks for the patch.
-Daniel
Quoted 23 lines
--- drivers/gpu/drm/i915/i915_gpu_error.c | 1 + 1 file changed, 1 insertion(+)drivers/gpu/drm/i915/i915_gpu_error.c +1
-0@@ -554,6 +554,7 @@ static void i915_error_state_free(struct kref *error_ref)for (i =0 ; i <ARRAY_SIZE (error->ring); i++) {i915_error_object_free (error->ring[i].batchbuffer); +i915_error_object_free (error->ring[i].wa_batchbuffer);i915_error_object_free (error->ring[i].ringbuffer);i915_error_object_free (error->ring[i].hws_page);i915_error_object_free (error->ring[i].ctx);Signature · 6 lines
1.9.1 _______________________________________________ Intel-gfx mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/intel-gfx
Signature · 7 lines
Daniel Vetter Software Engineer, Intel Corporation http://blog.ffwll.ch _______________________________________________ Intel-gfx mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/intel-gfx