An approach to GPU memory management(especially for radeon GPUs)

Дмитрий Леонтьев dm.leontiev7 at gmail.com
Thu Sep 26 09:19:00 PDT 2013


Hello

i've an idea how to simplify DRI, and I think this idea will be very useful
for Wayland because it allows wayland clients to partially update their
windows.

I suggest to provide an interface for user-mode applications to
semi-directly control GPU memory map tables.  Instead of working with
"buffers", "textures" via hacky GEM interface, an application should be
able to
1)ask the GPU driver to reserve a specified amount of memory of each
available type
in case of radeon, for example, there will be 2 memory pools: system
memory, gpu memory which can be accessed by UVD and other GPU memory.
2)Create one or more memory maps, or update existing memory maps, by
associating reserved pages with PTE entries.
3)Make a memory map active and tell GPU to perform some operation with it.
Radeon GPUs have multiple VMs so multiple applications can utilize all of
them. Upon completion of operation, driver can notify usermode application
by polling interface.
4)VBO and PBO emulation is provided by usermode driver
5)Memory maps are invalidated when gpu memory is released back to system.

This approach can be used to accelerate partial texture updates by
tile-based flipping of buffers. Instead of flipping whole render buffer,
and application can
0)allocate back pages from pool controlled by application(no need to call
kernel here)
1)for each updated tile, copy all memory contents from front page to back
page
2)update tiles
3)notify window manager about updated tiles.
4)release front upon window manager notification.

Regards,
Dmitry
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/dri-devel/attachments/20130926/a7e4a72e/attachment-0001.html>


More information about the dri-devel mailing list