Re: Re: [PATCH] Re: More than 2Gb problem (dvb related) ?

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

 



e9hack wrote:
> Oliver Endriss wrote:
> > After digging through the code, kernel DMA docs and the saa7146
> > datasheet, I think that we should remove the scatter-gatter voodoo
> > from the budget and av7110 driver. ;-)
> > 
> > What about the attached patch?
> > - easy to understand and maintain
> > - saves 1 page of memory (page table of the SAA7146 MMU)
> > - saves PCI bandwidth (SAA7146 does not read page table anymore)
> > 
> > Comments?
> > 
> 
> pci_alloc_consistent() allocates uncached memory. This makes the
> demuxer very slow. The 'scatter-gatter voodoo' is a better solution.

Oops, you are right.

Anyway, the current implementation is incomplete. If cached memory is
used, there must be a call to pci_dma_sync_sg(...PCI_DMA_FROM_DEVICE)
before data can be read.

> If exist a function, which can allocate cached continuous physical memory,
> you should replace pci_alloc_consistent() with this function.

Afaics a combination of kmalloc() and pci_map_single() should do the
trick. Of course, a call to pci_dma_sync_single(...PCI_DMA_FROM_DEVICE)
must be added, too. Could a DMA expert please confirm this?

CU
Oliver

-- 
--------------------------------------------------------
VDR Remote Plugin 0.3.9 available at
http://www.escape-edv.de/endriss/vdr/
--------------------------------------------------------


_______________________________________________
linux-dvb mailing list
linux-dvb@xxxxxxxxxxx
http://www.linuxtv.org/cgi-bin/mailman/listinfo/linux-dvb

[Index of Archives]     [Linux Media]     [Video 4 Linux]     [Asterisk]     [Samba]     [Xorg]     [Xfree86]     [Linux USB]

  Powered by Linux