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?
Thanks, this does indeed work nicely with a static display configuration.
However... it looks like the driver does the FBIOGET_DMABUF operation during eglInitialize() and not during eglCreateWindowSurface(), so if the user hotplugs a monitor and we change the underlying framebuffer properties then we need to completely reinitialize EGL to use the new display (I'm thinking of a device with a built-in display and an optional external monitor). Do you think there's any chance of this changing in a future driver update?
Unfortunately not. EGL has to open all the fbdev devices in eglInitialize to learn which pixel format each are using, which it then uses to filter the list of EGLConfigs and only sets EGL_WINDOW_BIT on those EGLConfigs with compatible red/green/blue/alpha component sizes. This means for example, if the fbdev devices are all using RGB565 or BGR565 pixel formats, EGL will only tag EGLConfigs with EGL_WINDOW_BIT if they have EGL_RED_SIZE=5, EGL_GREEN_SIZE=6, EGL_BLUE_SIZE=5 & EGL_ALPHA_SIZE=0. The list of EGLConfigs and their attributes must be static while an EGLDisplay is active, so EGL can't re-parse. You might be able to eglTerminate the EGLDisplay and then re-eglInitialize it after monitor hotplug, but I'm not sure how well that's tested - worth a try though.
TBH, monitor hotplug isn't well served with fbdev & no window system EGL. If you want to do that, you'd likely be better off with KMS and a Wayland compositor, though I'm not sure those drivers are available for your platform?
I have only seen fbdev and X11 drivers and we don't want to use X11 (although the kernel side of atomic KMS is available). I can't see any Wayland drivers at ARM® Mali™ Midgard GPU User-Space Binary Drivers - Mali Developer Center, would you expect them to appear there (I'm using the r6p0-02rel0 Firefly drivers)?
I would expect them there indeed: as they are downloadable for odroid xu3 (mali t62x) on the same page.
For firefly I just have the firefly X11 drivers up and running on mainline kernel (4.7), however performance isn't that great yet - probably armsoc DDX is bottleneck here.
Anyone knows if firefly mali t76x wayland GBM drivers is in the pipeline to be released? Would be really great!