[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <de636a0a-3fd7-d61e-c361-fa50a6d34f17@gmail.com>
Date: Thu, 29 Apr 2021 15:33:59 +0300
From: Dmitry Osipenko <digetx@...il.com>
To: Mauro Carvalho Chehab <mchehab+huawei@...nel.org>,
Johan Hovold <johan@...nel.org>
Cc: Shawn Tu <shawnx.tu@...el.com>,
Ricardo Ribalda <ribalda@...nel.org>,
Dafna Hirschfeld <dafna.hirschfeld@...labora.com>,
Heiko Stuebner <heiko@...ech.de>, linuxarm@...wei.com,
Todor Tomov <todor.too@...il.com>,
Bjorn Andersson <bjorn.andersson@...aro.org>,
Andrzej Hajda <a.hajda@...sung.com>,
"Lad, Prabhakar" <prabhakar.csengg@...il.com>,
Thierry Reding <thierry.reding@...il.com>,
Pengutronix Kernel Team <kernel@...gutronix.de>,
linux-stm32@...md-mailman.stormreply.com,
Andrzej Pietrasiewicz <andrzejtp2010@...il.com>,
Leon Luo <leonl@...pardimaging.com>,
Paul Kocialkowski <paul.kocialkowski@...tlin.com>,
Mauro Carvalho Chehab <mchehab@...nel.org>,
Dave Stevenson <dave.stevenson@...pberrypi.com>,
Matt Ranostay <matt.ranostay@...sulko.com>,
Krzysztof Kozlowski <krzk@...nel.org>,
Jonathan Hunter <jonathanh@...dia.com>,
linux-rockchip@...ts.infradead.org, Chen-Yu Tsai <wens@...e.org>,
Andy Gross <agross@...nel.org>,
Matthias Brugger <matthias.bgg@...il.com>,
Dongchun Zhu <dongchun.zhu@...iatek.com>,
Sakari Ailus <sakari.ailus@...ux.intel.com>,
Bingbu Cao <bingbu.cao@...el.com>,
Marek Szyprowski <m.szyprowski@...sung.com>,
Shunqian Zheng <zhengsq@...k-chips.com>,
Tianshu Qiu <tian.shu.qiu@...el.com>,
NXP Linux Team <linux-imx@....com>,
Philipp Zabel <p.zabel@...gutronix.de>,
devel@...verdev.osuosl.org, Jacopo Mondi <jacopo@...ndi.org>,
Sylwester Nawrocki <s.nawrocki@...sung.com>,
linux-tegra@...r.kernel.org,
Alexandre Torgue <alexandre.torgue@...com>,
Wenyou Yang <wenyou.yang@...rochip.com>,
Manivannan Sadhasivam <mani@...nel.org>,
linux-arm-msm@...r.kernel.org,
Sascha Hauer <s.hauer@...gutronix.de>,
Steve Longerbeam <slongerbeam@...il.com>,
linux-media@...r.kernel.org, Maxime Ripard <mripard@...nel.org>,
Stanimir Varbanov <stanimir.varbanov@...aro.org>,
Benoit Parrot <bparrot@...com>,
Helen Koike <helen.koike@...labora.com>,
linux-samsung-soc@...r.kernel.org,
linux-mediatek@...ts.infradead.org,
Jacek Anaszewski <jacek.anaszewski@...il.com>,
mauro.chehab@...wei.com,
Sylwester Nawrocki <sylvester.nawrocki@...il.com>,
"Paul J. Murphy" <paul.j.murphy@...el.com>,
Ezequiel Garcia <ezequiel@...labora.com>,
Daniele Alessandrelli <daniele.alessandrelli@...el.com>,
Chiranjeevi Rapolu <chiranjeevi.rapolu@...el.com>,
linux-arm-kernel@...ts.infradead.org,
Jacob Chen <jacob-chen@...wrt.com>,
Jernej Skrabec <jernej.skrabec@...l.net>,
Hyungwoo Yang <hyungwoo.yang@...el.com>,
linux-kernel@...r.kernel.org, Robert Foss <robert.foss@...aro.org>,
Dan Scally <djrscally@...il.com>,
Sowjanya Komatineni <skomatineni@...dia.com>,
Maxime Coquelin <mcoquelin.stm32@...il.com>,
linux-renesas-soc@...r.kernel.org, Yong Zhi <yong.zhi@...el.com>,
Shawn Guo <shawnguo@...nel.org>
Subject: Re: [PATCH v4 00/79] Address some issues with PM runtime at media
subsystem
29.04.2021 13:18, Mauro Carvalho Chehab пишет:
>> This is perfectly alright. Take a look at ov7740_remove() for example:
>>
>> pm_runtime_get_sync(&client->dev);
>> pm_runtime_disable(&client->dev);
>> pm_runtime_set_suspended(&client->dev);
>> pm_runtime_put_noidle(&client->dev);
>>
>> ov7740_set_power(ov7740, 0);
>>
>> There's an explicit power-off after balancing the PM count and this will
>> work regardless of the power state when entering this function.
> Ok, but this should equally work:
>
> pm_runtime_disable(&client->dev);
> pm_runtime_set_suspended(&client->dev);
>
> ov7740_set_power(ov7740, 0);
>
> as there's no additional cleanup made on this particular driver
> between pm_runtime_get_sync() and pm_runtime_put_noidle().
>
The pm_runtime_get_sync() turns hardware ON by invoking
ov7740_set_power(ov7740, 1), and thus, the ON->OFF is kept balanced in
both RPM-available and RPM-unavailable cases. The RPM state of device
should be reset after driver removal.
It doesn't look like any additional cleanups are needed by that ov7740
driver. The driver removal is opposite to the probe, hence it should be
correct as-is.
Powered by blists - more mailing lists