]> git.baikalelectronics.ru Git - kernel.git/commit
drm/i915/gem: Mark the buffer pool as active for the cmdparser
authorChris Wilson <chris@chris-wilson.co.uk>
Thu, 4 Jun 2020 10:37:30 +0000 (11:37 +0100)
committerChris Wilson <chris@chris-wilson.co.uk>
Thu, 4 Jun 2020 13:38:06 +0000 (14:38 +0100)
commit15289442d530cc29e2551ae7f599e80796381cf0
tree8351ac8f65911de7abc937fe7a95699a804fcaa8
parent8765efb92e8246838c245f6591af92fde31de6e6
drm/i915/gem: Mark the buffer pool as active for the cmdparser

If the execbuf is interrupted after building the cmdparser pipeline, and
before we commit to submitting the request to HW, we would attempt to
clean up the cmdparser early. While we held active references to the vma
being parsed and constructed, we did not hold an active reference for
the buffer pool itself. The result was that an interrupted execbuf could
still have run the cmdparser pipeline, but since the buffer pool was
idle, its target vma could have been recycled.

Note this problem only occurs if the cmdparser is running async due to
pipelined waits on busy fences, and the execbuf is interrupted.

Fixes: f1c2907b8e7e ("drm/i915/gem: Asynchronous cmdparser")
Fixes: 7b9d144b2c5c ("drm/i915/gt: Move the batch buffer pool from the engine to the gt")
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Matthew Auld <matthew.auld@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20200604103751.18816-1-chris@chris-wilson.co.uk
drivers/gpu/drm/i915/gem/i915_gem_execbuffer.c