Re: [PATCH 3/3] media: stk1160: use dma_alloc_noncontiguous API

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

 





On 11.01.22 10:13, Christoph Hellwig wrote:
On Tue, Jan 11, 2022 at 08:55:05AM +0200, Dafna Hirschfeld wrote:
Replace the urb buffers allocation to
use the noncontiguous API. This improve performance
on Arm.
The noncontiguous API require handling
synchronization.
This commit is similar to the one sent to
uvc: [1]

Strange formatting.  I'd flow this as:

Replace the urb buffers allocation to use the noncontiguous API.  This
improve performance on ARM plattform (XXX: insert why here)
The noncontiguous API requires the driver to handle synchronization.
This commit is similar to this one for the uvc driver:

     https://lkml.org/lkml/2021/3/12/1506

I'll reformulate and explain.


@@ -310,6 +311,9 @@ static void stk1160_isoc_irq(struct urb *urb)
  		return;
  	}
+ dma_sync_sgtable_for_cpu(stk1160_get_dmadev(dev), stk_urb->sgt, DMA_FROM_DEVICE);
+	invalidate_kernel_vmap_range(stk_urb->transfer_buffer, urb->transfer_buffer_length);

Besisdes the unreadably long lines, I'd invalidate the vmap range before
the direct mapping range.

I'll send v2 with shorter lines. (the official limit is now 100 char which I still follow).
I can send v2 with limit of 80.

You mean you would call "invalidate_kernel_vmap_range" before "dma_sync_sgtable_for_cpu" ?

Thanks,
Dafna





[Index of Archives]     [Linux Input]     [Video for Linux]     [Gstreamer Embedded]     [Mplayer Users]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]

  Powered by Linux