This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Multiple displays with mali-fbdev

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?

Parents
  • 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?

Reply
  • 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?

Children