linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Dmitry Osipenko <digetx@gmail.com>
To: Sowjanya Komatineni <skomatineni@nvidia.com>,
	thierry.reding@gmail.com, jonathanh@nvidia.com,
	frankc@nvidia.com, hverkuil@xs4all.nl
Cc: linux-media@vger.kernel.org, linux-tegra@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [RFC PATCH v1 3/5] media: tegra-video: Move PM runtime handle to streaming
Date: Thu, 30 Apr 2020 16:24:19 +0300	[thread overview]
Message-ID: <6a676161-e948-9afc-296b-ccd1df202e36@gmail.com> (raw)
In-Reply-To: <f6e34203-3e4b-b804-30a5-bf78445ab366@gmail.com>

28.04.2020 19:04, Dmitry Osipenko пишет:
...
>>>>>>>> +             ret = pm_runtime_get_sync(csi->dev);
>>>>>>>> +             if (ret < 0) {
>>>>>>>> +                     dev_err(csi->dev,
>>>>>>>> +                             "failed to get runtime PM: %d\n",
>>>>>>>> ret);
>>>>>>>> +                     pm_runtime_put_noidle(csi->dev);
>>> Why this pm_runtime_put_noidle() is needed? This should be wrong, please
>>> remove it.
>>
>> pm_runtime_get_sync() increments power.usage_count prior to rpm_resume
>>
>> if rpm_resume fails it does not decrement usage_count.
>>
>> So to balance count on failure, calling pm_runtime_put_noidle()
> 
> Hmm.. maybe you're right. I'll need to take a more detailed look.
> 

I checked the RPM's use-count after error condition and yours variant is
correct. Perhaps we should start correcting all other Tegra drivers that
do not handle the RPM error properly.

  reply	other threads:[~2020-04-30 13:24 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-04-28  4:20 [RFC PATCH v1 0/5] media: tegra: Tegra video driver follow-up patches Sowjanya Komatineni
2020-04-28  4:20 ` [RFC PATCH v1 1/5] MAINTAINERS: Rename Tegra Video driver path Sowjanya Komatineni
2020-04-28  4:20 ` [RFC PATCH v1 2/5] media: tegra: Rename driver path to tegra-video Sowjanya Komatineni
2020-04-28  4:20 ` [RFC PATCH v1 3/5] media: tegra-video: Move PM runtime handle to streaming Sowjanya Komatineni
2020-04-28 13:59   ` Dmitry Osipenko
2020-04-28 14:51     ` Sowjanya Komatineni
2020-04-28 14:59       ` Dmitry Osipenko
2020-04-28 15:08         ` Sowjanya Komatineni
2020-04-28 15:15           ` Dmitry Osipenko
2020-04-28 15:22             ` Sowjanya Komatineni
2020-04-28 16:04               ` Dmitry Osipenko
2020-04-30 13:24                 ` Dmitry Osipenko [this message]
2020-04-28 14:05   ` Dmitry Osipenko
2020-04-28  4:20 ` [RFC PATCH v1 4/5] media: tegra-video: Rearrange SoC specific to Tegra210 and cleanup files Sowjanya Komatineni
2020-04-28  4:20 ` [RFC PATCH v1 5/5] media: tegra-video: Remove module macros for vi and csi driver Sowjanya Komatineni
2020-04-28  7:38 ` [RFC PATCH v1 0/5] media: tegra: Tegra video driver follow-up patches Hans Verkuil
2020-04-28 14:52   ` Sowjanya Komatineni

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=6a676161-e948-9afc-296b-ccd1df202e36@gmail.com \
    --to=digetx@gmail.com \
    --cc=frankc@nvidia.com \
    --cc=hverkuil@xs4all.nl \
    --cc=jonathanh@nvidia.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=linux-tegra@vger.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;
as well as URLs for NNTP newsgroup(s).