On Wed, 14 Mar 2007, Vassili Karpov wrote:

> Hello,
>
> Here's a quick overview of the problem i'm experiencing, since a lot
> of the stuff involved is outside of my area of expertise i would
> highly appreciate any feedback.
>
> I'm using Mesa to view video due to lack of PBO the best performance
> can only be achieved with glXAllocateMemoryMESA + YCBCR. Yesterday i
> augmented the driver for my video4linux2 compatible capture board with
> USERPTR support, i.e. i can supply an arbitrary user space pointer and
> the diver will create kernel pages to map this area, pin down the
> pages in memory and put the video there without much overhead.

[..snip..]

>
> The grabber board is just usual USB device and frames are captured
> via isochronous transfers (so there's a lot of small data movements
> spread over time instead of one large burst)
>
> The driver does nothing in particular with USERPTR grabbing, in other
> words there's exactly one code path for any memory be it AGP or not.
> `get_user_pages kernel' function is called on the user supplied pointer
> and then this area is populated with memcpy from isochronous irq.
>
> The performance boost this `zero-copy' approach provides is not easy
> to give up (especially on this not so fast machine)

[..snip..]

Apparently the problem is that pages obtained by the call to
get_user_pages admit caching, so adding flush_dcache_range upon
dequeuing buffer in the device driver removes the artifacts.

Even with this i still get roughly a 3x speedup compared to
grab to some buffer then copy to gart with memcpy.

However i believe things can be improved:
1. call glXGetMemoryOffsetMESA
2. tell the driver to grab into "special" memory with this offset

This should avoid the need of having to mess with get_user_pages and
caching altogether.

Question is though, is this possible at all?

-- 
vale

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Mesa3d-dev mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mesa3d-dev

Reply via email to