[igt-dev] [PATCH i-g-t 2/2] lib/i915_crc: Use graphics version to determine ALU SHL/SHR caps

Zbigniew Kempczyński zbigniew.kempczynski at intel.com
Thu Feb 2 08:38:57 UTC 2023


On Wed, Feb 01, 2023 at 04:44:41PM +0100, Kamil Konieczny wrote:
> On 2023-02-01 at 14:26:57 +0100, Zbigniew Kempczyński wrote:
> > Start supporting crc calculations on platforms which contains necessary
> > ALU instructions.
> 
> Something to consider in future: maybe we can add to i915 library new
> function has_alu_shl_shr(devid) ?

Thank you for the review. I pushed the series.

Regarding has_alu_shl_shr() - I think it is worth to add if there will
be more users of it. At the moment only crc calculation uses this.

--
Zbigniew

> 
> > 
> > Signed-off-by: Zbigniew Kempczyński <zbigniew.kempczynski at intel.com>
> > Cc: Kamil Konieczny <kamil.konieczny at linux.intel.com>
> 
> Reviewed-by: Kamil Konieczny <kamil.konieczny at linux.intel.com>
> 
> --
> Kamil
> 
> > ---
> >  lib/i915/i915_crc.c | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> > 
> > diff --git a/lib/i915/i915_crc.c b/lib/i915/i915_crc.c
> > index cdd3cef6df..7d68f8e5c4 100644
> > --- a/lib/i915/i915_crc.c
> > +++ b/lib/i915/i915_crc.c
> > @@ -295,5 +295,5 @@ bool supports_i915_crc32(int i915)
> >  {
> >  	uint16_t devid = intel_get_drm_devid(i915);
> >  
> > -	return IS_DG2(devid);
> > +	return intel_graphics_ver(devid) > IP_VER(12, 50);
> >  }
> > -- 
> > 2.34.1
> > 


More information about the igt-dev mailing list