From: Lizhi Hou <lizhi.hou@amd.com>
To: Mario Limonciello <mario.limonciello@amd.com>,
<ogabbay@kernel.org>, <quic_jhugo@quicinc.com>,
<dri-devel@lists.freedesktop.org>,
<maciej.falkowski@linux.intel.com>
Cc: Max Zhen <max.zhen@amd.com>, <linux-kernel@vger.kernel.org>,
<sonal.santan@amd.com>
Subject: Re: [PATCH V1] accel/amdxdna: Handle DETACH_DEBUG_BO through config_debug_bo path
Date: Tue, 7 Apr 2026 10:23:22 -0700 [thread overview]
Message-ID: <a378c871-a944-2751-510c-84bd2de9561f@amd.com> (raw)
In-Reply-To: <ea3bc9a5-e21f-4346-8af4-4ebc0f44a234@amd.com>
On 4/6/26 14:29, Mario Limonciello wrote:
>
>
> On 4/6/26 16:14, Lizhi Hou wrote:
>> From: Max Zhen <max.zhen@amd.com>
>>
>> Route DETACH_DEBUG_BO through aie2_config_debug_bo() the same way as
>> ATTACH_DEBUG_BO.
>>
>> The scheduler switch in aie2_sched_job_run() already handles
>> ATTACH_DEBUG_BO with aie2_config_debug_bo(), but DETACH_DEBUG_BO was
>> not included in that path. Add an explicit fallthrough so both attach
>> and detach operations use the same handler.
>>
>> This fixes debug BO detach handling by ensuring the detach command is
>> processed by the expected configuration path.
>>
>> Fixes: 7ea046838021 ("accel/amdxdna: Support firmware debug buffer")
>> Signed-off-by: Max Zhen <max.zhen@amd.com>
>> Signed-off-by: Lizhi Hou <lizhi.hou@amd.com>
>> ---
>> drivers/accel/amdxdna/aie2_ctx.c | 2 ++
>> 1 file changed, 2 insertions(+)
>>
>> diff --git a/drivers/accel/amdxdna/aie2_ctx.c
>> b/drivers/accel/amdxdna/aie2_ctx.c
>> index 8db32f8e2362..c464cf8024c3 100644
>> --- a/drivers/accel/amdxdna/aie2_ctx.c
>> +++ b/drivers/accel/amdxdna/aie2_ctx.c
>> @@ -360,6 +360,8 @@ aie2_sched_job_run(struct drm_sched_job *sched_job)
>> ret = aie2_sync_bo(hwctx, job,
>> aie2_sched_drvcmd_resp_handler);
>> break;
>> case ATTACH_DEBUG_BO:
>> + fallthrough;
>> + case DETACH_DEBUG_BO:
>
> TBH - I don't think you actually need the fallthrough command here
> unless you plan to add new code in the ATTACH_DEBUG_BO case.
>
> IE you can do this:
>
> case ATTACH_DEBUG_BO:
> case DETACH_DEBUG_BO:
>
> Reviewed-by: Mario Limonciello (AMD) <superm1@kernel.org>
Thanks. Applied to drm-misc-next.
Lizhi
>
>> ret = aie2_config_debug_bo(hwctx, job,
>> aie2_sched_drvcmd_resp_handler);
>> break;
>> default:
>
next prev parent reply other threads:[~2026-04-07 17:23 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-04-06 21:14 [PATCH V1] accel/amdxdna: Handle DETACH_DEBUG_BO through config_debug_bo path Lizhi Hou
2026-04-06 21:29 ` Mario Limonciello
2026-04-07 17:23 ` Lizhi Hou [this message]
2026-04-12 4:24 ` Claude review: " Claude Code Review Bot
2026-04-12 4:24 ` Claude Code Review Bot
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=a378c871-a944-2751-510c-84bd2de9561f@amd.com \
--to=lizhi.hou@amd.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=linux-kernel@vger.kernel.org \
--cc=maciej.falkowski@linux.intel.com \
--cc=mario.limonciello@amd.com \
--cc=max.zhen@amd.com \
--cc=ogabbay@kernel.org \
--cc=quic_jhugo@quicinc.com \
--cc=sonal.santan@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