drm/i915/gt: Wait for RCUs frees before asserting idle on unload
authorChris Wilson <chris@chris-wilson.co.uk>
Thu, 12 Mar 2020 11:53:07 +0000 (11:53 +0000)
committerChris Wilson <chris@chris-wilson.co.uk>
Thu, 12 Mar 2020 20:47:24 +0000 (20:47 +0000)
commit22ca8a452e5791c9721e1ba61e95651fc00a9e4d
tree953585168e57acde72c5e3496d13db44f19cd53e
parentc46c320c02d041cb793f22550d4fc5a03d209205
drm/i915/gt: Wait for RCUs frees before asserting idle on unload

During driver unload, we have many asserts that we have released our
bookkeeping structs and are idle. In some cases, these struct are
protected by RCU and we do not release them until after an RCU grace
period.

Reported-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Fixes: 130a95e9098e ("drm/i915/gem: Consolidate ctx->engines[] release")
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Cc: Mika Kuoppala <mika.kuoppala@linux.intel.com>
Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Reviewed-by: Mika Kuoppala <mika.kuoppala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20200312115307.16460-1-chris@chris-wilson.co.uk
drivers/gpu/drm/i915/gem/i915_gem_context.c
drivers/gpu/drm/i915/gt/intel_gt.c