From: sashiko-bot@kernel.org
To: "Arun Iyengar" <aiyengar1990@gmail.com>
Cc: devicetree@vger.kernel.org, robh@kernel.org, conor+dt@kernel.org,
media-ci@linuxtv.org
Subject: Re: [PATCH v2 5/6] media: verisilicon: Reinitialize the IOMMU after resetting an encoder core
Date: Thu, 12 Nov 2026 08:55:42 +0000 [thread overview]
Message-ID: <sashiko-outbox-210800@kernel.org> (raw)
In-Reply-To: <20261112-hantro-robust-v2-5-18561fd48838@gmail.com>
Thank you for your contribution! Sashiko AI review found 1 potential
issue to consider:
- [Medium] media: verisilicon: missing v4l2_ctrl_request_complete() in
device_run()
--
commit 9b8b7ddcd6a2f08763d5a6b0f18fb2a01381b678
Author: Arun Iyengar <aiyengar1990@gmail.com>
media: verisilicon: Reinitialize the IOMMU after resetting an encoder core
This commit allocates an empty IOMMU paging domain at probe and attaches
and detaches it after resetting a Rockchip encoder core so the IOMMU is
reinitialized, refusing further jobs if the reattachment fails.
> diff --git a/drivers/media/platform/verisilicon/hantro_drv.c b/drivers/media/platform/verisilicon/hantro_drv.c
> index 4542322dba71a..6d027c2770387 100644
> --- a/drivers/media/platform/verisilicon/hantro_drv.c
> +++ b/drivers/media/platform/verisilicon/hantro_drv.c
[ ... ]
> @@ -174,6 +204,11 @@ static void device_run(void *priv)
> src = hantro_get_src_buf(ctx);
> dst = hantro_get_dst_buf(ctx);
>
> + if (unlikely(vpu->iommu_lost)) {
> + hantro_job_finish_no_pm(ctx, VB2_BUF_STATE_ERROR);
> + return;
> + }
[Severity: Medium]
Does this leave the control handler's media_request_object incomplete when
src was queued with a media_request containing controls?
Normal runs complete the control request object in
hantro_end_prepare_run() via v4l2_ctrl_request_complete(
src_buf->vb2_buf.req_obj.req, &ctx->ctrl_handler). Returning early via
hantro_job_finish_no_pm() calls v4l2_m2m_buf_done_and_job_finish() ->
vb2_buffer_done(), which removes src from the m2m queue and clears
src->vb2_buf.req_obj.req without completing the control object (as on the
adjacent pm_runtime_resume_and_get() error path). The media_request then
stays stuck in MEDIA_REQUEST_STATE_QUEUED until the file descriptor is
closed.
--
Sashiko AI review · https://sashiko.dev/#/patchset/20261112-hantro-robust-v2-0-18561fd48838@gmail.com?part=5
next prev parent reply other threads:[~2026-11-12 8:55 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-12 8:30 [PATCH v2 0/6] media: verisilicon: Recover the Rockchip VPUs from faults and timeouts Arun Iyengar via B4 Relay
2026-11-12 8:30 ` [PATCH v2 1/6] dt-bindings: media: rockchip,rk3568-vepu: Add the reset lines Arun Iyengar via B4 Relay
2026-11-12 8:30 ` [PATCH v2 2/6] media: verisilicon: Don't hold the VPU in reset after remove Arun Iyengar via B4 Relay
2026-11-12 8:30 ` [PATCH v2 3/6] media: verisilicon: Enable the Rockchip encoder interrupt again after a reset Arun Iyengar via B4 Relay
2026-11-12 8:30 ` [PATCH v2 4/6] media: verisilicon: Reset the Rockchip encoder cores on timeout Arun Iyengar via B4 Relay
2026-11-12 8:30 ` [PATCH v2 5/6] media: verisilicon: Reinitialize the IOMMU after resetting an encoder core Arun Iyengar via B4 Relay
2026-11-12 8:55 ` sashiko-bot [this message]
2026-11-12 8:30 ` [PATCH v2 6/6] arm64: dts: rockchip: Add the reset lines of the RK3588 VEPU121 cores Arun Iyengar via B4 Relay
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=sashiko-outbox-210800@kernel.org \
--to=sashiko-bot@kernel.org \
--cc=aiyengar1990@gmail.com \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=media-ci@linuxtv.org \
--cc=robh@kernel.org \
--cc=sashiko-reviews@lists.linux.dev \
/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