]> git.baikalelectronics.ru Git - kernel.git/commit
drm/i915: Fixup preempt-to-busy vs resubmission of a virtual request
authorChris Wilson <chris@chris-wilson.co.uk>
Mon, 23 Sep 2019 15:28:42 +0000 (16:28 +0100)
committerChris Wilson <chris@chris-wilson.co.uk>
Mon, 23 Sep 2019 19:43:59 +0000 (20:43 +0100)
commita41353101dc1ab681be6460dde5f2af3eebc54fd
tree5132b985cebaef62eb916a49fabcc358c2ee65e9
parentd30d395407acdb1d1b2c2fe944c5d842896568e9
drm/i915: Fixup preempt-to-busy vs resubmission of a virtual request

As preempt-to-busy leaves the request on the HW as the resubmission is
processed, that request may complete in the background and even cause a
second virtual request to enter queue. This second virtual request
breaks our "single request in the virtual pipeline" assumptions.
Furthermore, as the virtual request may be completed and retired, we
lose the reference the virtual engine assumes is held. Normally, just
removing the request from the scheduler queue removes it from the
engine, but the virtual engine keeps track of its singleton request via
its ve->request. This pointer needs protecting with a reference.

v2: Drop unnecessary motion of rq->engine = owner

Fixes: c7e4d40378c6 ("drm/i915/execlists: Preempt-to-busy")
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Mika Kuoppala <mika.kuoppala@linux.intel.com>
Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20190923152844.8914-1-chris@chris-wilson.co.uk
drivers/gpu/drm/i915/gt/intel_lrc.c