[Intel-gfx] [PATCH] drm/i915/guc: Delay GuC workqueue reservation

Chris Wilson chris at chris-wilson.co.uk
Thu Oct 6 13:25:45 UTC 2016


On Thu, Oct 06, 2016 at 03:14:19PM +0200, Michał Winiarski wrote:
> We're reserving space in the workqueue early during request allocation.
> This can be problematic if we get interrupted later in the process,
> because we can end up in a state where GuC workqueue is seemingly full,
> while the HW is idle and no work has been submitted.
> Let's delay the reservation to avoid such scenario.
> 
> Testcase: igt/gem_ringfill/*-interruptible
> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=97978
> Cc: Michel Thierry <michel.thierry at intel.com>
> Cc: Jeff Mcgee <jeff.mcgee at intel.com>
> Signed-off-by: Michał Winiarski <michal.winiarski at intel.com>
> ---
>  drivers/gpu/drm/i915/i915_gem_execbuffer.c | 11 +++++++++++
>  drivers/gpu/drm/i915/intel_lrc.c           | 11 -----------
>  2 files changed, 11 insertions(+), 11 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/i915_gem_execbuffer.c b/drivers/gpu/drm/i915/i915_gem_execbuffer.c
> index e88786e..37204db 100644
> --- a/drivers/gpu/drm/i915/i915_gem_execbuffer.c
> +++ b/drivers/gpu/drm/i915/i915_gem_execbuffer.c
> @@ -1529,6 +1529,17 @@ execbuf_submit(struct i915_execbuffer_params *params,
>  	if (ret)
>  		return ret;
>  
> +	if (i915.enable_guc_submission) {

No. This logic does not deserve to be at this level. Please try fixing
the underlying problem, which would be that we don't cancel the reserved
space.
-Chris

-- 
Chris Wilson, Intel Open Source Technology Centre


More information about the Intel-gfx mailing list