diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2019-12-29 19:31:49 +0100 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2019-12-30 15:04:57 +0100 |
commit | 45b152f752ea81935ff1f68d28b1914b8cfbe759 (patch) | |
tree | 9b5e35cf78d697d57f40d98fb49695128f211ca7 /drivers/gpu/drm/i915/gt/intel_engine_pm.c | |
parent | drm/i915/gt: Avoid using tag 0 for the very first submission (diff) | |
download | linux-45b152f752ea81935ff1f68d28b1914b8cfbe759.tar.xz linux-45b152f752ea81935ff1f68d28b1914b8cfbe759.zip |
drm/i915/gt: Avoid using the GPU before initialisation
Mark the GT as wedged so that we are not tempted to use it prior to
initialisation.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Andi Shyti <andi.shyti@intel.com>
Reviewed-by: Matthew Auld <matthew.auld@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20191229183153.3719869-3-chris@chris-wilson.co.uk
Diffstat (limited to 'drivers/gpu/drm/i915/gt/intel_engine_pm.c')
-rw-r--r-- | drivers/gpu/drm/i915/gt/intel_engine_pm.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/gpu/drm/i915/gt/intel_engine_pm.c b/drivers/gpu/drm/i915/gt/intel_engine_pm.c index 010620b78202..cd82f0baef49 100644 --- a/drivers/gpu/drm/i915/gt/intel_engine_pm.c +++ b/drivers/gpu/drm/i915/gt/intel_engine_pm.c @@ -123,16 +123,16 @@ static bool switch_to_kernel_context(struct intel_engine_cs *engine) unsigned long flags; bool result = true; + /* GPU is pointing to the void, as good as in the kernel context. */ + if (intel_gt_is_wedged(engine->gt)) + return true; + GEM_BUG_ON(!intel_context_is_barrier(ce)); /* Already inside the kernel context, safe to power down. */ if (engine->wakeref_serial == engine->serial) return true; - /* GPU is pointing to the void, as good as in the kernel context. */ - if (intel_gt_is_wedged(engine->gt)) - return true; - /* * Note, we do this without taking the timeline->mutex. We cannot * as we may be called while retiring the kernel context and so |