From: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
To: Ezequiel Garcia <ezequiel@collabora.com>
Cc: linuxarm@huawei.com, mauro.chehab@huawei.com,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Mauro Carvalho Chehab <mchehab@kernel.org>,
Philipp Zabel <p.zabel@pengutronix.de>,
devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org,
linux-media@vger.kernel.org, linux-rockchip@lists.infradead.org
Subject: Re: [PATCH v4 79/79] media: hantro: do a PM resume earlier
Date: Thu, 29 Apr 2021 09:13:35 +0200 [thread overview]
Message-ID: <20210429091335.2b563ab5@coco.lan> (raw)
In-Reply-To: <e5eeffbbad6ee90204cb3928cfd6774efb6174f3.camel@collabora.com>
Em Wed, 28 Apr 2021 14:17:50 -0300
Ezequiel Garcia <ezequiel@collabora.com> escreveu:
> Hi Mauro,
>
> Thanks a lot for taking care of this.
>
> On Wed, 2021-04-28 at 16:52 +0200, Mauro Carvalho Chehab wrote:
> > The device_run() first enables the clock and then
> > tries to resume PM runtime, checking for errors.
> >
> > Well, if for some reason the pm_runtime can not resume,
> > it would be better to detect it beforehand.
> >
> > So, change the order inside device_run().
> >
> > Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
>
> Clocks could be behind power-domains, IIRC, so this change
> is fixing that.
>
> However, this has ever been a problem for this driver,
> so I don't think it makes sense to bother with Fixes tag.
I would prefer to move this patch to the first part of this
series, together with other fixes, rebasing it to apply cleanly
before the pm_runtime_resume_and_get() patch, with:
Fixes: 775fec69008d ("media: add Rockchip VPU JPEG encoder driver")
This way, people that could be interested on backporting it will be
capable to apply it as is to stable Kernel releases that came
with this driver.
>
> Reviewed-by: Ezequiel Garcia <ezequiel@collabora.com>
>
> Thanks,
> Ezequiel
>
> > ---
> > drivers/staging/media/hantro/hantro_drv.c | 8 ++++----
> > 1 file changed, 4 insertions(+), 4 deletions(-)
> >
> > diff --git a/drivers/staging/media/hantro/hantro_drv.c b/drivers/staging/media/hantro/hantro_drv.c
> > index 25fa36e7e773..67de6b15236d 100644
> > --- a/drivers/staging/media/hantro/hantro_drv.c
> > +++ b/drivers/staging/media/hantro/hantro_drv.c
> > @@ -160,14 +160,14 @@ static void device_run(void *priv)
> > src = hantro_get_src_buf(ctx);
> > dst = hantro_get_dst_buf(ctx);
> >
> > - ret = clk_bulk_enable(ctx->dev->variant->num_clocks, ctx->dev->clocks);
> > - if (ret)
> > - goto err_cancel_job;
> > -
> > ret = pm_runtime_resume_and_get(ctx->dev->dev);
> > if (ret < 0)
> > goto err_cancel_job;
> >
> > + ret = clk_bulk_enable(ctx->dev->variant->num_clocks, ctx->dev->clocks);
> > + if (ret)
> > + goto err_cancel_job;
> > +
> > v4l2_m2m_buf_copy_metadata(src, dst, true);
> >
> > ctx->codec_ops->run(ctx);
>
>
Thanks,
Mauro
_______________________________________________
Linux-rockchip mailing list
Linux-rockchip@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-rockchip
prev parent reply other threads:[~2021-04-29 7:25 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <cover.1619621413.git.mchehab+huawei@kernel.org>
2021-04-28 14:51 ` [PATCH v4 20/79] staging: media: rkvdec: fix pm_runtime_get_sync() usage count Mauro Carvalho Chehab
2021-04-28 15:09 ` Johan Hovold
2021-04-29 7:38 ` Mauro Carvalho Chehab
2021-04-28 14:52 ` [PATCH v4 57/79] media: rockchip/rga: use pm_runtime_resume_and_get() Mauro Carvalho Chehab
2021-04-28 17:11 ` Ezequiel Garcia
2021-04-28 14:52 ` [PATCH v4 70/79] media: rkisp1: " Mauro Carvalho Chehab
2021-04-28 14:52 ` [PATCH v4 78/79] media: hantro: " Mauro Carvalho Chehab
2021-04-28 17:14 ` Ezequiel Garcia
2021-04-30 18:09 ` Jonathan Cameron
2021-04-28 14:52 ` [PATCH v4 79/79] media: hantro: do a PM resume earlier Mauro Carvalho Chehab
2021-04-28 17:17 ` Ezequiel Garcia
2021-04-29 7:13 ` Mauro Carvalho Chehab [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=20210429091335.2b563ab5@coco.lan \
--to=mchehab+huawei@kernel.org \
--cc=devel@driverdev.osuosl.org \
--cc=ezequiel@collabora.com \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=linux-rockchip@lists.infradead.org \
--cc=linuxarm@huawei.com \
--cc=mauro.chehab@huawei.com \
--cc=mchehab@kernel.org \
--cc=p.zabel@pengutronix.de \
/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;
as well as URLs for NNTP newsgroup(s).