All of lore.kernel.org
 help / color / mirror / Atom feed
From: Fred Lefranc <fred.lefranc.evs@gmail.com>
To: buildroot@buildroot.org
Cc: Fred Lefranc <fred.lefranc+evs@gmail.com>,
	Jesse Van Gavere <jesseevg@gmail.com>,
	Roy Kollen Svendsen <roykollensvendsen@gmail.com>,
	Thomas Petazzoni <thomas.petazzoni@bootlin.com>
Subject: [Buildroot] [PATCH 1/1] package/qt6/qt6base: don't require gbm for eglfs
Date: Mon, 14 Sep 2026 10:21:36 +0200	[thread overview]
Message-ID: <20260914082138.2802-2-fred.lefranc.evs@gmail.com> (raw)
In-Reply-To: <20260914082138.2802-1-fred.lefranc.evs@gmail.com>

From: Fred Lefranc <fred.lefranc+evs@gmail.com>

BR2_PACKAGE_QT6BASE_EGLFS currently has a hard "depends on
BR2_PACKAGE_HAS_LIBGBM", and qt6base.mk unconditionally adds libgbm
and libdrm to QT6BASE_DEPENDENCIES whenever eglfs is enabled. This is
incorrect: GBM is only needed by the eglfs_kms backend. Other eglfs
device integrations, such as the Vivante framebuffer backend
(eglfs_viv) used on 32-bit i.MX6, provide EGL and OpenGL ES without
GBM or DRM.

As a result, eglfs cannot be enabled on i.MX6 (imx-gpu-viv only
provides libgbm on the aarch64/i.MX8 blobs), and forcing it through
triggers the dependency-chain consistency check:

  package 'qt6base' has added 'libgbm' to its _DEPENDENCIES variable
  without selecting it or depending on it from Config.in.

Make GBM optional for eglfs:

 - In Config.in, drop the hard dependency on BR2_PACKAGE_HAS_LIBGBM
   and keep only the libegl requirement, which every eglfs backend
   needs.

 - In qt6base.mk, only pass -DFEATURE_gbm=ON/-DFEATURE_kms=ON and add
   libgbm/libdrm to the dependencies when a gbm provider is actually
   present (BR2_PACKAGE_HAS_LIBGBM). Otherwise pass
   -DFEATURE_gbm=OFF/-DFEATURE_kms=OFF so that the eglfs_kms backend
   is simply not built, while eglfs_viv (and other vendor backends)
   still are.

This keeps eglfs_kms working unchanged on platforms that do provide
GBM (i.MX8, Raspberry Pi 4, ...) while allowing eglfs to be enabled on
GBM-less platforms such as i.MX6 with the Vivante framebuffer output.

Signed-off-by: Fred Lefranc <fred.lefranc+evs@gmail.com>
---
 package/qt6/qt6base/Config.in  |  2 +-
 package/qt6/qt6base/qt6base.mk | 12 ++++++++++--
 2 files changed, 11 insertions(+), 3 deletions(-)

diff --git a/package/qt6/qt6base/Config.in b/package/qt6/qt6base/Config.in
index e6bb99de28..c33e078b15 100644
--- a/package/qt6/qt6base/Config.in
+++ b/package/qt6/qt6base/Config.in
@@ -74,7 +74,7 @@ comment "X.org XCB backend available if X.org is enabled"
 config BR2_PACKAGE_QT6BASE_EGLFS
 	bool "eglfs support"
 	depends on BR2_PACKAGE_HAS_LIBEGL
-	depends on BR2_PACKAGE_HAS_LIBGBM
+	depends on BR2_PACKAGE_HAS_LIBGBM || BR2_PACKAGE_IMX_GPU_VIV_OUTPUT_FB
 	depends on BR2_PACKAGE_QT6_GL_SUPPORTS
 	select BR2_PACKAGE_QT6BASE_OPENGL
 
diff --git a/package/qt6/qt6base/qt6base.mk b/package/qt6/qt6base/qt6base.mk
index 01661b7f01..5e6cf66f32 100644
--- a/package/qt6/qt6base/qt6base.mk
+++ b/package/qt6/qt6base/qt6base.mk
@@ -305,8 +305,16 @@ QT6BASE_CONF_OPTS += -DFEATURE_tslib=OFF
 endif
 
 ifeq ($(BR2_PACKAGE_QT6BASE_EGLFS),y)
-QT6BASE_CONF_OPTS += -DFEATURE_egl=ON -DFEATURE_eglfs=ON
-QT6BASE_DEPENDENCIES += libegl libgbm
+QT6BASE_CONF_OPTS   += -DINPUT_opengl=es2 -DFEATURE_egl=ON -DFEATURE_eglfs=ON
+QT6BASE_DEPENDENCIES += libegl
+
+# Only pull in GBM/KMS/DRM when a gbm provider actually exists (i.MX8, RPi, etc.)
+ifeq ($(BR2_PACKAGE_HAS_LIBGBM),y)
+QT6BASE_CONF_OPTS    += -DFEATURE_gbm=ON -DFEATURE_kms=ON
+QT6BASE_DEPENDENCIES += libgbm libdrm
+else
+QT6BASE_CONF_OPTS    += -DFEATURE_gbm=OFF -DFEATURE_kms=OFF
+endif
 else
 QT6BASE_CONF_OPTS += -DFEATURE_eglfs=OFF
 endif
-- 
2.34.1

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

  reply	other threads:[~2026-09-14  8:22 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-14  8:21 [Buildroot] [PATCH] package/qt6/qt6base: don't require gbm for eglfs Fred Lefranc
2026-09-14  8:21 ` Fred Lefranc [this message]
2026-09-28  8:42   ` [Buildroot] [PATCH 1/1] " Fred Lefranc

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20260914082138.2802-2-fred.lefranc.evs@gmail.com \
    --to=fred.lefranc.evs@gmail.com \
    --cc=buildroot@buildroot.org \
    --cc=fred.lefranc+evs@gmail.com \
    --cc=jesseevg@gmail.com \
    --cc=roykollensvendsen@gmail.com \
    --cc=thomas.petazzoni@bootlin.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.