From: Jesse Zhang <Jesse.Zhang@amd.com>
To: <igt-dev@lists.freedesktop.org>
Cc: Vitaly Prosyak <vitaly.prosyak@amd.com>,
Alex Deucher <alexander.deucher@amd.com>,
Christian Koenig <christian.koenig@amd.com>,
Jesse Zhang <Jesse.Zhang@amd.com>
Subject: [PATCH i-g-t 1/2] lib/amdgpu: add oversized invalid packet length error handling
Date: Wed, 8 Apr 2026 10:47:57 +0800 [thread overview]
Message-ID: <20260408024821.2515174-1-Jesse.Zhang@amd.com> (raw)
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
Signed-off-by: Jesse Zhang <Jesse.Zhang@amd.com>
---
lib/amdgpu/amd_ip_blocks.c | 2 ++
lib/amdgpu/amd_ip_blocks.h | 1 +
2 files changed, 3 insertions(+)
diff --git a/lib/amdgpu/amd_ip_blocks.c b/lib/amdgpu/amd_ip_blocks.c
index f0376a3e7..80aa5569c 100644
--- a/lib/amdgpu/amd_ip_blocks.c
+++ b/lib/amdgpu/amd_ip_blocks.c
@@ -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;
diff --git a/lib/amdgpu/amd_ip_blocks.h b/lib/amdgpu/amd_ip_blocks.h
index 6bc8c3706..eb118c68a 100644
--- a/lib/amdgpu/amd_ip_blocks.h
+++ b/lib/amdgpu/amd_ip_blocks.h
@@ -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,
--
2.49.0
next reply other threads:[~2026-04-08 2:48 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-04-08 2:47 Jesse Zhang [this message]
2026-04-08 2:47 ` [PATCH i-g-t 2/2] tests/amdgpu: add string mapping for oversized packet length error Jesse Zhang
2026-04-08 22:46 ` [PATCH i-g-t 1/2] lib/amdgpu: add oversized invalid packet length error handling vitaly prosyak
2026-04-09 7:48 ` ✗ Fi.CI.BAT: failure for series starting with [i-g-t,1/2] " 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=20260408024821.2515174-1-Jesse.Zhang@amd.com \
--to=jesse.zhang@amd.com \
--cc=alexander.deucher@amd.com \
--cc=christian.koenig@amd.com \
--cc=igt-dev@lists.freedesktop.org \
--cc=vitaly.prosyak@amd.com \
/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