]> git.baikalelectronics.ru Git - kernel.git/commit
drm/i915: Lock the engine while dumping the active request
authorChris Wilson <chris@chris-wilson.co.uk>
Mon, 15 Jul 2019 08:09:28 +0000 (09:09 +0100)
committerJani Nikula <jani.nikula@intel.com>
Mon, 29 Jul 2019 12:49:54 +0000 (15:49 +0300)
commit16e50ad6a4669cde70477b5ef25a819e6c619043
treec34fede876d0f26993c767e3945802d4bfeff717
parent064f42bb98c90505020f6016e85147cc1888afa3
drm/i915: Lock the engine while dumping the active request

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 <alexthreed@gmail.com>
Fixes: d81d148dde74 ("drm/i915: Dump the ringbuffer of the active request for debugging")
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
Cc: Alex Shumsky <alexthreed@gmail.com>
Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20190715080946.15593-6-chris@chris-wilson.co.uk
(cherry picked from commit cfe7288c276e359eebf057699fe86c2f8af14224)
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
drivers/gpu/drm/i915/gt/intel_engine_cs.c
drivers/gpu/drm/i915/i915_gpu_error.c