From: Keke Li <keke.li@amlogic.com>
To: Jiale Yao <yaojiale02@163.com>,
Mauro Carvalho Chehab <mchehab@kernel.org>,
Jacopo Mondi <jacopo.mondi@ideasonboard.com>,
Hans Verkuil <hverkuil@kernel.org>,
Daniel Scally <dan.scally@ideasonboard.com>,
linux-media@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/2] media: c3-mipi-adap: handle runtime resume failure
Date: Mon, 19 Oct 2026 14:23:34 +0800 [thread overview]
Message-ID: <5b66f679-2ced-47b3-966f-b75e67f8a6ec@amlogic.com> (raw)
In-Reply-To: <20261003081129.433041-2-yaojiale02@163.com>
Hi Jiale,
Thanks for your patch.
On 10/3/26 16:11, Jiale Yao wrote:
> [You don't often get email from yaojiale02@163.com. Learn why this is important at https://aka.ms/LearnAboutSenderIdentification ]
>
> [ EXTERNAL EMAIL ]
>
> c3_mipi_adap_enable_streams() ignores runtime resume failures and
> continues programming adapter registers before reporting that streaming
> started. If the power domain could not be resumed, those register
> accesses are unsafe and the disable path later drops a reference that
> was not acquired.
>
> Return the runtime PM error before accessing the adapter.
>
> Fixes: f0d2d8062cc8 ("media: platform: Add C3 MIPI adapter driver")
> Signed-off-by: Jiale Yao <yaojiale02@163.com>
> ---
> drivers/media/platform/amlogic/c3/mipi-adapter/c3-mipi-adap.c | 4 +++-
> 1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/media/platform/amlogic/c3/mipi-adapter/c3-mipi-adap.c b/drivers/media/platform/amlogic/c3/mipi-adapter/c3-mipi-adap.c
> index 4bd98fb9c7e9..750b301f4bbf 100644
> --- a/drivers/media/platform/amlogic/c3/mipi-adapter/c3-mipi-adap.c
> +++ b/drivers/media/platform/amlogic/c3/mipi-adapter/c3-mipi-adap.c
> @@ -455,7 +455,9 @@ static int c3_mipi_adap_enable_streams(struct v4l2_subdev *sd,
>
> src_sd = media_entity_to_v4l2_subdev(adap->src_pad->entity);
>
> - pm_runtime_resume_and_get(adap->dev);
> + ret = pm_runtime_resume_and_get(adap->dev);
> + if (ret < 0)
Is ' if (ret)' better?
Thanks!
> + return ret;
>
> fmt = v4l2_subdev_state_get_format(state, C3_MIPI_ADAP_PAD_SINK);
>
> --
> 2.34.1
>
next prev parent reply other threads:[~2026-10-19 6:23 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-03 8:11 [PATCH 0/2] media: amlogic: handle C3 MIPI runtime resume failures Jiale Yao
2026-10-03 8:11 ` [PATCH 1/2] media: c3-mipi-adap: handle runtime resume failure Jiale Yao
2026-10-19 6:23 ` Keke Li [this message]
2026-10-03 8:11 ` [PATCH 2/2] media: c3-mipi-csi2: " Jiale Yao
2026-10-19 6:24 ` Keke Li
2026-10-19 7:31 ` Jacopo Mondi
2026-10-19 8:48 ` Keke Li
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=5b66f679-2ced-47b3-966f-b75e67f8a6ec@amlogic.com \
--to=keke.li@amlogic.com \
--cc=dan.scally@ideasonboard.com \
--cc=hverkuil@kernel.org \
--cc=jacopo.mondi@ideasonboard.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=mchehab@kernel.org \
--cc=yaojiale02@163.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
all inboxes | Powered by JetHome®