diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2019-11-25 10:58:56 +0000 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2019-11-25 13:17:18 +0000 |
commit | de5825beae9a0ae51f14a92859c6ec916235cd4d (patch) | |
tree | 1b3c488c44960edddf75b7b7823839b806e0be01 /drivers/gpu/drm/i915/gt/selftest_mocs.c | |
parent | drm/i915/execlists: Fixup cancel_port_requests() (diff) | |
download | linux-dev-de5825beae9a0ae51f14a92859c6ec916235cd4d.tar.xz linux-dev-de5825beae9a0ae51f14a92859c6ec916235cd4d.zip |
drm/i915: Serialise with engine-pm around requests on the kernel_context
As the engine->kernel_context is used within the engine-pm barrier, we
have to be careful when emitting requests outside of the barrier, as the
strict timeline locking rules do not apply. Instead, we must ensure the
engine_park() cannot be entered as we build the request, which is
simplest by taking an explicit engine-pm wakeref around the request
construction.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20191125105858.1718307-1-chris@chris-wilson.co.uk
Diffstat (limited to 'drivers/gpu/drm/i915/gt/selftest_mocs.c')
-rw-r--r-- | drivers/gpu/drm/i915/gt/selftest_mocs.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/gpu/drm/i915/gt/selftest_mocs.c b/drivers/gpu/drm/i915/gt/selftest_mocs.c index a34d4fb52fa1..de010f527757 100644 --- a/drivers/gpu/drm/i915/gt/selftest_mocs.c +++ b/drivers/gpu/drm/i915/gt/selftest_mocs.c @@ -261,7 +261,9 @@ static int live_mocs_kernel(void *arg) return err; for_each_engine(engine, gt, id) { + intel_engine_pm_get(engine); err = check_mocs_engine(&mocs, engine->kernel_context); + intel_engine_pm_put(engine); if (err) break; } |