lkml.org 
[lkml]   [2020]   [Feb]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH v7 14/19] dmaengine: tegra-apb: Keep clock enabled only during of DMA transfer
From
Date

On 06/02/2020 14:31, Dmitry Osipenko wrote:
> 06.02.2020 16:50, Jon Hunter пишет:
>>
>> On 02/02/2020 22:28, Dmitry Osipenko wrote:
>>> It's a bit impractical to enable hardware's clock at the time of DMA
>>> channel's allocation because most of DMA client drivers allocate DMA
>>> channel at the time of the driver's probing, and thus, DMA clock is kept
>>> always-enabled in practice, defeating the whole purpose of runtime PM.
>>>
>>> Signed-off-by: Dmitry Osipenko <digetx@gmail.com>
>>> ---
>>> drivers/dma/tegra20-apb-dma.c | 35 ++++++++++++++++++++++++-----------
>>> 1 file changed, 24 insertions(+), 11 deletions(-)
>> What about something like ......
>> @@ -581,6 +582,7 @@ static bool handle_continuous_head_request(struct tegra_dma_channel *tdc,
>> hsgreq = list_first_entry(&tdc->pending_sg_req, typeof(*hsgreq), node);
>> if (!hsgreq->configured) {
>> tegra_dma_stop(tdc);
>> + pm_runtime_put(tdc->tdma->dev);
>> dev_err(tdc2dev(tdc), "Error in DMA transfer, aborting DMA\n");
>> tegra_dma_abort_all(tdc);
>> return false;
>
> Yes, that it's what you suggested to do in the reply to v6.
>
> Alright, I'll drop v7 patch #13 and add the put to this patch #14.

Yes I was not sure if it was clear. However, this seems a bit of an
easier change and should keep the 'busy' status somewhat consistent with
the rpm state.

Jon

--
nvpublic

\
 
 \ /
  Last update: 2020-02-06 15:34    [W:0.047 / U:1.236 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site