summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/i915/selftests/intel_workarounds.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/gpu/drm/i915/selftests/intel_workarounds.c')
-rw-r--r--drivers/gpu/drm/i915/selftests/intel_workarounds.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/gpu/drm/i915/selftests/intel_workarounds.c b/drivers/gpu/drm/i915/selftests/intel_workarounds.c
index 0d39b3bf0c0d..d1a0923d2f38 100644
--- a/drivers/gpu/drm/i915/selftests/intel_workarounds.c
+++ b/drivers/gpu/drm/i915/selftests/intel_workarounds.c
@@ -44,7 +44,9 @@ read_nonprivs(struct i915_gem_context *ctx, struct intel_engine_cs *engine)
if (err)
goto err_obj;
+ intel_runtime_pm_get(engine->i915);
rq = i915_request_alloc(engine, ctx);
+ intel_runtime_pm_put(engine->i915);
if (IS_ERR(rq)) {
err = PTR_ERR(rq);
goto err_pin;
@@ -175,7 +177,10 @@ static int switch_to_scratch_context(struct intel_engine_cs *engine)
if (IS_ERR(ctx))
return PTR_ERR(ctx);
+ intel_runtime_pm_get(engine->i915);
rq = i915_request_alloc(engine, ctx);
+ intel_runtime_pm_put(engine->i915);
+
kernel_context_close(ctx);
if (IS_ERR(rq))
return PTR_ERR(rq);