I'm using the Mali-T76x fbdev drivers for Firefly and want to use /dev/fb1 as a second display. Is it possible to call eglGetDisplay() with an argument other than EGL_DEFAULT_DISPLAY in order to use a different framebuffer device?
Don't need to change the EGLDispaly. On Mali the EGLDisplay ~= which GPU to use, where there's almost always only one.
Instead, try calling eglCreateWindowSurface with the index of the /dev/fbX framebuffer device as the native window parameter.. So /dev/fb1 would be eglCreateWindowSurface(my_egl_display, my_egl_config, 1, my_attrib_list).
Thanks, that does seem to work (I have tested with each display independently but have not tried both in the same process).
Is that a change to EGLNativeWindowType with recent drivers? All of the examples I can find pass a pointer to a fbdev_window structure into that argument.
No, it's been in there since the first Midgard-based GPU, T604.. So thanks, I designed that particular feature into the driver ~5 years ago... glad to see it a) works and b) is genuinely useful to someone. :-)
Passing a pointer to the fbdev_window struct is the only way to get non-fullscreen rendering. Whereas if you just want to render to the whole framebuffer, you only need to pass in the integer value of the fbdev you want to render to. Originally, support for passing a pointer to an fbdev_window was added for backwards compatability with Mali-400 drivers, though I suspect the fbdev_window structs might have diverged since then (though not in binary incompatible ways).
View all questions in Graphics and Gaming forum