[Intel-gfx] [PATCH] drm/i915: Set MI_INVALIDATE_BSD for all video-decode engines

Mika Kuoppala mika.kuoppala at linux.intel.com
Thu Nov 8 15:11:45 UTC 2018


Chris Wilson <chris at chris-wilson.co.uk> writes:

> We have multiple instances of VCS but only remember to invalidate the
> BSD caches on the first, ignoring the stale caches of any other engine.
>
> Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>
> Cc: Mika Kuoppala <mika.kuoppala at linux.intel.com>
> Cc: Tvrtko Ursulin <tvrtko.ursulin at intel.com>

Missing this prolly would have caused much hair pulling in future, so
nice catch.

Reviewed-by: Mika Kuoppala <mika.kuoppala at linux.intel.com>

Lets flush also the LLC for gen9+ on followup patch?
-Mika

> ---
>  drivers/gpu/drm/i915/intel_lrc.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/i915/intel_lrc.c b/drivers/gpu/drm/i915/intel_lrc.c
> index f7892ddb3f13..08fd9b12e4d7 100644
> --- a/drivers/gpu/drm/i915/intel_lrc.c
> +++ b/drivers/gpu/drm/i915/intel_lrc.c
> @@ -1956,7 +1956,7 @@ static int gen8_emit_flush(struct i915_request *request, u32 mode)
>  
>  	if (mode & EMIT_INVALIDATE) {
>  		cmd |= MI_INVALIDATE_TLB;
> -		if (request->engine->id == VCS)
> +		if (request->engine->class == VIDEO_DECODE_CLASS)
>  			cmd |= MI_INVALIDATE_BSD;
>  	}
>  
> -- 
> 2.19.1


More information about the Intel-gfx mailing list