Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1266367

Re: [PATCH V2 1/6] dmaengine: tegra-apb: Correct runtime-pm usage

From Jon Hunter <jonathanh@nvidia.com>
Newsgroups linux.kernel
Subject Re: [PATCH V2 1/6] dmaengine: tegra-apb: Correct runtime-pm usage
Date 2015-11-10 11:00 +0100
Message-ID <qtdSy-3na-9@gated-at.bofh.it> (permalink)
References <qsUGe-6X1-1@gated-at.bofh.it> <qsUGf-6X1-25@gated-at.bofh.it> <qsV9g-77p-19@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On 09/11/15 13:57, Andy Shevchenko wrote:
> On Mon, Nov 9, 2015 at 3:23 PM, Jon Hunter <jonathanh@nvidia.com> wrote:
>> The tegra-apb DMA driver enables runtime-pm but never calls
>> pm_runtime_get/put and hence the runtime-pm callbacks are never invoked.
>> The driver manages the clocks by directly calling clk_prepare_enable()
>> and clk_unprepare_disable().
>>
>> Fix this by replacing the clk_prepare_enable() and clk_disable_unprepare()
>> with pm_runtime_get_sync() and pm_runtime_put(), respectively. Note that
>> the consequence of this is that if runtime-pm is disabled, then the clocks
>> will remain on the entire time the driver is loaded. However, if
>> runtime-pm is disabled, then power is not most likely not a concern.
> 
> Nitpick
> 
>> @@ -1539,11 +1534,10 @@ static int tegra_dma_runtime_resume(struct device *dev)
>>  static int tegra_dma_pm_suspend(struct device *dev)
>>  {
>>         struct tegra_dma *tdma = dev_get_drvdata(dev);
>> -       int i;
>> -       int ret;
>> +       int i, ret;
> 
>>  static int tegra_dma_pm_resume(struct device *dev)
>>  {
>>         struct tegra_dma *tdma = dev_get_drvdata(dev);
>> -       int i;
>> -       int ret;
>> +       int i, ret;
> 
> Do you really need that?

Rhetorical question? ;-)

I can drop that.

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 | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH V2 0/6] DMA: tegra-apb: Clean-up Jon Hunter <jonathanh@nvidia.com> - 2015-11-09 14:30 +0100
  [PATCH V2 3/6] dmaengine: tegra-apb: Save and restore word count Jon Hunter <jonathanh@nvidia.com> - 2015-11-09 14:30 +0100
  [PATCH V2 4/6] dmaengine: tegra-apb: Only save channel state for those in use Jon Hunter <jonathanh@nvidia.com> - 2015-11-09 14:30 +0100
    Re: [PATCH V2 4/6] dmaengine: tegra-apb: Only save channel state for  those in use Andy Shevchenko <andy.shevchenko@gmail.com> - 2015-11-09 15:00 +0100
      Re: [PATCH V2 4/6] dmaengine: tegra-apb: Only save channel state for  those in use Jon Hunter <jonathanh@nvidia.com> - 2015-11-10 11:00 +0100
  [PATCH V2 2/6] dmaengine: tegra-apb: Use dev_get_drvdata() Jon Hunter <jonathanh@nvidia.com> - 2015-11-09 14:30 +0100
  [PATCH V2 1/6] dmaengine: tegra-apb: Correct runtime-pm usage Jon Hunter <jonathanh@nvidia.com> - 2015-11-09 14:30 +0100
    Re: [PATCH V2 1/6] dmaengine: tegra-apb: Correct runtime-pm usage Andy Shevchenko <andy.shevchenko@gmail.com> - 2015-11-09 15:00 +0100
      Re: [PATCH V2 1/6] dmaengine: tegra-apb: Correct runtime-pm usage Jon Hunter <jonathanh@nvidia.com> - 2015-11-10 11:00 +0100
  [PATCH V2 6/6] dmaengine: tegra-apb: Free interrupts before killing tasklets Jon Hunter <jonathanh@nvidia.com> - 2015-11-09 14:30 +0100
  [PATCH V2 5/6] dmaengine: tegra-apb: Update driver to use GFP_NOWAIT Jon Hunter <jonathanh@nvidia.com> - 2015-11-09 14:30 +0100

csiph-web