From: "Zbigniew Kempczyński" <zbigniew.kempczynski@intel.com>
To: igt-dev@lists.freedesktop.org
Subject: [igt-dev] [PATCH i-g-t 1/2] lib/gpgpu_fill/xehpc: Adjust gpgpu_fillfunc for PVC
Date: Mon, 29 May 2023 18:54:16 +0200 [thread overview]
Message-ID: <20230529165417.347129-2-zbigniew.kempczynski@intel.com> (raw)
In-Reply-To: <20230529165417.347129-1-zbigniew.kempczynski@intel.com>
From: Dominik Grzegorzek <dominik.grzegorzek@intel.com>
gpgpu_fillfunc for XEHPSDV can be reused for PVC with minor changes.
PVC COMPUTE_WALKER instruction has additional restriction. Message
SIMD(dw4:17) has to be equal to Thread SIMD.(SIMD16 in our case).
PVC also required a kernel recompilation.
Signed-off-by: Dominik Grzegorzek <dominik.grzegorzek@intel.com>
Signed-off-by: Zbigniew Kempczyński <zbigniew.kempczynski@intel.com>
Cc: Christoph Manszewski <christoph.manszewski@intel.com>
Cc: Kamil Konieczny <kamil.konieczny@linux.intel.com>
---
lib/gpgpu_fill.c | 23 +++++++++++++++++++
lib/gpgpu_fill.h | 8 +++++++
lib/gpu_cmds.c | 3 ++-
.../shaders/gpgpu/gen12p72_gpgpu_kernel.asm | 12 ++++++++++
lib/intel_batchbuffer.c | 4 +++-
5 files changed, 48 insertions(+), 2 deletions(-)
create mode 100644 lib/i915/shaders/gpgpu/gen12p72_gpgpu_kernel.asm
diff --git a/lib/gpgpu_fill.c b/lib/gpgpu_fill.c
index 4db8775145..d854fbf7a0 100644
--- a/lib/gpgpu_fill.c
+++ b/lib/gpgpu_fill.c
@@ -112,6 +112,18 @@ static const uint32_t xehp_gpgpu_kernel[][4] = {
{ 0x00030031, 0x00000004, 0x3000500c, 0x00000000 },
};
+static const uint32_t xehpc_gpgpu_kernel[][4] = {
+ { 0x00080061, 0x01050000, 0x00000104, 0x00000000 },
+ { 0x00000069, 0x02058220, 0x02000014, 0x00000004 },
+ { 0x00000061, 0x02150220, 0x00000064, 0x00000000 },
+ { 0x000c0061, 0x04050220, 0x00460005, 0x00000000 },
+ { 0x00041a61, 0x04050220, 0x00220205, 0x00000000 },
+ { 0x00000061, 0x04254220, 0x00000000, 0x0000000f },
+ { 0x00101e61, 0x05050220, 0x00000104, 0x00000000 },
+ { 0x00132031, 0x00000000, 0xc0000414, 0x02a00000 },
+ { 0x000c0031, 0x00000004, 0x3000500c, 0x00000000 },
+};
+
/*
* This sets up the gpgpu pipeline,
*
@@ -377,3 +389,14 @@ void xehp_gpgpu_fillfunc(int i915,
xehp_gpgpu_kernel,
sizeof(xehp_gpgpu_kernel));
}
+
+void xehpc_gpgpu_fillfunc(int i915,
+ struct intel_buf *buf,
+ unsigned int x, unsigned int y,
+ unsigned int width, unsigned int height,
+ uint8_t color)
+{
+ __xehp_gpgpu_fillfunc(i915, buf, x, y, width, height, color,
+ xehpc_gpgpu_kernel,
+ sizeof(xehpc_gpgpu_kernel));
+}
diff --git a/lib/gpgpu_fill.h b/lib/gpgpu_fill.h
index 3d199acd63..f81cd0b53c 100644
--- a/lib/gpgpu_fill.h
+++ b/lib/gpgpu_fill.h
@@ -67,4 +67,12 @@ xehp_gpgpu_fillfunc(int i915,
unsigned int x, unsigned int y,
unsigned int width, unsigned int height,
uint8_t color);
+
+void
+xehpc_gpgpu_fillfunc(int i915,
+ struct intel_buf *dst,
+ unsigned int x, unsigned int y,
+ unsigned int width, unsigned int height,
+ uint8_t color);
+
#endif /* GPGPU_FILL_H */
diff --git a/lib/gpu_cmds.c b/lib/gpu_cmds.c
index afb26d2990..1f321ae4a0 100644
--- a/lib/gpu_cmds.c
+++ b/lib/gpu_cmds.c
@@ -975,7 +975,8 @@ xehp_emit_compute_walk(struct intel_bb *ibb,
intel_bb_out(ibb, 0); /* indirect data offset */ //dw3
/* SIMD size */
- intel_bb_out(ibb, 1 << 30 | 1 << 25); /* SIMD16 | enable inline */ //dw4
+ /* SIMD16 | enable inline | Message SIMD16 */
+ intel_bb_out(ibb, 1 << 30 | 1 << 25 | 1 << 17); //dw4
/* Execution mask */
intel_bb_out(ibb, 0xffffffff); //dw5
diff --git a/lib/i915/shaders/gpgpu/gen12p72_gpgpu_kernel.asm b/lib/i915/shaders/gpgpu/gen12p72_gpgpu_kernel.asm
new file mode 100644
index 0000000000..52699a475e
--- /dev/null
+++ b/lib/i915/shaders/gpgpu/gen12p72_gpgpu_kernel.asm
@@ -0,0 +1,12 @@
+L0:
+ mov (4|M0) r1.0<1>:ub r1.0<0;1,0>:ub
+ shl (1|M0) r2.0<1>:ud r0.1<0;1,0>:ud 0x4:ud
+ mov (1|M0) r2.1<1>:ud r0.6<0;1,0>:ud
+ mov (8|M0) r4.0<1>:ud r0.0<8;8,1>:ud
+ mov (2|M0) r4.0<1>:ud r2.0<2;2,1>:ud {I@2}
+ mov (1|M0) r4.2<1>:ud 0xF:ud
+ mov (16|M0) r5.0<1>:ud r1.0<0;1,0>:ud {I@6}
+(W) sync.nop null {I@1}
+ send.dc1 (16|M0) null r4 null:0 0x0 0x40A8000 {$0} // wr:2h+0, rd:0, Media Block Write msc:0, to #0
+ send.gtwy (8|M0) null r80 null:0 0x0 0x02000000 {EOT}
+L176:
diff --git a/lib/intel_batchbuffer.c b/lib/intel_batchbuffer.c
index dfccc4f4ac..9f65536173 100644
--- a/lib/intel_batchbuffer.c
+++ b/lib/intel_batchbuffer.c
@@ -755,7 +755,9 @@ igt_fillfunc_t igt_get_gpgpu_fillfunc(int devid)
{
igt_fillfunc_t fill = NULL;
- if (intel_graphics_ver(devid) >= IP_VER(12, 50))
+ if (intel_graphics_ver(devid) >= IP_VER(12, 60))
+ fill = xehpc_gpgpu_fillfunc;
+ else if (intel_graphics_ver(devid) >= IP_VER(12, 50))
fill = xehp_gpgpu_fillfunc;
else if (IS_GEN12(devid))
fill = gen12_gpgpu_fillfunc;
--
2.34.1
next prev parent reply other threads:[~2023-05-29 16:54 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-05-29 16:54 [igt-dev] [PATCH i-g-t 0/2] Add PVC support for gpgpu fill Zbigniew Kempczyński
2023-05-29 16:54 ` Zbigniew Kempczyński [this message]
2023-05-30 14:53 ` [igt-dev] [PATCH i-g-t 1/2] lib/gpgpu_fill/xehpc: Adjust gpgpu_fillfunc for PVC Manszewski, Christoph
2023-05-30 16:49 ` Zbigniew Kempczyński
2023-05-29 16:54 ` [igt-dev] [PATCH i-g-t 2/2] lib/intel_batchbuffer: Use COMPUTE instead RENDER engine for Xe on PVC Zbigniew Kempczyński
2023-05-30 7:13 ` Manszewski, Christoph
2023-05-30 12:25 ` Zbigniew Kempczyński
2023-05-30 14:50 ` Manszewski, Christoph
2023-05-30 16:50 ` Zbigniew Kempczyński
2023-05-30 15:29 ` [igt-dev] ✓ Fi.CI.BAT: success for Add PVC support for gpgpu fill Patchwork
2023-05-31 9:54 ` [igt-dev] ✓ Fi.CI.IGT: " Patchwork
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=20230529165417.347129-2-zbigniew.kempczynski@intel.com \
--to=zbigniew.kempczynski@intel.com \
--cc=igt-dev@lists.freedesktop.org \
/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