lib/amdgpu: add oversized invalid packet length error handling
PATCH 1/2 lib/amdgpu: add oversized invalid packet length error handling
Add a dedicated cmd error type for oversized packet length and handle it in gfx_ring_bad_write_linear().
- add CMD_STREAM_EXEC_INVALID_PACKET_LENGTH_OVERSIZE to cmd_error_type
- in gfx_ring_bad_write_linear(), map this error to:
stream_length = ring_context->write_length * 2
- keep existing invalid-short-length path unchanged
--- lib/amdgpu/amd_ip_blocks.c | 2 ++ lib/amdgpu/amd_ip_blocks.h | 1 + 2 files changed, 3 insertions(+)
lib/amdgpu/amd_ip_blocks.c +2 -0
@@ -284,6 +284,8 @@ gfx_ring_bad_write_linear(const struct amdgpu_ip_funcs *func,*/ if (cmd_error ==CMD_STREAM_EXEC_INVALID_PACKET_LENGTH ) stream_length = ring_context->write_length /16 ; +else if (cmd_error ==CMD_STREAM_EXEC_INVALID_PACKET_LENGTH_OVERSIZE ) + stream_length = ring_context->write_length *2 ;else stream_length = ring_context->write_length;
lib/amdgpu/amd_ip_blocks.h +1 -0
@@ -146,6 +146,7 @@ enum cmd_error_type {CMD_STREAM_EXEC_SUCCESS ,CMD_STREAM_EXEC_INVALID_OPCODE ,CMD_STREAM_EXEC_INVALID_PACKET_LENGTH , +CMD_STREAM_EXEC_INVALID_PACKET_LENGTH_OVERSIZE ,CMD_STREAM_EXEC_INVALID_PACKET_EOP_QUEUE ,CMD_STREAM_TRANS_BAD_REG_ADDRESS , CMD_STREAM_TRANS_BAD_MEM_ADDRESS,
Signature · 1 line
2.49.0
PATCH 2/2 tests/amdgpu: add string mapping for oversized packet length error
Extend queue-reset error string table with the new CMD_STREAM_EXEC_INVALID_PACKET_LENGTH_OVERSIZE enum.
--- tests/amdgpu/amd_queue_reset.c | 1 + 1 file changed, 1 insertion(+)
tests/amdgpu/amd_queue_reset.c +1 -0
@@ -264,6 +264,7 @@ is_dispatch_shader_test(unsigned int err, char error_str[128], bool *is_dispatch { CMD_STREAM_EXEC_SUCCESS, false, "CMD_STREAM_EXEC_SUCCESS" }, { CMD_STREAM_EXEC_INVALID_OPCODE, false, "CMD_STREAM_EXEC_INVALID_OPCODE" }, { CMD_STREAM_EXEC_INVALID_PACKET_LENGTH, false, "CMD_STREAM_EXEC_INVALID_PACKET_LENGTH" }, + { CMD_STREAM_EXEC_INVALID_PACKET_LENGTH_OVERSIZE, false, "CMD_STREAM_EXEC_INVALID_PACKET_LENGTH_OVERSIZE" }, { CMD_STREAM_EXEC_INVALID_PACKET_EOP_QUEUE, false, "CMD_STREAM_EXEC_INVALID_PACKET_EOP_QUEUE" }, { CMD_STREAM_TRANS_BAD_REG_ADDRESS, false, "CMD_STREAM_TRANS_BAD_REG_ADDRESS" }, { CMD_STREAM_TRANS_BAD_MEM_ADDRESS, false, "CMD_STREAM_TRANS_BAD_MEM_ADDRESS" },
Signature · 1 line
2.49.0
LGTM both patches
Quoted 39 lines · Jesse Zhang
Add a dedicated cmd error type for oversized packet length and handle it in
gfx_ring_bad_write_linear().- add
CMD_STREAM_EXEC_INVALID_PACKET_LENGTH_OVERSIZEtocmd_error_type
- ingfx_ring_bad_write_linear(), map this error to:
stream_length=ring_context->write_length* 2
- keep existing invalid-short-length path unchangedSigned-off-by Jesse Zhang <[email protected]>--- lib/amdgpu/amd_ip_blocks.c | 2 ++ lib/amdgpu/amd_ip_blocks.h | 1 + 2 files changed, 3 insertions(+)lib/amdgpu/amd_ip_blocks.c +2
-0@@ -284,6 +284,8 @@ gfx_ring_bad_write_linear(const struct amdgpu_ip_funcs *func,*/ if (cmd_error ==CMD_STREAM_EXEC_INVALID_PACKET_LENGTH ) stream_length = ring_context->write_length /16 ; +else if (cmd_error ==CMD_STREAM_EXEC_INVALID_PACKET_LENGTH_OVERSIZE ) + stream_length = ring_context->write_length *2 ;else stream_length = ring_context->write_length;lib/amdgpu/amd_ip_blocks.h +1
-0@@ -146,6 +146,7 @@ enum cmd_error_type {CMD_STREAM_EXEC_SUCCESS ,CMD_STREAM_EXEC_INVALID_OPCODE ,CMD_STREAM_EXEC_INVALID_PACKET_LENGTH , +CMD_STREAM_EXEC_INVALID_PACKET_LENGTH_OVERSIZE ,CMD_STREAM_EXEC_INVALID_PACKET_EOP_QUEUE ,CMD_STREAM_TRANS_BAD_REG_ADDRESS , CMD_STREAM_TRANS_BAD_MEM_ADDRESS,
Patchwork
CI✗ Fi.CI.BAT: failure for series starting with [i-g-t,1/2] lib/amdgpu: add oversized invalid packet length error handling
In reply to Jesse Zhang== Series Details ==
== Series Details ==
Series: series starting with [i-g-t,1/2] lib/amdgpu: add oversized invalid packet length error handling
URL : https://patchwork.freedesktop.org/series/164484/
State : failure
== Summary ==
Series 164484 revision 1 was fully merged or fully failed: no git log