From: Karol Wachowski <karol.wachowski@linux.intel.com>
To: Lizhi Hou <lizhi.hou@amd.com>, dri-devel@lists.freedesktop.org
Cc: oded.gabbay@gmail.com, jeff.hugo@oss.qualcomm.com,
maciej.falkowski@linux.intel.com
Subject: Re: [PATCH] accel/ivpu: Reset cmdq->db_id on register failure
Date: Thu, 18 Sep 2025 08:11:04 +0200 [thread overview]
Message-ID: <4d3845ce-7cb1-4ddd-92c7-be65ffa187ef@linux.intel.com> (raw)
In-Reply-To: <4480b307-ea4a-edec-f2c6-e271c23cc05b@amd.com>
Applied to drm-misc-next
On 9/15/2025 10:36 PM, Lizhi Hou wrote:
> Reviewed-by: Lizhi Hou <lizhi.hou@amd.com>
>
> On 9/15/25 03:34, Karol Wachowski wrote:
>> Ensure that cmdq->db_id is reset to 0 if ivpu_jsm_register_db fails,
>> preventing potential reuse of invalid command queue with
>> unregistered doorbell.
>>
>> Signed-off-by: Karol Wachowski <karol.wachowski@linux.intel.com>
>> ---
>> drivers/accel/ivpu/ivpu_job.c | 6 ++++--
>> 1 file changed, 4 insertions(+), 2 deletions(-)
>>
>> diff --git a/drivers/accel/ivpu/ivpu_job.c
>> b/drivers/accel/ivpu/ivpu_job.c
>> index 060f1fc031d3..fa1720fa06a4 100644
>> --- a/drivers/accel/ivpu/ivpu_job.c
>> +++ b/drivers/accel/ivpu/ivpu_job.c
>> @@ -219,11 +219,13 @@ static int ivpu_register_db(struct
>> ivpu_file_priv *file_priv, struct ivpu_cmdq *
>> ret = ivpu_jsm_register_db(vdev, file_priv->ctx.id,
>> cmdq->db_id,
>> cmdq->mem->vpu_addr, ivpu_bo_size(cmdq->mem));
>> - if (!ret)
>> + if (!ret) {
>> ivpu_dbg(vdev, JOB, "DB %d registered to cmdq %d ctx %d
>> priority %d\n",
>> cmdq->db_id, cmdq->id, file_priv->ctx.id,
>> cmdq->priority);
>> - else
>> + } else {
>> xa_erase(&vdev->db_xa, cmdq->db_id);
>> + cmdq->db_id = 0;
>> + }
>> return ret;
>> }
prev parent reply other threads:[~2025-09-18 6:11 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-09-15 10:34 [PATCH] accel/ivpu: Reset cmdq->db_id on register failure Karol Wachowski
2025-09-15 20:36 ` Lizhi Hou
2025-09-18 6:11 ` Karol Wachowski [this message]
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=4d3845ce-7cb1-4ddd-92c7-be65ffa187ef@linux.intel.com \
--to=karol.wachowski@linux.intel.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=jeff.hugo@oss.qualcomm.com \
--cc=lizhi.hou@amd.com \
--cc=maciej.falkowski@linux.intel.com \
--cc=oded.gabbay@gmail.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.