A mesa driver for sun4i-drm is defined which will call into lima when 3D
rendering is requested from it.
This uses the renderonly library from mesa, which hides the buffer
sharing details between the two drivers from the application.
This allows applications that expect a single device node like
/dev/dri/card0 (such as kmscube) to run unmodified on Allwinner devices
that use the sun4i-drm driver for display and have a Mali400 gpu using
lima.
This follows the model of the vc4+pl111 drivers existing in mesa.
The code implemented here is mostly borrowed from that particular
implementation.
The driver is called sun4i in mesa and it will intentionally generate
sun4i-drm_dri.so.
This is because mesa will look for a *_dri.so user space driver named
after the corresponding kernel driver, which in this case is called
sun4i-drm.
Pushed a new revision with your points reviewed and the license info updated. I didn't add a licensing info to every file, I left the licensing info in the same corresponding files that pl111 had it.
A mesa driver for sun4i-drm is defined which will call into lima when 3D rendering is requested from it. This uses the renderonly library from mesa, which hides the buffer sharing details between the two drivers from the application. This allows applications that expect a single device node like /dev/dri/card0 (such as kmscube) to run unmodified on Allwinner devices that use the sun4i-drm driver for display and have a Mali400 gpu using lima.
This follows the model of the vc4+pl111 drivers existing in mesa. The code implemented here is mostly borrowed from that particular implementation.
The driver is called sun4i in mesa and it will intentionally generate sun4i-drm_dri.so. This is because mesa will look for a *_dri.so user space driver named after the corresponding kernel driver, which in this case is called sun4i-drm.
Signed-off-by: Erico Nunes nunes.erico@gmail.com