Looking for API to possibly implement "mastered image transfer" for xf86-video-savage
Alex Villacís Lasso
a_villacis at palosanto.com
Thu Nov 13 10:03:54 PST 2008
Michel Dänzer escribió:
> On Mon, 2008-11-10 at 13:37 -0500, Alex Villacís Lasso wrote:
>
>> The question is: is there any xserver support that might enable a driver
>> to get pixmap data into either kind of situation? Either get the pixmap
>> into physically contiguous pages and obtain the physical address of the
>> start of data, or pre-copy the pixmap data into AGP memory (allocated by
>> the driver on startup, if necessary)
>>
>
> There isn't any such support in the X server; it would be mostly a
> kernel level thing anyway.
>
>
>> so that the driver does not need to copy it into AGP memory every
>> single time.
>>
>
> FWIW, that's what the radeon driver does currently.
>
>
>
I could do that in savage too (copy into AGP and set up a mastered image
transfer), but I have seen the radeon code, and it seems that the copy
from system memory to AGP is done using a standard memcpy. Probably I am
missing a clue, but I fail to understand how a memcpy from system memory
to AGP, followed by an accelerated blit from AGP to framebuffer, can be
any faster that a direct memcpy from system memory into the framebuffer.
Particularly when (in the case of XVideo for savage) the copy must be
done every single time for every frame.
I was reading
http://dri.freedesktop.org/wiki/AGP?highlight=(CategoryFaq) , and the
start of the document describes the "DMA model" of AGP usage, which
closely matches what I think I need. Only that instead of allocating an
AGP buffer and using it for all memory transfers, it would be useful to
make the GART (temporarily) point into a buffer in userspace while
preserving its contents. Even one page might be useful to make a faster
transfer. But I might be wrong.
--
perl -e '$x=2.4;print sprintf("%.0f + %.0f = %.0f\n",$x,$x,$x+$x);'
More information about the xorg
mailing list