[PATCH i-g-t] lib/amdgpu: unify SDMA protected fence sub-opcode
Jesse.Zhang
Jesse.Zhang at amd.com
Wed Aug 27 07:03:37 UTC 2025
Consolidate the SDMA protected fence sub-opcode definitions across
IP versions by removing the version-specific SDMA6_SUB_OP_PROTECTED_FENCE
and SDMA7_SUB_OP_PROTECTED_FENCE values. A single unified value,
SDMA_SUB_OP_PROTECTED_FENCE (0x3), is now used for all SDMA versions.
This change is made possible because the latest SDMA firmware versions
have unified the SDMA_SUBOP_PROTECTED_FENCE_SIGNAL value across both
SDMA6.x and SDMA7.x hardware.
Signed-off-by: Jesse Zhang <Jesse.Zhang at amd.com>
---
lib/amdgpu/amd_ip_blocks.c | 5 +----
lib/amdgpu/amd_sdma.h | 3 +--
2 files changed, 2 insertions(+), 6 deletions(-)
diff --git a/lib/amdgpu/amd_ip_blocks.c b/lib/amdgpu/amd_ip_blocks.c
index 6955ba7dc..296c45de8 100644
--- a/lib/amdgpu/amd_ip_blocks.c
+++ b/lib/amdgpu/amd_ip_blocks.c
@@ -605,10 +605,7 @@ user_queue_submit(amdgpu_device_handle device, struct amdgpu_ring_context *ring_
amdgpu_pkt_add_dw(control); // IB length in DWORDS
amdgpu_pkt_add_dw(lower_32_bits(ring_context->csa.mc_addr)); // CSA MC address low
amdgpu_pkt_add_dw(upper_32_bits(ring_context->csa.mc_addr)); // CSA MC address high
- if (ring_context->hw_ip_info.hw_ip_version_major <= 6)
- amdgpu_pkt_add_dw(SDMA_PACKET(SDMA_OP_PROTECTED_FENCE, SDMA6_SUB_OP_PROTECTED_FENCE, 0));
- else
- amdgpu_pkt_add_dw(SDMA_PACKET(SDMA_OP_PROTECTED_FENCE, SDMA7_SUB_OP_PROTECTED_FENCE, 0));
+ amdgpu_pkt_add_dw(SDMA_PACKET(SDMA_OP_PROTECTED_FENCE, SDMA_SUB_OP_PROTECTED_FENCE, 0));
} else {
/* Prepare the Indirect IB to submit the IB to user queue */
amdgpu_pkt_add_dw(PACKET3(PACKET3_INDIRECT_BUFFER, 2));
diff --git a/lib/amdgpu/amd_sdma.h b/lib/amdgpu/amd_sdma.h
index 2a9339cfb..4a6342bbd 100644
--- a/lib/amdgpu/amd_sdma.h
+++ b/lib/amdgpu/amd_sdma.h
@@ -105,7 +105,6 @@
#define SDMA_NOP 0x0
#define SDMA_OP_INDIRECT 0x4
#define SDMA_OP_PROTECTED_FENCE 0x5
-#define SDMA6_SUB_OP_PROTECTED_FENCE 0x1
-#define SDMA7_SUB_OP_PROTECTED_FENCE 0x3
+#define SDMA_SUB_OP_PROTECTED_FENCE 0x3
#endif
--
2.49.0
More information about the igt-dev
mailing list