[Buildroot] [PATCH 2/3] package/freescale-imx/imx-gpu-viv: add IMX8 framebuffer support

Lang Daniel d.lang at abatec.at
Mon Jan 16 08:01:05 UTC 2023


Hello Thomas,

> On Tue, 10 Jan 2023 09:33:14 +0000
> Lang Daniel via buildroot <buildroot at buildroot.org> wrote:
> 
> > According to meta-freescale [0] the framebuffer output can be enabled on
> > IMX8 by using the wayland libraries together with egl.pc.
> > 
> > Tested on an imx8mn by running kmscube. EGL and GLES support detected.
> 
> Indeed. I've seen something similar on the Vivante binaries used on
> STM32MP1 platforms, where the "framebuffer" libs are linked against
> libwayland even though they don't use it.
> 
> > -# Libraries are linked against libdrm, except framebuffer output on ARM
> > +# Libraries are linked against libdrm and wayland, except framebuffer output on ARM
> >  ifneq ($(IMX_GPU_VIV_LIB_TARGET)$(BR2_arm),fby)
> > -IMX_GPU_VIV_DEPENDENCIES += libdrm
> > -endif
> > -
> > -ifeq ($(IMX_GPU_VIV_LIB_TARGET),wayland)
> > -IMX_GPU_VIV_DEPENDENCIES += wayland
> > +IMX_GPU_VIV_DEPENDENCIES += libdrm wayland
> >  endif
> >  
> >  define IMX_GPU_VIV_EXTRACT_CMDS
> >       $(call NXP_EXTRACT_HELPER,$(IMX_GPU_VIV_DL_DIR)/$(IMX_GPU_VIV_SOURCE))
> >  endef
> >  
> > -ifeq ($(IMX_GPU_VIV_LIB_TARGET),fb)
> > +ifeq ($(IMX_GPU_VIV_LIB_TARGET)$(BR2_arm),fby)
> > +IMX_GPU_VIV_BACKEND_DIR = fb
> >  define IMX_GPU_VIV_FIXUP_PKGCONFIG
> >       ln -sf egl_linuxfb.pc $(@D)/gpu-core/usr/lib/pkgconfig/egl.pc
> >  endef
> > -else ifeq ($(IMX_GPU_VIV_LIB_TARGET),wayland)
> > +else
> > +# Framebuffer output on IMX8 (ARM64) uses egl.pc
> > +# and the same libraries as the wayland backend.
> > +IMX_GPU_VIV_BACKEND_DIR = wayland
> > +ifeq ($(IMX_GPU_VIV_LIB_TARGET),wayland)
> >  define IMX_GPU_VIV_FIXUP_PKGCONFIG
> >       ln -sf egl_wayland.pc $(@D)/gpu-core/usr/lib/pkgconfig/egl.pc
> >  endef
> >  endif
> > +endif
> 
> On this second part I'm a bit confused because in the "fb" case on
> ARM64 you're don't have any egl.pc pkgconfig fixup. Are you sure this
> is normal?
> 
> Indeed the code you have does this:
> 
> if framebuffer output and ARM:
>         install egl.pc as a symlink to egl_linuxfb.pc
> else:
>         if wayland output:
>                 install egl.pc as a symlink to egl_wayland.pc
> 
> which means that in the framebuffer case on ARM64, you're not
> installing any egl.pc symlink. Is this really OK?
> 

The AMD64 blob contains multiple versions of egl.pc:
- egl_linuxfb.pc
- egl_wayland.pc
- egl.pc

meta-freescale [1] installs
- egl_linuxfb.pc as egl.pc for framebuffer backend on imx6 and 7.
- egl_wayland.pc as egl.pc for wayland backend
- egl.pc as egl.pc for framebuffer backend on imx8 and beyond.

The imx-gpu-viv package installs/copies everything in one go,
therefore symlinks are created that replace the originally provided
egl.pc if another version is needed.
AMD64 framebuffer backend uses egl.pc directly.

[1]: https://git.yoctoproject.org/meta-freescale/tree/recipes-graphics/imx-gpu-viv/imx-gpu-viv-6.inc#n209

> Thanks!
> 
> Thomas

Regards
Daniel


More information about the buildroot mailing list