From 1a8801a2a85140f2bf9529ec4bf0597454f744a2 Mon Sep 17 00:00:00 2001 From: Joshua Henderson Date: Tue, 13 Feb 2018 09:46:06 -0700 Subject: [PATCH] qt5base: Qt KMS support does not depend on opengl Qt KMS support should not explicitly depend on the availability of opengl. Don't explicitly disable KMS if opengl is not available and fallback to detecting if libdrm is available before disabling kms. The scenario where this is necessary involves using the Qt linuxfb backend "dumb buffer" support via the DRM API. This is new in Qt 5.9 [1] and only requires KMS, but not opengl. Although on Qt 5.6, only eglfs actually uses libdrm/kms, it doesn't hurt to add the dependency and the -kms option there as well, and doing so keeps the logic in the .mk file simple. [1] http://doc.qt.io/qt-5/embedded-linux.html#linuxfb Cc: Peter Seiderer Cc: Julien Corjon Signed-off-by: Joshua Henderson Signed-off-by: Arnout Vandecappelle (Essensium/Mind) (cherry picked from commit f91ea94a6f4d1387b062f9f09c98badf0766127f) Signed-off-by: Peter Korsgaard --- package/qt5/qt5base/qt5base.mk | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/package/qt5/qt5base/qt5base.mk b/package/qt5/qt5base/qt5base.mk index 53c98ce490..b79059c2a4 100644 --- a/package/qt5/qt5base/qt5base.mk +++ b/package/qt5/qt5base/qt5base.mk @@ -35,14 +35,21 @@ endif QT5BASE_CONFIGURE_OPTS += $(call qstrip,$(BR2_PACKAGE_QT5BASE_CUSTOM_CONF_OPTS)) -# Uses libgbm from mesa3d -ifeq ($(BR2_PACKAGE_MESA3D_OPENGL_EGL),y) -QT5BASE_CONFIGURE_OPTS += -kms -gbm -QT5BASE_DEPENDENCIES += mesa3d +ifeq ($(BR2_PACKAGE_LIBDRM),y) +QT5BASE_CONFIGURE_OPTS += -kms +QT5BASE_DEPENDENCIES += libdrm else QT5BASE_CONFIGURE_OPTS += -no-kms endif +# Uses libgbm from mesa3d +ifeq ($(BR2_PACKAGE_MESA3D_OPENGL_EGL),y) +QT5BASE_CONFIGURE_OPTS += -gbm +QT5BASE_DEPENDENCIES += mesa3d +else +QT5BASE_CONFIGURE_OPTS += -no-gbm +endif + ifeq ($(BR2_ENABLE_DEBUG),y) QT5BASE_CONFIGURE_OPTS += -debug else