[igt-dev] [PATCH i-g-t v2 3/4] lib/xe/xe_compute: use registers defs from intel_gpu_commands.h
Mauro Carvalho Chehab
mauro.chehab at linux.intel.com
Tue Apr 4 07:38:34 UTC 2023
From: Mauro Carvalho Chehab <mchehab at kernel.org>
There are some register definitions that are already defined inside
intel_gpu_commands.h with a different concept.
Change the code to re-use the definitions there.
Reviewed-by: Zbigniew Kempczyński <zbigniew.kempczynski at intel.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab at kernel.org>
---
lib/xe/xe_compute.c | 17 ++++-------------
1 file changed, 4 insertions(+), 13 deletions(-)
diff --git a/lib/xe/xe_compute.c b/lib/xe/xe_compute.c
index fb11b8bc7770..2a3686a1bee6 100644
--- a/lib/xe/xe_compute.c
+++ b/lib/xe/xe_compute.c
@@ -33,15 +33,6 @@
#define OFFSET_INDIRECT_DATA_START 0xFFFDF000
#define OFFSET_KERNEL 0xFFFEF000
-#undef MEDIA_VFE_STATE
-#define MEDIA_VFE_STATE 0x70000007
-#undef STATE_BASE_ADDRESS
-#define STATE_BASE_ADDRESS 0x61010014
-#undef MEDIA_INTERFACE_DESCRIPTOR_LOAD
-#define MEDIA_INTERFACE_DESCRIPTOR_LOAD 0x70020002
-#undef GPGPU_WALKER
-#define GPGPU_WALKER 0x7105000d
-
struct bo_dict_entry {
uint64_t addr;
uint32_t size;
@@ -301,7 +292,7 @@ static void tgllp_compute_exec_compute(uint32_t *addr_bo_buffer_batch,
addr_bo_buffer_batch[b++] = 0x00000000;
addr_bo_buffer_batch[b++] = 0x00000000;
addr_bo_buffer_batch[b++] = 0x00000000;
- addr_bo_buffer_batch[b++] = MEDIA_VFE_STATE;
+ addr_bo_buffer_batch[b++] = MEDIA_VFE_STATE | (9 - 2);
addr_bo_buffer_batch[b++] = 0x00000000;
addr_bo_buffer_batch[b++] = 0x00000000;
addr_bo_buffer_batch[b++] = 0x00A70100;
@@ -316,7 +307,7 @@ static void tgllp_compute_exec_compute(uint32_t *addr_bo_buffer_batch,
addr_bo_buffer_batch[b++] = 0x00000000;
addr_bo_buffer_batch[b++] = 0x00000000;
addr_bo_buffer_batch[b++] = 0x00000000;
- addr_bo_buffer_batch[b++] = STATE_BASE_ADDRESS;
+ addr_bo_buffer_batch[b++] = STATE_BASE_ADDRESS | (16 - 2);
addr_bo_buffer_batch[b++] = 0x00000001;
addr_bo_buffer_batch[b++] = 0x00000000;
addr_bo_buffer_batch[b++] = 0x00040000;
@@ -352,11 +343,11 @@ static void tgllp_compute_exec_compute(uint32_t *addr_bo_buffer_batch,
addr_bo_buffer_batch[b++] = 0x00000000;
addr_bo_buffer_batch[b++] = MEDIA_STATE_FLUSH;
addr_bo_buffer_batch[b++] = 0x00000000;
- addr_bo_buffer_batch[b++] = MEDIA_INTERFACE_DESCRIPTOR_LOAD;
+ addr_bo_buffer_batch[b++] = MEDIA_INTERFACE_DESCRIPTOR_LOAD | (4 - 2);
addr_bo_buffer_batch[b++] = 0x00000000;
addr_bo_buffer_batch[b++] = 0x00000020;
addr_bo_buffer_batch[b++] = 0x00000000;
- addr_bo_buffer_batch[b++] = GPGPU_WALKER;
+ addr_bo_buffer_batch[b++] = GPGPU_WALKER | 13;
addr_bo_buffer_batch[b++] = 0x00000000;
addr_bo_buffer_batch[b++] = 0x00000c80;
addr_bo_buffer_batch[b++] = offset_indirect_data_start;
--
2.39.2
More information about the igt-dev
mailing list