From: "José Roberto de Souza" <jose.souza@intel.com>
To: igt-dev@lists.freedesktop.org
Cc: Rodrigo Vivi <rodrigo.vivi@intel.com>
Subject: [igt-dev] [PATCH i-g-t 2/2] lib/gpgpu_fill: Implement gpgpu_fillfunc for Gen11
Date: Tue, 18 Sep 2018 12:30:44 -0700 [thread overview]
Message-ID: <20180918193044.26123-2-jose.souza@intel.com> (raw)
In-Reply-To: <20180918193044.26123-1-jose.souza@intel.com>
From: Katarzyna Dec <katarzyna.dec@intel.com>
Added gen11_gpgpu_fillfunc to have gpgpu_fill passing on Gen11.
Gpgpu shader was generated using IGA (Intel Graphics Assembler)
based on binary found in lib/gpgpu_fill.c to match the
changes in Gen11 HW:
Changed 'mul' instruction to 'shl' (since Gen11 'mul' does
not support integer values for both src and dest).
Changed SEND message descriptor (it should have length 2 not 3).
Cc: Lukasz Kalamarz <lukasz.kalamarz@intel.com>
Cc: Rodrigo Vivi <rodrigo.vivi@intel.com>
Tested-by: José Roberto de Souza <jose.souza@intel.com>
Signed-off-by: Katarzyna Dec <katarzyna.dec@intel.com>
Signed-off-by: Lukasz Kalamarz <lukasz.kalamarz@intel.com>
---
lib/gpgpu_fill.c | 23 +++++++++++++++++++++++
lib/gpgpu_fill.h | 7 +++++++
lib/intel_batchbuffer.c | 2 ++
3 files changed, 32 insertions(+)
diff --git a/lib/gpgpu_fill.c b/lib/gpgpu_fill.c
index a276e9d0..af2935ab 100644
--- a/lib/gpgpu_fill.c
+++ b/lib/gpgpu_fill.c
@@ -74,6 +74,19 @@ static const uint32_t gen9_gpgpu_kernel[][4] = {
{ 0x07800031, 0x20000a40, 0x06000e00, 0x82000010 },
};
+static const uint32_t gen11_gpgpu_kernel[][4] = {
+ { 0x00400001, 0x20202288, 0x00000020, 0x00000000 },
+ { 0x00000009, 0x20400208, 0x06000004, 0x00000004 },
+ { 0x00000001, 0x20440208, 0x00000018, 0x00000000 },
+ { 0x00600001, 0x20800208, 0x008d0000, 0x00000000 },
+ { 0x00200001, 0x20800208, 0x00450040, 0x00000000 },
+ { 0x00000001, 0x20880608, 0x00000000, 0x0000000f },
+ { 0x00800001, 0x20a00208, 0x00000020, 0x00000000 },
+ { 0x0c800031, 0x24000a40, 0x06000080, 0x040a8000 },
+ { 0x00600001, 0x2e000208, 0x008d0000, 0x00000000 },
+ { 0x07800031, 0x20000a40, 0x06000e00, 0x82000010 },
+};
+
/*
* This sets up the gpgpu pipeline,
*
@@ -259,3 +272,13 @@ void gen9_gpgpu_fillfunc(struct intel_batchbuffer *batch,
__gen9_gpgpu_fillfunc(batch, dst, x, y, width, height, color,
gen9_gpgpu_kernel, sizeof(gen9_gpgpu_kernel));
}
+
+void gen11_gpgpu_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_gpgpu_fillfunc(batch, dst, x, y, width, height, color,
+ gen11_gpgpu_kernel, sizeof(gen11_gpgpu_kernel));
+}
diff --git a/lib/gpgpu_fill.h b/lib/gpgpu_fill.h
index 40246d1a..e405df3e 100644
--- a/lib/gpgpu_fill.h
+++ b/lib/gpgpu_fill.h
@@ -50,4 +50,11 @@ gen9_gpgpu_fillfunc(struct intel_batchbuffer *batch,
unsigned int width, unsigned int height,
uint8_t color);
+void
+gen11_gpgpu_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);
+
#endif /* GPGPU_FILL_H */
diff --git a/lib/intel_batchbuffer.c b/lib/intel_batchbuffer.c
index abb07642..387404ff 100644
--- a/lib/intel_batchbuffer.c
+++ b/lib/intel_batchbuffer.c
@@ -889,6 +889,8 @@ igt_fillfunc_t igt_get_gpgpu_fillfunc(int devid)
fill = gen8_gpgpu_fillfunc;
else if (IS_GEN9(devid) || IS_GEN10(devid))
fill = gen9_gpgpu_fillfunc;
+ else if (IS_GEN11(devid))
+ fill = gen11_gpgpu_fillfunc;
return fill;
}
--
2.19.0
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev
next prev parent reply other threads:[~2018-09-18 19:30 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-09-18 19:30 [igt-dev] [PATCH i-g-t 1/2] lib: Reuse Gen9 mediafill on Gen11 José Roberto de Souza
2018-09-18 19:30 ` José Roberto de Souza [this message]
2018-09-19 7:24 ` [igt-dev] [PATCH i-g-t 2/2] lib/gpgpu_fill: Implement gpgpu_fillfunc for Gen11 Katarzyna Dec
2018-09-26 23:57 ` Rodrigo Vivi
2018-09-27 12:51 ` Joonas Lahtinen
2018-09-19 7:23 ` [igt-dev] [PATCH i-g-t 1/2] lib: Reuse Gen9 mediafill on Gen11 Katarzyna Dec
2018-09-19 9:53 ` [igt-dev] ✗ Fi.CI.BAT: failure for series starting with [i-g-t,1/2] " Patchwork
2018-09-20 23:24 ` [igt-dev] ✓ Fi.CI.BAT: success " Patchwork
2018-09-21 4:25 ` [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=20180918193044.26123-2-jose.souza@intel.com \
--to=jose.souza@intel.com \
--cc=igt-dev@lists.freedesktop.org \
--cc=rodrigo.vivi@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;
as well as URLs for NNTP newsgroup(s).