From: Katarzyna Dec <katarzyna.dec@intel.com>
To: Ashutosh Dixit <ashutosh.dixit@intel.com>
Cc: igt-dev@lists.freedesktop.org,
Lucas De Marchi <lucas.demarchi@intel.com>
Subject: Re: [igt-dev] [PATCH i-g-t 2/3] lib/media_fill/tgl: Implement media_fillfunc for TGL
Date: Wed, 18 Sep 2019 10:24:12 +0200 [thread overview]
Message-ID: <20190918082412.GJ25026@kdec5-desk.ger.corp.intel.com> (raw)
In-Reply-To: <87ef0e2ogl.wl-ashutosh.dixit@intel.com>
On Tue, Sep 17, 2019 at 09:55:06PM -0700, Ashutosh Dixit wrote:
> Once again, please fix up one checkpatch CHECK below.
>
> On Tue, 17 Sep 2019 02:13:52 -0700, Katarzyna Dec wrote:
> >
> > Adding gen12_media_fillfunc to have media_fill running on TGL.
> > Media shader was generated using IGA (Intel Graphics Assembler)
> > based on binary found in lib/media_fill_gen9.c to match the
> > changes in TGL HW. Main change was made in SEND instructions
> > and adding SWSB dependencies.
> >
> > v2: Switched to GEN_12.
> >
> > Cc: Antonio Argenziano <antonio.argenziano@intel.com>
> > Cc: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com>
> > Signed-off-by: Katarzyna Dec <katarzyna.dec@intel.com>
> > Signed-off-by: Lukasz Kalamarz <lukasz.kalamarz@intel.com>
> > Signed-off-by: Zbigniew Kempczyński <zbigniew.kempczynski@intel.com>
> > Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com>
> > ---
> > lib/i915/shaders/media/gen12_media_kernel.asm | 13 ++++++++++
> > lib/intel_batchbuffer.c | 4 ++-
> > lib/media_fill.c | 25 +++++++++++++++++++
> > lib/media_fill.h | 7 ++++++
> > 4 files changed, 48 insertions(+), 1 deletion(-)
> > create mode 100644 lib/i915/shaders/media/gen12_media_kernel.asm
> >
> > diff --git a/lib/i915/shaders/media/gen12_media_kernel.asm b/lib/i915/shaders/media/gen12_media_kernel.asm
> > new file mode 100644
> > index 00000000..5be229b2
> > --- /dev/null
> > +++ b/lib/i915/shaders/media/gen12_media_kernel.asm
> > @@ -0,0 +1,13 @@
> > +L0:
> > + mov (4|M0) r1.0<1>:ub r1.0<0;1,0>:ub
> > + mov (8|M0) r4.0<1>:ud r0.0<8;8,1>:ud
> > + mov (8|M0) r4.0<1>:ud r2.0<2;2,1>:ud
> > + mov (1|M0) r4.2<1>:ud 0xF000F:ud
> > + mov (16|M0) r5.0<1>:ud r1.0<0;1,0>:ud {@4}
> > + mov (16|M0) r7.0<1>:ud r1.0<0;1,0>:ud {@5}
> > + mov (16|M0) r9.0<1>:ud r1.0<0;1,0>:ud {@6}
> > + mov (16|M0) r11.0<1>:ud r1.0<0;1,0>:ud {@7}
> > + send.dc1 (16|M0) null r4 null 0x10000000 0x120A8000 {@1, $0} // wr:9h+0, rd:0, Media Block Write msc:0, to #0
> > + mov (8|M0) r112.0<1>:ud r0.0<8;8,1>:ud
> > + send.ts (16|M0) null r112 null 0x10000000 0x2000010 {EOT, @1} // wr:1+0, rd:0, fc: 0x10
> > +L176:
> > diff --git a/lib/intel_batchbuffer.c b/lib/intel_batchbuffer.c
> > index 269c8982..9292236b 100644
> > --- a/lib/intel_batchbuffer.c
> > +++ b/lib/intel_batchbuffer.c
> > @@ -861,7 +861,9 @@ igt_fillfunc_t igt_get_media_fillfunc(int devid)
> > {
> > igt_fillfunc_t fill = NULL;
> >
> > - if (IS_GEN9(devid) || IS_GEN10(devid) || IS_GEN11(devid))
> > + if (IS_GEN12(devid))
> > + fill = gen12_media_fillfunc;
> > + else if (IS_GEN9(devid) || IS_GEN10(devid) || IS_GEN11(devid))
> > fill = gen9_media_fillfunc;
> > else if (IS_GEN8(devid))
> > fill = gen8_media_fillfunc;
> > diff --git a/lib/media_fill.c b/lib/media_fill.c
> > index 03b5e71e..b7d7f68c 100644
> > --- a/lib/media_fill.c
> > +++ b/lib/media_fill.c
> > @@ -101,6 +101,20 @@ static const uint32_t gen11_media_vme_kernel[][4] = {
> > { 0x00000000, 0x00000000, 0x00000000, 0x00000000 },
> > };
> >
> > +static const uint32_t gen12_media_kernel[][4] = {
> > + { 0x00020061, 0x01050000, 0x00000104, 0x00000000 },
> > + { 0x00030061, 0x04050220, 0x00460005, 0x00000000 },
> > + { 0x00030061, 0x04050220, 0x00220205, 0x00000000 },
> > + { 0x00000061, 0x04454220, 0x00000000, 0x000f000f },
> > + { 0x00040461, 0x05050220, 0x00000104, 0x00000000 },
> > + { 0x00040561, 0x07050220, 0x00000104, 0x00000000 },
> > + { 0x00040661, 0x09050220, 0x00000104, 0x00000000 },
> > + { 0x00040761, 0x0b050220, 0x00000104, 0x00000000 },
> > + { 0x00049031, 0x00000000, 0xc000044c, 0x12a00000 },
> > + { 0x00030061, 0x70050220, 0x00460005, 0x00000000 },
> > + { 0x00040131, 0x00000004, 0x7020700c, 0x10000000 },
> > +};
> > +
> > /*
> > * This sets up the media pipeline,
> > *
> > @@ -355,3 +369,14 @@ gen11_media_vme_func(struct intel_batchbuffer *batch,
> > gen11_media_vme_kernel,
> > sizeof(gen11_media_vme_kernel));
> > }
> > +
> > +void
> > +gen12_media_fillfunc(struct intel_batchbuffer *batch,
> > + const struct igt_buf *dst,
> > + unsigned int x, unsigned int y,
> > + unsigned int width, unsigned int height,
> > + uint8_t color)
> > +{
> > + __gen9_media_fillfunc(batch, dst, x, y, width, height, color,
> > + gen12_media_kernel, sizeof(gen12_media_kernel));
> > +}
> > diff --git a/lib/media_fill.h b/lib/media_fill.h
> > index 1d5c5fa8..a65ae9e8 100644
> > --- a/lib/media_fill.h
> > +++ b/lib/media_fill.h
> > @@ -55,4 +55,11 @@ gen11_media_vme_func(struct intel_batchbuffer *batch,
> > unsigned int width, unsigned int height,
> > const struct igt_buf *dst);
> >
> > +void
> > +gen12_media_fillfunc(struct intel_batchbuffer *batch,
> > + const struct igt_buf *dst,
> > + unsigned int x, unsigned int y,
> > + unsigned int width, unsigned int height,
> > + uint8_t color);
> > +
>
> CHECK: Alignment should match open parenthesis
Ok, I will fix that.
Kasia
>
> > #endif /* RENDE_MEDIA_FILL_H */
> > --
> > 2.20.1
> >
> > _______________________________________________
> > igt-dev mailing list
> > igt-dev@lists.freedesktop.org
> > https://lists.freedesktop.org/mailman/listinfo/igt-dev
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev
next prev parent reply other threads:[~2019-09-18 8:24 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-09-17 9:13 [igt-dev] [PATCH i-g-t 0/3] Adding gpgpu_fill and media_fill on TGL Katarzyna Dec
2019-09-17 9:13 ` [igt-dev] [PATCH i-g-t 1/3] lib/gpgpu_fill/tgl: Implement gpgpu_fillfunc for TGL Katarzyna Dec
2019-09-18 4:51 ` Ashutosh Dixit
2019-09-18 4:56 ` Katarzyna Dec
2019-09-18 5:06 ` Ashutosh Dixit
2019-09-18 8:35 ` Katarzyna Dec
2019-09-17 9:13 ` [igt-dev] [PATCH i-g-t 2/3] lib/media_fill/tgl: Implement media_fillfunc " Katarzyna Dec
2019-09-18 4:55 ` Ashutosh Dixit
2019-09-18 8:24 ` Katarzyna Dec [this message]
2019-09-17 9:13 ` [igt-dev] [PATCH i-g-t 3/3] HAX: run gpgpu_fill and media_fill in BAT Katarzyna Dec
2019-09-18 5:27 ` Ashutosh Dixit
2019-09-18 7:31 ` Katarzyna Dec
2019-09-18 14:12 ` Arkadiusz Hiler
2019-09-17 10:01 ` [igt-dev] ✓ Fi.CI.BAT: success for Adding gpgpu_fill and media_fill on TGL Patchwork
2019-09-17 15:42 ` [igt-dev] ✓ Fi.CI.IGT: " Patchwork
2019-09-18 5:05 ` [igt-dev] [PATCH i-g-t 0/3] " Ashutosh Dixit
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20190918082412.GJ25026@kdec5-desk.ger.corp.intel.com \
--to=katarzyna.dec@intel.com \
--cc=ashutosh.dixit@intel.com \
--cc=igt-dev@lists.freedesktop.org \
--cc=lucas.demarchi@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox