diff --git a/recipes-qt/qt6/qtbase/0006-kms-allow-DRM-device-path-to-be-overridden.patch b/recipes-qt/qt6/qtbase/0006-kms-allow-DRM-device-path-to-be-overridden.patch new file mode 100644 index 0000000..fd36900 --- /dev/null +++ b/recipes-qt/qt6/qtbase/0006-kms-allow-DRM-device-path-to-be-overridden.patch @@ -0,0 +1,40 @@ +From 971b6e89947bd9e600a980e0e77f0d117ced8683 Mon Sep 17 00:00:00 2001 +From: Samuli Piippo +Date: Mon, 9 Dec 2024 11:12:02 +0200 +Subject: [PATCH] kms: allow DRM device path to be overridden + +The backend-provided DRM device might not be the right one, +so allow kms config to override it. + +Task-number: QTBUG-131887 +Change-Id: Ied744ae7015eae64f4556f1528e0dbe8ae69d206 +Upstream-Status: Pending +--- + src/platformsupport/kmsconvenience/qkmsdevice.cpp | 8 ++++---- + 1 file changed, 4 insertions(+), 4 deletions(-) + +diff --git a/src/platformsupport/kmsconvenience/qkmsdevice.cpp b/src/platformsupport/kmsconvenience/qkmsdevice.cpp +index e49022d06ec..dc109aeb561 100644 +--- a/src/platformsupport/kmsconvenience/qkmsdevice.cpp ++++ b/src/platformsupport/kmsconvenience/qkmsdevice.cpp +@@ -549,13 +549,13 @@ QKmsDevice::QKmsDevice(QKmsScreenConfig *screenConfig, const QString &path) + , m_has_atomic_support(false) + , m_crtc_allocator(0) + { +- if (m_path.isEmpty()) { ++ if (!m_screenConfig->devicePath().isEmpty()) { + m_path = m_screenConfig->devicePath(); + qCDebug(qLcKmsDebug, "Using DRM device %s specified in config file", qPrintable(m_path)); +- if (m_path.isEmpty()) +- qFatal("No DRM device given"); +- } else { ++ } else if (!m_path.isEmpty()) { + qCDebug(qLcKmsDebug, "Using backend-provided DRM device %s", qPrintable(m_path)); ++ } else { ++ qFatal("No DRM device given"); + } + } + +-- +2.43.0 + diff --git a/recipes-qt/qt6/qtbase_git.bb b/recipes-qt/qt6/qtbase_git.bb index c82ade3..86e3eea 100644 --- a/recipes-qt/qt6/qtbase_git.bb +++ b/recipes-qt/qt6/qtbase_git.bb @@ -22,6 +22,7 @@ SRC_URI += "\ file://0002-qlibraryinfo-allow-to-set-qt.conf-from-the-outside-u.patch \ file://0004-Fix-qt.toolchain.cmake-for-SDK-use.patch \ file://0005-testlib-don-t-track-the-build-or-source-directories.patch \ + file://0006-kms-allow-DRM-device-path-to-be-overridden.patch \ " DEPENDS += "\