[PATCH i-g-t 2/3] lib/intel_batchbuffer: Select xe2 rendercopy for LunarLake

Zbigniew Kempczyński zbigniew.kempczynski at intel.com
Wed Jan 10 12:02:54 UTC 2024


On Wed, Jan 10, 2024 at 11:25:18AM +0000, Matthew Auld wrote:
> Hi,
> 
> On Mon, 8 Jan 2024 at 11:36, Zbigniew Kempczyński
> <zbigniew.kempczynski at intel.com> wrote:
> >
> > Along with rendercopy xe2 pipeline / shader selection for LunarLake
> > reorganize if/else conditionals to handle specific selection first.
> >
> > Signed-off-by: Zbigniew Kempczyński <zbigniew.kempczynski at intel.com>
> > Cc: Juha-Pekka Heikkila <juhapekka.heikkila at gmail.com>
> > ---
> >  lib/intel_batchbuffer.c | 38 ++++++++++++++++++++------------------
> >  1 file changed, 20 insertions(+), 18 deletions(-)
> >
> > diff --git a/lib/intel_batchbuffer.c b/lib/intel_batchbuffer.c
> > index ccab55cec7..d374645d99 100644
> > --- a/lib/intel_batchbuffer.c
> > +++ b/lib/intel_batchbuffer.c
> > @@ -656,28 +656,30 @@ igt_render_copyfunc_t igt_get_render_copyfunc(int devid)
> >  {
> >         igt_render_copyfunc_t copy = NULL;
> >
> > -       if (IS_GEN2(devid))
> > -               copy = gen2_render_copyfunc;
> > -       else if (IS_GEN3(devid))
> > -               copy = gen3_render_copyfunc;
> > -       else if (IS_GEN4(devid) || IS_GEN5(devid))
> > -               copy = gen4_render_copyfunc;
> > -       else if (IS_GEN6(devid))
> > -               copy = gen6_render_copyfunc;
> > -       else if (IS_GEN7(devid))
> > -               copy = gen7_render_copyfunc;
> > -       else if (IS_GEN8(devid))
> > -               copy = gen8_render_copyfunc;
> > -       else if (IS_GEN9(devid) || IS_GEN10(devid))
> > -               copy = gen9_render_copyfunc;
> > -       else if (IS_GEN11(devid))
> > -               copy = gen11_render_copyfunc;
> > +       if (IS_METEORLAKE(devid))
> > +               copy = mtl_render_copyfunc;
> > +       else if (IS_LUNARLAKE(devid))
> > +               copy = genxe2_render_copyfunc;
> 
> This doesn't work with any xe2? Can we not make this conditional on
> graphics version == 20?

Agree, limiting to LNL will require unnecessary modification whereas
I can spread this to graphics version covering likely most ver20
platforms.

> 
> >         else if (HAS_FLATCCS(devid))
> >                 copy = gen12p71_render_copyfunc;
> 
> Should we not not make this a normal platform or graphics version
> check? This will also catch all xe2+ platforms that are not LNL, but
> have flat_ccs support. I think it is better to just return NULL for
> new platforms, that way we get a clear skip in tests using this
> instead of seeing job timeouts due to using the wrong shader/kernel.
> See VLK-54191 for example. What do you think?

Fully agree. Platform/version checking makes clear pipeline/shader
selection instead of relying on platform feature (flatccs) which
requires further digging is it supported or not.

Thanks for the review, I'm going to rearrange this if/else block.

--
Zbigniew

> 
> > -       else if (IS_METEORLAKE(devid))
> > -               copy = mtl_render_copyfunc;
> >         else if (IS_GEN12(devid))
> >                 copy = gen12_render_copyfunc;
> > +       else if (IS_GEN11(devid))
> > +               copy = gen11_render_copyfunc;
> > +       else if (IS_GEN9(devid) || IS_GEN10(devid))
> > +               copy = gen9_render_copyfunc;
> > +       else if (IS_GEN8(devid))
> > +               copy = gen8_render_copyfunc;
> > +       else if (IS_GEN7(devid))
> > +               copy = gen7_render_copyfunc;
> > +       else if (IS_GEN6(devid))
> > +               copy = gen6_render_copyfunc;
> > +       else if (IS_GEN4(devid) || IS_GEN5(devid))
> > +               copy = gen4_render_copyfunc;
> > +       else if (IS_GEN3(devid))
> > +               copy = gen3_render_copyfunc;
> > +       else if (IS_GEN2(devid))
> > +               copy = gen2_render_copyfunc;
> >
> >         return copy;
> >  }
> > --
> > 2.34.1
> >


More information about the igt-dev mailing list