This is in no way specific to mach64, so I would appreciate if someone 
could help on this.

I would like to read the contents of a DMA buffer in a DRM IOCTL to 
process it with MMIO. Initialy I thought that "buf->address" gave me the 
pointer to that but after some debuggin output I saw that "buf->address" 
has the same info than "buf->offset",

        <7>[drm:mach64_dma_vertex] mach64_dma_vertex: pid=1471 index=0 
count=560 discard=1
        <7>[drm:mach64_dma_dispatch_vertex] mach64_dma_dispatch_vertex: 
buf=0 nbox=0
        <6>[drm] idx = 0, offset=0xe0000000, address=0xe0000000, used=560
                                  ^^^^^^^^^^          ^^^^^^^^^^
                                  ||||||||||          ||||||||||

and in fact both are given the same value in the presence of AGP-GART 
(drm_bufs.h:400):

                buf->bus_address = agp_offset + offset;
                buf->address = (void *)(agp_offset + offset);

although I noticed that with PCI-GART and plain PCI they are done 
differently.

So what is the general approach to get a valid C pointer to a DMA buffer?

Regards,

José Fonseca

_______________________________________________
Dri-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/dri-devel

Reply via email to