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

2015-11-05 Thread Vinod Koul
On Thu, Nov 05, 2015 at 03:15:18AM +0100, Rafael J. Wysocki wrote: > > > + Rafael > > > > > > This is contrariry to what I see, If my driver is runtime suspended and on > > > suspend, it gets runtime resumed and then suspended > > > > Since I was late to the thread, can you explain what kind of

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

2015-11-05 Thread Vinod Koul
On Thu, Nov 05, 2015 at 03:15:18AM +0100, Rafael J. Wysocki wrote: > > > + Rafael > > > > > > This is contrariry to what I see, If my driver is runtime suspended and on > > > suspend, it gets runtime resumed and then suspended > > > > Since I was late to the thread, can you explain what kind of

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

2015-11-04 Thread Rafael J. Wysocki
On Wednesday, November 04, 2015 08:59:43 AM Kevin Hilman wrote: > Vinod Koul writes: > > > On Tue, Nov 03, 2015 at 01:25:09PM -0800, Kevin Hilman wrote: > >> > /* Enable clock before accessing register */ > >> > -ret = tegra_dma_runtime_resume(dev); > >> > +ret =

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

2015-11-04 Thread Kevin Hilman
Vinod Koul writes: > On Tue, Nov 03, 2015 at 01:25:09PM -0800, Kevin Hilman wrote: >> >/* Enable clock before accessing register */ >> > - ret = tegra_dma_runtime_resume(dev); >> > + ret = pm_runtime_get_sync(dev); >> >> If you are runtime suspended then

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

2015-11-04 Thread Vinod Koul
On Tue, Nov 03, 2015 at 01:25:09PM -0800, Kevin Hilman wrote: > > /* Enable clock before accessing register */ > > - ret = tegra_dma_runtime_resume(dev); > > + ret = pm_runtime_get_sync(dev); > > If you are runtime suspended then core will runtime resume

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

2015-11-04 Thread Rafael J. Wysocki
On Wednesday, November 04, 2015 08:59:43 AM Kevin Hilman wrote: > Vinod Koul writes: > > > On Tue, Nov 03, 2015 at 01:25:09PM -0800, Kevin Hilman wrote: > >> > /* Enable clock before accessing register */ > >> > -ret = tegra_dma_runtime_resume(dev); > >>

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

2015-11-04 Thread Kevin Hilman
Vinod Koul writes: > On Tue, Nov 03, 2015 at 01:25:09PM -0800, Kevin Hilman wrote: >> >/* Enable clock before accessing register */ >> > - ret = tegra_dma_runtime_resume(dev); >> > + ret = pm_runtime_get_sync(dev); >> >> If you are

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

2015-11-04 Thread Vinod Koul
On Tue, Nov 03, 2015 at 01:25:09PM -0800, Kevin Hilman wrote: > > /* Enable clock before accessing register */ > > - ret = tegra_dma_runtime_resume(dev); > > + ret = pm_runtime_get_sync(dev); > > If you are runtime suspended then core will runtime resume

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

2015-11-03 Thread Kevin Hilman
Jon Hunter writes: > On 29/10/15 01:57, Vinod Koul wrote: >> On Wed, Oct 28, 2015 at 01:32:12PM +, Jon Hunter wrote: >>> >>> On 28/10/15 07:03, Vinod Koul wrote: On Fri, Oct 16, 2015 at 09:25:52AM +0100, Jon Hunter wrote: [...] > /* Enable clock before accessing register */

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

2015-11-03 Thread Jon Hunter
On 29/10/15 01:57, Vinod Koul wrote: > On Wed, Oct 28, 2015 at 01:32:12PM +, Jon Hunter wrote: >> >> On 28/10/15 07:03, Vinod Koul wrote: >>> On Fri, Oct 16, 2015 at 09:25:52AM +0100, Jon Hunter wrote: @@ -1182,14 +1182,11 @@ static int tegra_dma_alloc_chan_resources(struct

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

2015-11-03 Thread Kevin Hilman
Jon Hunter writes: > On 29/10/15 01:57, Vinod Koul wrote: >> On Wed, Oct 28, 2015 at 01:32:12PM +, Jon Hunter wrote: >>> >>> On 28/10/15 07:03, Vinod Koul wrote: On Fri, Oct 16, 2015 at 09:25:52AM +0100, Jon Hunter wrote: [...] > /* Enable clock before

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

2015-11-03 Thread Jon Hunter
On 29/10/15 01:57, Vinod Koul wrote: > On Wed, Oct 28, 2015 at 01:32:12PM +, Jon Hunter wrote: >> >> On 28/10/15 07:03, Vinod Koul wrote: >>> On Fri, Oct 16, 2015 at 09:25:52AM +0100, Jon Hunter wrote: @@ -1182,14 +1182,11 @@ static int tegra_dma_alloc_chan_resources(struct

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

2015-10-28 Thread Vinod Koul
On Wed, Oct 28, 2015 at 01:32:12PM +, Jon Hunter wrote: > > On 28/10/15 07:03, Vinod Koul wrote: > > On Fri, Oct 16, 2015 at 09:25:52AM +0100, Jon Hunter wrote: > >> @@ -1182,14 +1182,11 @@ static int tegra_dma_alloc_chan_resources(struct > >> dma_chan *dc) > >> { > >>struct

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

2015-10-28 Thread Jon Hunter
On 28/10/15 07:03, Vinod Koul wrote: > On Fri, Oct 16, 2015 at 09:25:52AM +0100, Jon Hunter wrote: >> @@ -1182,14 +1182,11 @@ static int tegra_dma_alloc_chan_resources(struct >> dma_chan *dc) >> { >> struct tegra_dma_channel *tdc = to_tegra_dma_chan(dc); >> struct tegra_dma *tdma =

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

2015-10-28 Thread Vinod Koul
On Fri, Oct 16, 2015 at 09:25:52AM +0100, Jon Hunter wrote: > @@ -1182,14 +1182,11 @@ static int tegra_dma_alloc_chan_resources(struct > dma_chan *dc) > { > struct tegra_dma_channel *tdc = to_tegra_dma_chan(dc); > struct tegra_dma *tdma = tdc->tdma; > - int ret; > >

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

2015-10-28 Thread Jon Hunter
On 28/10/15 07:03, Vinod Koul wrote: > On Fri, Oct 16, 2015 at 09:25:52AM +0100, Jon Hunter wrote: >> @@ -1182,14 +1182,11 @@ static int tegra_dma_alloc_chan_resources(struct >> dma_chan *dc) >> { >> struct tegra_dma_channel *tdc = to_tegra_dma_chan(dc); >> struct tegra_dma *tdma =

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

2015-10-28 Thread Vinod Koul
On Fri, Oct 16, 2015 at 09:25:52AM +0100, Jon Hunter wrote: > @@ -1182,14 +1182,11 @@ static int tegra_dma_alloc_chan_resources(struct > dma_chan *dc) > { > struct tegra_dma_channel *tdc = to_tegra_dma_chan(dc); > struct tegra_dma *tdma = tdc->tdma; > - int ret; > >

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

2015-10-28 Thread Vinod Koul
On Wed, Oct 28, 2015 at 01:32:12PM +, Jon Hunter wrote: > > On 28/10/15 07:03, Vinod Koul wrote: > > On Fri, Oct 16, 2015 at 09:25:52AM +0100, Jon Hunter wrote: > >> @@ -1182,14 +1182,11 @@ static int tegra_dma_alloc_chan_resources(struct > >> dma_chan *dc) > >> { > >>struct

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

2015-10-16 Thread Jon Hunter
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

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

2015-10-16 Thread Jon Hunter
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