[Nouveau] How to directly access GPU memory
j.glisse at gmail.com
Wed Mar 23 11:22:02 PDT 2011
On Wed, Mar 9, 2011 at 1:54 PM, Nikolaus Rath <Nikolaus at rath.org> wrote:
> I would like to directly access some GPU memory. Is there some standard
> way to do this when using the nouveau driver, e.g. by mmap'ing a
> specific range of /dev/something, or do I have to write my own kernel
> module to set up the mapping of the PCIe BARs?
> If there is a standard way, is that only standard for the nouveau driver
> or will the same procedure work for other drivers too (in particular the
> proprietary nvidia driver)?
You can try to mmap the pci bar but neither nouveau or the closed
source driver is intended to play nicely with program that access
video memory directly, you may expect crash and losing data. You need
to play along the rules of each driver by using the proper API to
allocate & access memory which is different btw nouveau and closed
driver or others driver out there.
More information about the Nouveau