Skip to content

Commit

Permalink
drm/i915/selftests: Wake the device before executing requests on the GPU
Browse files Browse the repository at this point in the history
To execute a requests requires us to have first woken the device, using
the rpm wakeref (as the request needs to write to hardware to setup the
context/ppGTT and execute on the GPU). So call intel_runtime_pm_get()
around queuing the request; the request itself will then carry a wakeref
until completion.

References: https://bugs.freedesktop.org/show_bug.cgi?id=103994
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Cc: Matthew Auld <matthew.auld@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20171130094231.10405-1-chris@chris-wilson.co.uk
Reviewed-by: Mika Kuoppala <mika.kuoppala@linux.intel.com>
  • Loading branch information
Chris Wilson committed Dec 1, 2017
1 parent b5e0a94 commit b37aef5
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions drivers/gpu/drm/i915/selftests/i915_gem_context.c
Original file line number Diff line number Diff line change
Expand Up @@ -376,7 +376,9 @@ static int igt_ctx_exec(void *arg)
}
}

intel_runtime_pm_get(i915);
err = gpu_fill(obj, ctx, engine, dw);
intel_runtime_pm_put(i915);
if (err) {
pr_err("Failed to fill dword %lu [%lu/%lu] with gpu (%s) in ctx %u [full-ppgtt? %s], err=%d\n",
ndwords, dw, max_dwords(obj),
Expand Down

0 comments on commit b37aef5

Please sign in to comment.