[MPlayer-dev-eng] DMA or not DMA

Attila Kinali attila at kinali.ch
Wed Nov 24 14:16:44 CET 2004


On Wed, 24 Nov 2004 14:01:33 +0100 (CET)
Arpi <arpi at mplayerhq.hu> wrote:

> > > The problem is multiple drivers trying to use the hardware at the same 
> > > time.
> > 
> > We have that problem with mga_vid already, but as X and mga_vid
> > are accessing different memory regions, that's not a big issue.
> 
> it is, as the card cannot do multiple dma transfers at same time.
> but on framebuffer, it should work fine.

Does X really use DMA ?
If so, i'd have to stay on fb as you said.

> > The only real issue i see is, that during a DMA transfere,
> > MPlayer has either to sleep until the buffer is coppied or
> > that the codec has to use a copy of the buffer to work on.
> > Both options are not very exciting.
> 
> in case of dma, codecs decode to system memory, then copy it
> over dma. the only trick is that you need 2 (or more) buffers
> for B frames, so while decoding second B frame, it wont overwrite
> the buffer of first B (which is being transferred by dma)
> it mean a little bit more memory, but doesnt mean speed loss.

How do i get the information whether i have to do an extra copy
or not from the vo module? Or can i tell the codec not to write to
a buffer until the next is ready ?

 
> anyway, i have a sponsor interested in a dma-capable mga_vid.
> they need to drive 5 or 6 matrox g450 cards (pci version) in a pc,
> all playing back 800x600x25fps or 720x576x25fps video (possibly
> on both heads, so total 12 video streams).

Oh.. sounds fun. 5 DMA channels, all correctly set up and coordinated.

> we done some initial tests last weekend, and found that a 3ghz
> p4 is fully loaded by playing 4 streams over mga_vid.
> (agp mga_vid was 17% cpu usg, pci ones eat 25% each)
> using fbdev in 32bpp, only 2 playbacks possible, at 16bpp only 3.
> the decoding was only 9% cpu per stream, the rest was eaten up by
> video data transfers. so dma could help here a lot.

That would be a nice testing enviroment. I guess i have to do
the DMA stuff a bit earlier :)


BTW: where do you get all those sponsores ?


			Attila Kinali




More information about the MPlayer-dev-eng mailing list