Web lists-archives.com

Re: videobuf-dma-contig sync question

Hi Matthieu,

[CC Paul, Paulius]

On Wed, Apr 22, 2009 at 6:50 PM, Matthieu CASTET
<matthieu.castet@xxxxxxxxxx> wrote:
> I don't understand why __videobuf_sync in videobuf-dma-contig isn't a nop.
> All the memory allocated by videobuf-dma-contig is coherent memory. And
> Documentation/DMA-API.txt seems to imply that this memory is coherent
> and doesn't need extra cache operation for synchronization.

Sounds correct. With that in mind the sync doesn't make much sense.
Fixing the videobuf-dma-contig code seems like a good idea to me. Or
is it architecture code that needs to be fixed? Any thoughts Paul?

> Also calling dma_sync_single_for_cpu cause panic on arm for per-device
> coherent memory, because the memory isn't in the main memory[1].
> Why __videobuf_sync need dma_sync_single_for_cpu ?

Initially in V1 of the patch the sync was just a nop, but in V2 the
current behaviour was introduced. I think Paulius requested the sync
implementation and I just blindly added it since it worked well for me
on SuperH anyway:


Paulius, do you really need the sync?


/ magnus

video4linux-list mailing list
Unsubscribe mailto:video4linux-list-request@xxxxxxxxxx?subject=unsubscribe