]> git.baikalelectronics.ru Git - kernel.git/commit
drm/i915/gt: Prevent queuing retire workers on the virtual engine
authorChris Wilson <chris@chris-wilson.co.uk>
Thu, 6 Feb 2020 20:49:12 +0000 (20:49 +0000)
committerChris Wilson <chris@chris-wilson.co.uk>
Fri, 7 Feb 2020 10:54:49 +0000 (10:54 +0000)
commit2e0c1f3f8b90cbd54313ca5eea6f19e1be5ca55f
tree16ee71aa63599516c423ba5b579b8017707b12f6
parent0c8009a5ec65ca914f3f092d58e44d0efa580a31
drm/i915/gt: Prevent queuing retire workers on the virtual engine

Virtual engines are fleeting. They carry a reference count and may be freed
when their last request is retired. This makes them unsuitable for the
task of housing engine->retire.work so assert that it is not used.

Tvrtko tracked down an instance where we did indeed violate this rule.
In virtual_submit_request, we flush a completed request directly with
__i915_request_submit and this causes us to queue that request on the
veng's breadcrumb list and signal it. Leading us down a path where we
should not attach the retire.

Reported-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Fixes: b22d587c150e ("drm/i915/gt: Schedule request retirement when signaler idles")
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Reviewed-by: Mika Kuoppala <mika.kuoppala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20200206204915.2636606-1-chris@chris-wilson.co.uk
drivers/gpu/drm/i915/gt/intel_breadcrumbs.c
drivers/gpu/drm/i915/gt/intel_gt_requests.c