Re: [PATCH net-next v3 2/7] dma: avoid redundant calls for sync operations

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

 



From: Robin Murphy <robin.murphy@xxxxxxx>
Date: Wed, 14 Feb 2024 17:55:23 +0000

> On 2024-02-14 4:21 pm, Alexander Lobakin wrote:

[...]

>> +        /*
>> +         * Synchronization is not possible when none of DMA sync ops
>> +         * is set. This check precedes the below one as it disables
>> +         * the synchronization unconditionally.
>> +         */
>> +        dev->dma_skip_sync = true;
>> +    else if (ops->flags & DMA_F_CAN_SKIP_SYNC)
> 
> Personally I'd combine this into the dma-direct condition.

Please read the code comment a couple lines above :D

> 
>> +        /*
>> +         * Assume that when ``DMA_F_CAN_SKIP_SYNC`` is advertised,
>> +         * the conditions for synchronizing are the same as with
>> +         * the direct DMA.
>> +         */
>> +        dev->dma_skip_sync = dev_is_dma_coherent(dev);
>> +    else
>> +        dev->dma_skip_sync = false;
>> +}
>> +#endif /* CONFIG_DMA_NEED_SYNC */

[...]

Thanks,
Olek




[Index of Archives]     [Linux Samsung SoC]     [Linux Rockchip SoC]     [Linux Actions SoC]     [Linux for Synopsys ARC Processors]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]


  Powered by Linux