Re: [PATCH v7 14/19] dmaengine: tegra-apb: Keep clock enabled only during of DMA transfer

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxx>
>>> ---
>>>  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




[Index of Archives]     [ARM Kernel]     [Linux ARM]     [Linux ARM MSM]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux