<div dir="ltr"><div><div><div>Hello<br><br></div>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.<br><br></div>
<div>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 <br>
</div><div>1)ask the GPU driver to reserve a specified amount of memory of each available type<br>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. <br>
</div><div>2)Create one or more memory maps, or update existing memory maps, by associating reserved pages with PTE entries.<br></div><div>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.<br>
</div><div>4)VBO and PBO emulation is provided by usermode driver<br></div><div>5)Memory maps are invalidated when gpu memory is released back to system. <br><br></div><div>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 <br>
</div><div>0)allocate back pages from pool controlled by application(no need to call kernel here)<br></div><div>1)for each updated tile, copy all memory contents from front page to back page<br></div><div>2)update tiles<br>
</div><div>3)notify window manager about updated tiles.<br></div>4)release front upon window manager notification.<br><br></div><div>Regards,<br></div><div>Dmitry<br></div></div>