public inbox for linux-tegra@vger.kernel.org
 help / color / mirror / Atom feed
From: Jonathan Cameron <Jonathan.Cameron@Huawei.com>
To: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Cc: <linuxarm@huawei.com>, <mauro.chehab@huawei.com>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Jonathan Hunter <jonathanh@nvidia.com>,
	"Mauro Carvalho Chehab" <mchehab@kernel.org>,
	Sowjanya Komatineni <skomatineni@nvidia.com>,
	Thierry Reding <thierry.reding@gmail.com>,
	<devel@driverdev.osuosl.org>, <linux-kernel@vger.kernel.org>,
	<linux-media@vger.kernel.org>, <linux-tegra@vger.kernel.org>
Subject: Re: [PATCH v4 26/79] staging: media: tegra-video: use pm_runtime_resume_and_get()
Date: Fri, 30 Apr 2021 18:13:00 +0100	[thread overview]
Message-ID: <20210430181300.00003f78@Huawei.com> (raw)
In-Reply-To: <956254cdffbc7d07b30e41f7b7cb41cf60bbfc72.1619621413.git.mchehab+huawei@kernel.org>

On Wed, 28 Apr 2021 16:51:47 +0200
Mauro Carvalho Chehab <mchehab+huawei@kernel.org> wrote:

> Commit dd8088d5a896 ("PM: runtime: Add pm_runtime_resume_and_get to deal with usage counter")
> added pm_runtime_resume_and_get() in order to automatically handle
> dev->power.usage_count decrement on errors.
> 
> Use the new API, in order to cleanup the error check logic.
> 
> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
NOP patch so 
Reviewed-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
> ---
>  drivers/staging/media/tegra-video/csi.c | 3 +--
>  drivers/staging/media/tegra-video/vi.c  | 3 +--
>  2 files changed, 2 insertions(+), 4 deletions(-)
> 
> diff --git a/drivers/staging/media/tegra-video/csi.c b/drivers/staging/media/tegra-video/csi.c
> index 033a6935c26d..e938bf4c48b6 100644
> --- a/drivers/staging/media/tegra-video/csi.c
> +++ b/drivers/staging/media/tegra-video/csi.c
> @@ -298,10 +298,9 @@ static int tegra_csi_enable_stream(struct v4l2_subdev *subdev)
>  	struct tegra_csi *csi = csi_chan->csi;
>  	int ret, err;
>  
> -	ret = pm_runtime_get_sync(csi->dev);
> +	ret = pm_runtime_resume_and_get(csi->dev);
>  	if (ret < 0) {
>  		dev_err(csi->dev, "failed to get runtime PM: %d\n", ret);
> -		pm_runtime_put_noidle(csi->dev);
>  		return ret;
>  	}
>  
> diff --git a/drivers/staging/media/tegra-video/vi.c b/drivers/staging/media/tegra-video/vi.c
> index 7a09061cda57..1298740a9c6c 100644
> --- a/drivers/staging/media/tegra-video/vi.c
> +++ b/drivers/staging/media/tegra-video/vi.c
> @@ -297,10 +297,9 @@ static int tegra_channel_start_streaming(struct vb2_queue *vq, u32 count)
>  	struct tegra_vi_channel *chan = vb2_get_drv_priv(vq);
>  	int ret;
>  
> -	ret = pm_runtime_get_sync(chan->vi->dev);
> +	ret = pm_runtime_resume_and_get(chan->vi->dev);
>  	if (ret < 0) {
>  		dev_err(chan->vi->dev, "failed to get runtime PM: %d\n", ret);
> -		pm_runtime_put_noidle(chan->vi->dev);
>  		return ret;
>  	}
>  


  reply	other threads:[~2021-04-30 17:14 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-28 14:51 [PATCH v4 00/79] Address some issues with PM runtime at media subsystem Mauro Carvalho Chehab
2021-04-28 14:51 ` [PATCH v4 25/79] staging: media: tegra-vde: use pm_runtime_resume_and_get() Mauro Carvalho Chehab
2021-04-29 12:38   ` Dmitry Osipenko
2021-04-30 17:08   ` Jonathan Cameron
2021-04-30 17:11     ` Jonathan Cameron
2021-04-28 14:51 ` [PATCH v4 26/79] staging: media: tegra-video: " Mauro Carvalho Chehab
2021-04-30 17:13   ` Jonathan Cameron [this message]
2021-04-28 15:50 ` [PATCH v4 00/79] Address some issues with PM runtime at media subsystem Johan Hovold
2021-04-29 10:18   ` Mauro Carvalho Chehab
2021-04-29 12:33     ` Dmitry Osipenko
2021-04-29 15:17     ` Johan Hovold

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=20210430181300.00003f78@Huawei.com \
    --to=jonathan.cameron@huawei.com \
    --cc=devel@driverdev.osuosl.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=jonathanh@nvidia.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=linux-tegra@vger.kernel.org \
    --cc=linuxarm@huawei.com \
    --cc=mauro.chehab@huawei.com \
    --cc=mchehab+huawei@kernel.org \
    --cc=mchehab@kernel.org \
    --cc=skomatineni@nvidia.com \
    --cc=thierry.reding@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox