[PATCH v2 1/5] lib/gpu_cmds: add Xe_LP version of emit_vfe_state
Andrzej Hajda
andrzej.hajda at intel.com
Wed May 15 09:15:00 UTC 2024
In Xe_LP version there is added argument to control EU thread
dispatching mode. For shaders lagacy mode is used.
v2: added commit description
Signed-off-by: Andrzej Hajda <andrzej.hajda at intel.com>
Reviewed-by: Dominik Grzegorzek <dominik.grzegorzek at intel.com>
---
lib/gpu_cmds.c | 29 +++++++++++++++++++++++------
lib/gpu_cmds.h | 6 ++++++
2 files changed, 29 insertions(+), 6 deletions(-)
diff --git a/lib/gpu_cmds.c b/lib/gpu_cmds.c
index 378fa9166ab8..6caaeb01be29 100644
--- a/lib/gpu_cmds.c
+++ b/lib/gpu_cmds.c
@@ -651,10 +651,10 @@ gen7_emit_vfe_state(struct intel_bb *ibb, uint32_t threads,
intel_bb_out(ibb, 0);
}
-void
-gen8_emit_vfe_state(struct intel_bb *ibb, uint32_t threads,
- uint32_t urb_entries, uint32_t urb_size,
- uint32_t curbe_size)
+static void
+__gen8_emit_vfe_state(struct intel_bb *ibb, uint32_t threads,
+ uint32_t urb_entries, uint32_t urb_size,
+ uint32_t curbe_size, bool legacy_mode)
{
intel_bb_out(ibb, GEN7_MEDIA_VFE_STATE | (9 - 2));
@@ -662,8 +662,8 @@ gen8_emit_vfe_state(struct intel_bb *ibb, uint32_t threads,
intel_bb_out(ibb, 0);
intel_bb_out(ibb, 0);
- /* number of threads & urb entries */
- intel_bb_out(ibb, threads << 16 | urb_entries << 8);
+ /* number of threads & urb entries & eu fusion */
+ intel_bb_out(ibb, threads << 16 | urb_entries << 8 | legacy_mode << 6);
intel_bb_out(ibb, 0);
@@ -676,6 +676,15 @@ gen8_emit_vfe_state(struct intel_bb *ibb, uint32_t threads,
intel_bb_out(ibb, 0);
}
+void
+gen8_emit_vfe_state(struct intel_bb *ibb, uint32_t threads,
+ uint32_t urb_entries, uint32_t urb_size,
+ uint32_t curbe_size)
+{
+ __gen8_emit_vfe_state(ibb, threads, urb_entries, urb_size, curbe_size,
+ false);
+}
+
void
gen7_emit_curbe_load(struct intel_bb *ibb, uint32_t curbe_buffer)
{
@@ -864,6 +873,14 @@ gen7_emit_media_objects(struct intel_bb *ibb,
gen_emit_media_object(ibb, x + i * 16, y + j * 16);
}
+void xelp_emit_vfe_state(struct intel_bb *ibb, uint32_t threads,
+ uint32_t urb_entries, uint32_t urb_size,
+ uint32_t curbe_size, bool legacy_mode)
+{
+ return __gen8_emit_vfe_state(ibb, threads, urb_entries, urb_size,
+ curbe_size, legacy_mode);
+}
+
/*
* XEHP
*/
diff --git a/lib/gpu_cmds.h b/lib/gpu_cmds.h
index 348c6c9453e9..1b9156a80c7c 100644
--- a/lib/gpu_cmds.h
+++ b/lib/gpu_cmds.h
@@ -81,6 +81,12 @@ void
gen8_emit_vfe_state(struct intel_bb *ibb, uint32_t threads,
uint32_t urb_entries, uint32_t urb_size,
uint32_t curbe_size);
+
+void
+xelp_emit_vfe_state(struct intel_bb *ibb, uint32_t threads,
+ uint32_t urb_entries, uint32_t urb_size,
+ uint32_t curbe_size, bool legacy_mode);
+
void
gen7_emit_curbe_load(struct intel_bb *ibb, uint32_t curbe_buffer);
--
2.34.1
More information about the igt-dev
mailing list