Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH 2/3] package/freescale-imx/imx-gpu-viv: add IMX8 framebuffer support
@ 2023-01-10  9:33 Lang Daniel via buildroot
  2023-01-14 22:04 ` Thomas Petazzoni via buildroot
  0 siblings, 1 reply; 3+ messages in thread
From: Lang Daniel via buildroot @ 2023-01-10  9:33 UTC (permalink / raw)
  To: buildroot@buildroot.org; +Cc: Gary Bisson, tuzakli.refik@gmail.com

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.

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

Signed-off-by: Daniel Lang <d.lang@abatec.at>
---
 package/freescale-imx/imx-gpu-viv/Config.in   |  4 ++--
 .../freescale-imx/imx-gpu-viv/imx-gpu-viv.mk  | 20 ++++++++++---------
 2 files changed, 13 insertions(+), 11 deletions(-)

diff --git a/package/freescale-imx/imx-gpu-viv/Config.in b/package/freescale-imx/imx-gpu-viv/Config.in
index bc30798ca5..a245a1d089 100644
--- a/package/freescale-imx/imx-gpu-viv/Config.in
+++ b/package/freescale-imx/imx-gpu-viv/Config.in
@@ -45,8 +45,8 @@ choice
 
 config BR2_PACKAGE_IMX_GPU_VIV_OUTPUT_FB
      bool "Framebuffer"
-     # The i.MX8 blob doesn't support FB output
-     depends on !BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX8M
+     # Framebuffer output on IMX8 (ARM64) uses the wayland libraries
+     select BR2_PACKAGE_WAYLAND if BR2_aarch64
 
 config BR2_PACKAGE_IMX_GPU_VIV_OUTPUT_WL
      bool "Wayland"
diff --git a/package/freescale-imx/imx-gpu-viv/imx-gpu-viv.mk b/package/freescale-imx/imx-gpu-viv/imx-gpu-viv.mk
index e0e8a31533..35929b0e5c 100644
--- a/package/freescale-imx/imx-gpu-viv/imx-gpu-viv.mk
+++ b/package/freescale-imx/imx-gpu-viv/imx-gpu-viv.mk
@@ -26,34 +26,36 @@ endif
 
 IMX_GPU_VIV_LIB_TARGET = $(call qstrip,$(BR2_PACKAGE_IMX_GPU_VIV_OUTPUT))
 
-# 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
 
 # Instead of building, we fix up the inconsistencies that exist
 # in the upstream archive here. We also remove unused backend files.
 # Make sure these commands are idempotent.
 define IMX_GPU_VIV_BUILD_CMDS
-     cp -dpfr $(@D)/gpu-core/usr/lib/$(IMX_GPU_VIV_LIB_TARGET)/* $(@D)/gpu-core/usr/lib/
+     cp -dpfr $(@D)/gpu-core/usr/lib/$(IMX_GPU_VIV_BACKEND_DIR)/* $(@D)/gpu-core/usr/lib/
      $(foreach backend,fb wayland, \
            $(RM) -r $(@D)/gpu-core/usr/lib/$(backend)
      )
-- 
2.25.1
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2023-01-16  8:01 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-01-10  9:33 [Buildroot] [PATCH 2/3] package/freescale-imx/imx-gpu-viv: add IMX8 framebuffer support Lang Daniel via buildroot
2023-01-14 22:04 ` Thomas Petazzoni via buildroot
2023-01-16  8:01   ` Lang Daniel via buildroot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox