[Intel-gfx] [PATCH] drm/i915/selftests: Wake the device before executing requests on the GPU
Mika Kuoppala
mika.kuoppala at linux.intel.com
Fri Dec 1 10:40:24 UTC 2017
Chris Wilson <chris at chris-wilson.co.uk> writes:
> 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 at chris-wilson.co.uk>
> Cc: Tvrtko Ursulin <tvrtko.ursulin at intel.com>
> Cc: Matthew Auld <matthew.auld at intel.com>
Reviewed-by: Mika Kuoppala <mika.kuoppala at linux.intel.com>
> ---
> drivers/gpu/drm/i915/selftests/i915_gem_context.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/drivers/gpu/drm/i915/selftests/i915_gem_context.c b/drivers/gpu/drm/i915/selftests/i915_gem_context.c
> index ec1eff739e01..56a803d11916 100644
> --- a/drivers/gpu/drm/i915/selftests/i915_gem_context.c
> +++ b/drivers/gpu/drm/i915/selftests/i915_gem_context.c
> @@ -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),
> --
> 2.15.0
>
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/intel-gfx
More information about the Intel-gfx
mailing list