Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1215268
| From | Jon Hunter <jonathanh@nvidia.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [RFC PATCH 1/7] DMA: tegra-apb: Correct runtime-pm usage |
| Date | 2015-08-28 12:40 +0200 |
| Message-ID | <q2peG-EC-7@gated-at.bofh.it> (permalink) |
| References | (1 earlier) <q0ZZ1-vR-15@gated-at.bofh.it> <q10Ln-1GP-13@gated-at.bofh.it> <q19vj-5Zj-9@gated-at.bofh.it> <q1iRY-2x2-7@gated-at.bofh.it> <q1vcu-3QR-19@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On 25/08/15 23:46, Rafael J. Wysocki wrote:
> On 8/25/2015 11:37 AM, Jon Hunter wrote:
[snip]
>> Vinod, thinking about this some more, I am wondering if it is just
>> better to get rid of the suspend/resume callbacks and simply handling
>> the state in the runtime suspend/resume callbacks. I think that would be
>> safe too, because once the clock has been disabled, then who knows what
>> the context state will be.
>
> One caveat here: system suspend may be invoked at any time, so you need
> to ensure that the device is properly suspended when that happens.
>
> I believe you at least need a ->suspend callback for that.
Thanks, makes sense.
On a related note, I see a few drivers, including this DMA driver doing
the following in the driver ->remove callback.
pm_runtime_disable(&pdev->dev);
!pm_runtime_status_suspended(&pdev->dev))
tegra_dma_runtime_suspend(&pdev->dev);
I understand that the code is trying to ensure that the device is
suspended regardless of whether rpm is enabled or not in the kernel
config. However, looking at the pm_runtime_status_suspended() function,
AFAICT, it will always return false above as the disable_depth will be
greater than 0. So I am concerned that the tegra_dma_runtime_suspend()
is called even when not needed? However, I could also be missing
something here.
Cheers
Jon
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Back to linux.kernel | Previous | Next — Previous in thread | Find similar | Unroll thread
Re: [RFC PATCH 1/7] DMA: tegra-apb: Correct runtime-pm usage Vinod Koul <vinod.koul@intel.com> - 2015-08-23 16:20 +0200
Re: [RFC PATCH 1/7] DMA: tegra-apb: Correct runtime-pm usage Jon Hunter <jonathanh@nvidia.com> - 2015-08-24 10:50 +0200
Re: [RFC PATCH 1/7] DMA: tegra-apb: Correct runtime-pm usage Vinod Koul <vinod.koul@intel.com> - 2015-08-24 11:30 +0200
Re: [RFC PATCH 1/7] DMA: tegra-apb: Correct runtime-pm usage Jon Hunter <jonathanh@nvidia.com> - 2015-08-24 15:30 +0200
Re: [RFC PATCH 1/7] DMA: tegra-apb: Correct runtime-pm usage Vinod Koul <vinod.koul@intel.com> - 2015-08-24 16:20 +0200
Re: [RFC PATCH 1/7] DMA: tegra-apb: Correct runtime-pm usage "Rafael J. Wysocki" <rjw@rjwysocki.net> - 2015-08-25 01:40 +0200
Re: [RFC PATCH 1/7] DMA: tegra-apb: Correct runtime-pm usage Jon Hunter <jonathanh@nvidia.com> - 2015-08-25 11:40 +0200
Re: [RFC PATCH 1/7] DMA: tegra-apb: Correct runtime-pm usage "Rafael J. Wysocki" <rafael.j.wysocki@intel.com> - 2015-08-26 00:50 +0200
Re: [RFC PATCH 1/7] DMA: tegra-apb: Correct runtime-pm usage Jon Hunter <jonathanh@nvidia.com> - 2015-08-28 12:40 +0200
csiph-web