EXA support for nv driver

Benjamin Herrenschmidt benh at kernel.crashing.org
Wed Aug 24 16:08:43 PDT 2005

On Wed, 2005-08-24 at 10:18 +0200, Lars Knoll wrote:
> Hi,
> I've hacked the nvidia driver lately to add EXA support to it, and at the same 
> time cleaned up some (but far from all) of the number magic in nv_hw.c. I 
> also added some documentation on how to initialize the HW to be able to do 
> DMA (at least as far as I understood it ;-)
> I implemented the uploadToScreen/downloadFromScreen hooks, but they require 
> access to the AGP file descriptor (so that the driver can allocate mmap the 
> GART). Currently the AGP code in Xorg doesn't export this, so I had to add a 
> small hook there as well.

You certainly do _not_ want to mmap the AGP aperture via the AGP file
descriptor. That will not work on a number of chipsets that can't expose
the AGP aperture to the CPU. You need to use the DRM AGP mapping
functions instead which can deal with that case.

> The upload/download hooks are working for me on a GeForce 6600, but I had 
> reports that they don't work on some other hardware. I hope to be able to get 
> my hands on some older hardware soon, so I can test myself.
> There is a preliminary implementation for the composite hook available, but 
> the implementation is wrong, because the blending operation seems to expect 
> non premultiplied pixmaps. I have an idea how to do it properly and will 
> probably work on that as my time permits.
> You can find the patches at: 
> http://trolls.troll.no/lars/patches/nv.diff
> http://trolls.troll.no/lars/patches/lnx_agp.diff
> Related to this, I think we should change the signature of 
>     Bool        (*UploadToScreen) (PixmapPtr            pDst,
>                                    char                 *src,
>                                    int                  src_pitch);
> in ExaAccelInfoRec to
>     Bool        (*UploadToScreen) (PixmapPtr            pDst,
>                                    int x, int y, int w, int h,
>                                    char                 *src,
>                                    int                  src_pitch);
> to match the DownloadFromScreen pointer, and allow us to use UploadToScreen to 
> accelerate PutImage. Any opinions?
> Lars
> _______________________________________________
> xorg mailing list
> xorg at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/xorg

More information about the xorg mailing list