[Intel-gfx] [PATCH v3 03/10] drm/i915: Treat kernel context as initialised

Chris Wilson chris at chris-wilson.co.uk
Thu May 26 11:51:45 UTC 2016


On Thu, May 26, 2016 at 09:52:33AM +0100, Chris Wilson wrote:
> diff --git a/drivers/gpu/drm/i915/intel_ringbuffer.c b/drivers/gpu/drm/i915/intel_ringbuffer.c
> index 4e0aa7e9d5da..203b7952052a 100644
> --- a/drivers/gpu/drm/i915/intel_ringbuffer.c
> +++ b/drivers/gpu/drm/i915/intel_ringbuffer.c
> @@ -2278,7 +2278,14 @@ static int intel_init_ring_buffer(struct drm_device *dev,
>  		if (ret)
>  			goto error;
>  
> -		ce->initialised = false;
> +		/* The kernel context is only used as a placeholder
> +		 * for flushing the active context. It is never used
> +		 * for submitting rendering and as such never requires
> +		 * the golden render context, and so we can skip
> +		 * emitting it when we switch to the kernel context
> +		 * (during eviction).
> +		 */
> +		ce->initialised = true;

This is really too much of a hack to live. So long as we avoid the
switch during suspend, we can let this patch drop.
-Chris

-- 
Chris Wilson, Intel Open Source Technology Centre


More information about the Intel-gfx mailing list