On Thu, Nov 05, 2020 at 05:18:42PM -0800, Daniele Ceraolo Spurio wrote:
> From: Venkata Sandeep Dhanalakota <[email protected]>
> 
> SFC capability of video engines is not set correctly because i915
> is testing for incorrect bits.
> 
> Fixes: c5d3e39caa45 ("drm/i915: Engine discovery query")
> Cc: Matt Roper <[email protected]>
> Cc: Tvrtko Ursulin <[email protected]>
> Signed-off-by: Venkata Sandeep Dhanalakota <[email protected]>
> Signed-off-by: Daniele Ceraolo Spurio <[email protected]>

Yeah, engine->mask (aka BIT(engine->id)) would reflect the engine's
position in the overall engine list, whereas what we really want here is
to just identify which specific VDBOX instance we're dealing with.  Your
change here matches how the field is used through the rest of the code.

Reviewed-by: Matt Roper <[email protected]>

> ---
>  drivers/gpu/drm/i915/gt/intel_engine_cs.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/gpu/drm/i915/gt/intel_engine_cs.c 
> b/drivers/gpu/drm/i915/gt/intel_engine_cs.c
> index 3fb52fac0d5d..0b31670343f5 100644
> --- a/drivers/gpu/drm/i915/gt/intel_engine_cs.c
> +++ b/drivers/gpu/drm/i915/gt/intel_engine_cs.c
> @@ -372,7 +372,8 @@ static void __setup_engine_capabilities(struct 
> intel_engine_cs *engine)
>                * instances.
>                */
>               if ((INTEL_GEN(i915) >= 11 &&
> -                  engine->gt->info.vdbox_sfc_access & engine->mask) ||
> +                  (engine->gt->info.vdbox_sfc_access &
> +                   BIT(engine->instance))) ||
>                   (INTEL_GEN(i915) >= 9 && engine->instance == 0))
>                       engine->uabi_capabilities |=
>                               I915_VIDEO_AND_ENHANCE_CLASS_CAPABILITY_SFC;
> -- 
> 2.24.1
> 

-- 
Matt Roper
Graphics Software Engineer
VTT-OSGC Platform Enablement
Intel Corporation
(916) 356-2795
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

Reply via email to