From: Mauro Carvalho Chehab <mauro.chehab@linux.intel.com>
To: igt-dev@lists.freedesktop.org
Subject: [igt-dev] [PATCH i-g-t 3/5] lib/xe/xe_compute: use registers defs from intel_gpu_commands.h
Date: Mon, 27 Mar 2023 15:41:17 +0200 [thread overview]
Message-ID: <20230327134119.2429388-4-mauro.chehab@linux.intel.com> (raw)
In-Reply-To: <20230327134119.2429388-1-mauro.chehab@linux.intel.com>
From: Mauro Carvalho Chehab <mchehab@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.
Signed-off-by: Mauro Carvalho Chehab <mchehab@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 7259b888eb9e..9e50eba1b87b 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
next prev parent reply other threads:[~2023-03-27 13:41 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-03-27 13:41 [igt-dev] [PATCH i-g-t 0/5] Make xe_compute test more generic Mauro Carvalho Chehab
2023-03-27 13:41 ` [igt-dev] [PATCH i-g-t 1/5] compute_square_kernel.cl: add CL file used at xe_compute.c Mauro Carvalho Chehab
2023-04-03 10:45 ` Zbigniew Kempczyński
2023-03-27 13:41 ` [igt-dev] [PATCH i-g-t 2/5] xe/xe_compute: place OpenCL kernel on a separate file Mauro Carvalho Chehab
2023-04-03 10:49 ` Zbigniew Kempczyński
2023-03-27 13:41 ` Mauro Carvalho Chehab [this message]
2023-04-03 10:50 ` [igt-dev] [PATCH i-g-t 3/5] lib/xe/xe_compute: use registers defs from intel_gpu_commands.h Zbigniew Kempczyński
2023-03-27 13:41 ` [igt-dev] [PATCH i-g-t 4/5] gen_opencl_kernel: add script to dynamically create OpenCL kernels Mauro Carvalho Chehab
2023-04-03 10:58 ` Zbigniew Kempczyński
2023-04-04 6:07 ` Mauro Carvalho Chehab
2023-03-27 13:41 ` [igt-dev] [PATCH i-g-t 5/5] [RFC EXAMPLE] lib/xe/xe_compute_kernels.c: re-generate TGL binary Mauro Carvalho Chehab
2023-03-27 16:54 ` [igt-dev] ✓ Fi.CI.BAT: success for Make xe_compute test more generic Patchwork
2023-03-27 23:09 ` [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=20230327134119.2429388-4-mauro.chehab@linux.intel.com \
--to=mauro.chehab@linux.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