On Mon, Oct 08, 2001 at 03:54:14PM -0700, Sottek, Matthew J wrote: > The drm _does_ allow the client to mmap the video ram. I am not completely sure about this, but as I'm also working on the same thing as Vladimir, capturing for ATI AIWs, I think he is talking about mmap-ing DMA buffers, not the videoram directly.
> > Basically I want to DMA a chunk of video ram into plain RAM. This > >is useful for: video capture, VBI/closed captioning, taking screen > >snapshots. > I think you are going about this the wrong way. No he isn't. > Video capture does not need to get video ram into system ram. If it is a combo card such as AIW, you indeed need to do that. When you instruct the capture board to provide the data, it will appear in videoram. > ram via Xv. (NOT: capture card -> video ram->dma back to system ram) This indeed is how AIW cards work. Back to volodya: I already asked the same question as you about 2 times withing last 6 weeks and the result seems to be that neither DRM nor X have an interface of doing captures. I'm currently working on a new Xv function (XvShmGetImage) that will do this, and also when I see some code from your radeon captures I'll adapt it to r128 and create a new DRM function as well, but first I want to have a non-dma function so that I can test it if it really works and worry about the speed later. Yes I know memcpy from videoram is slow as hell. I imagine that, similarly to r128's new XvPutImage, XvGetImage will try the DRM function and if it fails or isn't implemented, falls back to memcpy. I think this is the right way to do it: think about a new DRM function that is somewhat similar to BlitTexture but the opposite way, implement it on ATI's and send a patch. The code inside DMAXvGetImage will look like this: drmDMA (blahblah); // allocate buffers for (buffer = 0; buffer < buffer_size; buffer ++;) { drmNewUberCoolCapturingFunction; memcpy (shm segment for capturing + buffersize*buffer, drm buffer, buffersize); } drmFree (blahblah); Has anyone a better idea? Bye, Peter Surda (Shurdeek) <[EMAIL PROTECTED]>, ICQ 10236103, +436505122023 -- To boldly go where I surely don't belong.
msg01844/pgp00000.pgp
Description: PGP signature