From: Martin Kepplinger <martin.kepplinger@puri.sm>
To: Sakari Ailus <sakari.ailus@iki.fi>
Cc: laurent.pinchart@ideasonboard.com, kernel@puri.sm,
linux-kernel@vger.kernel.org, linux-media@vger.kernel.org,
mchehab@kernel.org
Subject: Re: [PATCH v2] media: hi846: fix usage of pm_runtime_get_if_in_use()
Date: Tue, 23 May 2023 12:07:54 +0200 [thread overview]
Message-ID: <73bfe0c438e194fa462bec521debacfcd722dc9e.camel@puri.sm> (raw)
In-Reply-To: <ZGODstToZrypFaAV@valkosipuli.retiisi.eu>
Am Dienstag, dem 16.05.2023 um 16:22 +0300 schrieb Sakari Ailus:
> Hi Martin,
>
> On Tue, Apr 25, 2023 at 11:47:47AM +0200, Martin Kepplinger wrote:
> > pm_runtime_get_if_in_use() does not only return nonzero values when
> > the device is in use, it can return a negative errno too.
> >
> > And especially during resuming from system suspend, when runtime pm
> > is not yet up again, -EAGAIN is being returned, so the subsequent
> > pm_runtime_put() call results in a refcount underflow.
> >
> > Fix system-resume by handling -EAGAIN of
> > pm_runtime_get_if_in_use().
> >
> > Signed-off-by: Martin Kepplinger <martin.kepplinger@puri.sm>
> > ---
> >
> > revision history
> > ----------------
> > v2 (thank you Sakari and Laurent):
> > * drop the other patch (the streaming-state in suspend/resume needs
> > to
> > be solved differently).
> > * Sakari pointed out that many drivers are affected by this and
> > that
> > runtime-pm might need changes instead. I think this patch doesn't
> > hurt
> > and could serve as a reminder to do so.
>
> I guess it's appropriate to add:
>
> Fixes: e8c0882685f9 ("media: i2c: add driver for the SK Hynix Hi-846
> 8M pixel camera")
>
I agree. Feel free to do so when applying.
martin
next prev parent reply other threads:[~2023-05-23 10:08 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-04-25 9:47 Martin Kepplinger
2023-05-16 13:22 ` Sakari Ailus
2023-05-23 10:07 ` Martin Kepplinger [this message]
2023-05-29 20:40 ` Sakari Ailus
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=73bfe0c438e194fa462bec521debacfcd722dc9e.camel@puri.sm \
--to=martin.kepplinger@puri.sm \
--cc=kernel@puri.sm \
--cc=laurent.pinchart@ideasonboard.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=mchehab@kernel.org \
--cc=sakari.ailus@iki.fi \
/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®