Quoting Chris Wilson (2019-07-09 14:03:03)
> We cannot let the request be retired and freed while we are trying to
> dump it during error capture. It is not sufficient just to grab a
> reference to the request, as during retirement we may free the ring
> which we are also dumping. So take the engine lock to prevent retiring
> and freeing of the request.
> 
> Reported-by: Alex Shumsky <alexthr...@gmail.com>
> Fixes: 83c317832eb1 ("drm/i915: Dump the ringbuffer of the active request for 
> debugging")
> Signed-off-by: Chris Wilson <ch...@chris-wilson.co.uk>
> Cc: Tvrtko Ursulin <tvrtko.ursu...@intel.com>
> Cc: Joonas Lahtinen <joonas.lahti...@linux.intel.com>
> Cc: Alex Shumsky <alexthr...@gmail.com>
> ---
>  drivers/gpu/drm/i915/gt/intel_engine_cs.c | 51 ++++++++++++-----------
>  drivers/gpu/drm/i915/i915_gpu_error.c     |  6 ++-
>  2 files changed, 30 insertions(+), 27 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/gt/intel_engine_cs.c 
> b/drivers/gpu/drm/i915/gt/intel_engine_cs.c
> index bdf279fa3b2e..8ee2dd423674 100644
> --- a/drivers/gpu/drm/i915/gt/intel_engine_cs.c
> +++ b/drivers/gpu/drm/i915/gt/intel_engine_cs.c
> @@ -1444,9 +1444,11 @@ static void intel_engine_print_registers(struct 
> intel_engine_cs *engine,
>         }
>  }
>  
> -static void print_request_ring(struct drm_printer *m, struct i915_request 
> *rq)
> +static void print_request_ring(struct drm_printer *m,
> +                              const struct i915_request *rq,
> +                              const struct intel_ring *ring)

This chunk is superfluous. I thought it might be wiser to pin the ring,
but that would be unusual.
-Chris
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

Reply via email to