summaryrefslogtreecommitdiff
path: root/lib/media_fill.c
diff options
context:
space:
mode:
authorKatarzyna Dec <katarzyna.dec@intel.com>2019-07-15 14:51:33 -0700
committerKatarzyna Dec <katarzyna.dec@intel.com>2019-09-18 18:45:45 +0200
commit63e30122cadaf2798ae2bd44a56cee81a27fbc40 (patch)
tree33b36bf9caa94dd5412faf87ccd529ce5924e158 /lib/media_fill.c
parent51b0f1ed696d5611a2bff149e3701c4deb1b5416 (diff)
lib/media_fill/tgl: Implement media_fillfunc for TGL
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> Reviewed-by: Arkadiusz Hiler <arkadiusz.hiler@intel.com>
Diffstat (limited to 'lib/media_fill.c')
-rw-r--r--lib/media_fill.c25
1 files changed, 25 insertions, 0 deletions
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));
+}