* [PATCH] accel/amdxdna: Fix incorrect return value in aie2_hwctx_sync_debug_bo()
@ 2025-10-24 16:26 Lizhi Hou
2025-10-24 18:06 ` Mario Limonciello (AMD) (kernel.org)
0 siblings, 1 reply; 3+ messages in thread
From: Lizhi Hou @ 2025-10-24 16:26 UTC (permalink / raw)
To: ogabbay, quic_jhugo, maciej.falkowski, dan.carpenter, dri-devel
Cc: Lizhi Hou, linux-kernel, max.zhen, sonal.santan, mario.limonciello
When the driver issues the SYNC_DEBUG_BO command, it currently returns 0
even if the firmware fails to execute the command. Update the driver to
return -EINVAL in this case to properly indicate the failure.
Reported-by: Dan Carpenter <dan.carpenter@linaro.org>
Closes: https://lore.kernel.org/dri-devel/aPsadTBXunUSBByV@stanley.mountain/
Fixes: 7ea046838021 ("accel/amdxdna: Support firmware debug buffer")
Signed-off-by: Lizhi Hou <lizhi.hou@amd.com>
---
drivers/accel/amdxdna/aie2_ctx.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/accel/amdxdna/aie2_ctx.c b/drivers/accel/amdxdna/aie2_ctx.c
index 63450b7773ac..c6c473c78352 100644
--- a/drivers/accel/amdxdna/aie2_ctx.c
+++ b/drivers/accel/amdxdna/aie2_ctx.c
@@ -879,7 +879,7 @@ int aie2_hwctx_sync_debug_bo(struct amdxdna_hwctx *hwctx, u32 debug_bo_hdl)
aie2_cmd_wait(hwctx, seq);
if (cmd.result) {
XDNA_ERR(xdna, "Response failure 0x%x", cmd.result);
- return ret;
+ return -EINVAL;
}
return 0;
--
2.34.1
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] accel/amdxdna: Fix incorrect return value in aie2_hwctx_sync_debug_bo()
2025-10-24 16:26 [PATCH] accel/amdxdna: Fix incorrect return value in aie2_hwctx_sync_debug_bo() Lizhi Hou
@ 2025-10-24 18:06 ` Mario Limonciello (AMD) (kernel.org)
2025-10-24 20:09 ` Lizhi Hou
0 siblings, 1 reply; 3+ messages in thread
From: Mario Limonciello (AMD) (kernel.org) @ 2025-10-24 18:06 UTC (permalink / raw)
To: Lizhi Hou, ogabbay, quic_jhugo, maciej.falkowski, dan.carpenter,
dri-devel
Cc: linux-kernel, max.zhen, sonal.santan
On 10/24/2025 11:26 AM, Lizhi Hou wrote:
> When the driver issues the SYNC_DEBUG_BO command, it currently returns 0
> even if the firmware fails to execute the command. Update the driver to
> return -EINVAL in this case to properly indicate the failure.
>
> Reported-by: Dan Carpenter <dan.carpenter@linaro.org>
> Closes: https://lore.kernel.org/dri-devel/aPsadTBXunUSBByV@stanley.mountain/
> Fixes: 7ea046838021 ("accel/amdxdna: Support firmware debug buffer")
> Signed-off-by: Lizhi Hou <lizhi.hou@amd.com>
Reviewed-by: Mario Limonciello (AMD) <superm1@kernel.org>> ---
> drivers/accel/amdxdna/aie2_ctx.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/accel/amdxdna/aie2_ctx.c b/drivers/accel/amdxdna/aie2_ctx.c
> index 63450b7773ac..c6c473c78352 100644
> --- a/drivers/accel/amdxdna/aie2_ctx.c
> +++ b/drivers/accel/amdxdna/aie2_ctx.c
> @@ -879,7 +879,7 @@ int aie2_hwctx_sync_debug_bo(struct amdxdna_hwctx *hwctx, u32 debug_bo_hdl)
> aie2_cmd_wait(hwctx, seq);
> if (cmd.result) {
> XDNA_ERR(xdna, "Response failure 0x%x", cmd.result);
> - return ret;
> + return -EINVAL;
> }
>
> return 0;
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] accel/amdxdna: Fix incorrect return value in aie2_hwctx_sync_debug_bo()
2025-10-24 18:06 ` Mario Limonciello (AMD) (kernel.org)
@ 2025-10-24 20:09 ` Lizhi Hou
0 siblings, 0 replies; 3+ messages in thread
From: Lizhi Hou @ 2025-10-24 20:09 UTC (permalink / raw)
To: Mario Limonciello (AMD) (kernel.org),
ogabbay, quic_jhugo, maciej.falkowski, dan.carpenter, dri-devel
Cc: linux-kernel, max.zhen, sonal.santan
Applied to drm-misc-next.
On 10/24/25 11:06, Mario Limonciello (AMD) (kernel.org) wrote:
>
>
> On 10/24/2025 11:26 AM, Lizhi Hou wrote:
>> When the driver issues the SYNC_DEBUG_BO command, it currently returns 0
>> even if the firmware fails to execute the command. Update the driver to
>> return -EINVAL in this case to properly indicate the failure.
>>
>> Reported-by: Dan Carpenter <dan.carpenter@linaro.org>
>> Closes:
>> https://lore.kernel.org/dri-devel/aPsadTBXunUSBByV@stanley.mountain/
>> Fixes: 7ea046838021 ("accel/amdxdna: Support firmware debug buffer")
>> Signed-off-by: Lizhi Hou <lizhi.hou@amd.com>
> Reviewed-by: Mario Limonciello (AMD) <superm1@kernel.org>> ---
>> drivers/accel/amdxdna/aie2_ctx.c | 2 +-
>> 1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/drivers/accel/amdxdna/aie2_ctx.c
>> b/drivers/accel/amdxdna/aie2_ctx.c
>> index 63450b7773ac..c6c473c78352 100644
>> --- a/drivers/accel/amdxdna/aie2_ctx.c
>> +++ b/drivers/accel/amdxdna/aie2_ctx.c
>> @@ -879,7 +879,7 @@ int aie2_hwctx_sync_debug_bo(struct amdxdna_hwctx
>> *hwctx, u32 debug_bo_hdl)
>> aie2_cmd_wait(hwctx, seq);
>> if (cmd.result) {
>> XDNA_ERR(xdna, "Response failure 0x%x", cmd.result);
>> - return ret;
>> + return -EINVAL;
>> }
>> return 0;
>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2025-10-24 20:09 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-10-24 16:26 [PATCH] accel/amdxdna: Fix incorrect return value in aie2_hwctx_sync_debug_bo() Lizhi Hou
2025-10-24 18:06 ` Mario Limonciello (AMD) (kernel.org)
2025-10-24 20:09 ` Lizhi Hou
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®