36 lines
1.4 KiB
Diff
36 lines
1.4 KiB
Diff
From 43cd6aa06af4e695980e66d11b7510ec89b87f8a Mon Sep 17 00:00:00 2001
|
|
From: Jeffy Chen <jeffy.chen@rock-chips.com>
|
|
Date: Tue, 16 Apr 2019 21:11:12 +0800
|
|
Subject: [PATCH 17/28] linuxfbdrm: Support RGB32
|
|
|
|
Use QT_FB_DRM_RGB565/QT_FB_DRM_RGB32/QT_FB_DRM_ARGB32 macro to set fb
|
|
format.
|
|
|
|
Signed-off-by: Jeffy Chen <jeffy.chen@rock-chips.com>
|
|
---
|
|
src/platformsupport/kmsconvenience/qkmsdevice.cpp | 8 ++++++++
|
|
1 file changed, 8 insertions(+)
|
|
|
|
diff --git a/src/platformsupport/kmsconvenience/qkmsdevice.cpp b/src/platformsupport/kmsconvenience/qkmsdevice.cpp
|
|
index 8cd7f9b3..1bf30c42 100644
|
|
--- a/src/platformsupport/kmsconvenience/qkmsdevice.cpp
|
|
+++ b/src/platformsupport/kmsconvenience/qkmsdevice.cpp
|
|
@@ -399,6 +399,14 @@ QPlatformScreen *QKmsDevice::createScreenForConnector(drmModeResPtr resources,
|
|
qCDebug(qLcKmsDebug) << "Format is" << Qt::hex << drmFormat << Qt::dec << "requested_by_user =" << drmFormatExplicit
|
|
<< "for output" << connectorName;
|
|
|
|
+#ifdef QT_FB_DRM_RGB565
|
|
+ drmFormat = DRM_FORMAT_RGB565;
|
|
+#elif defined(QT_FB_DRM_RGB32)
|
|
+ drmFormat = DRM_FORMAT_XRGB8888;
|
|
+#elif defined(QT_FB_DRM_ARGB32)
|
|
+ drmFormat = DRM_FORMAT_ARGB8888;
|
|
+#endif
|
|
+
|
|
const QString cloneSource = userConnectorConfig.value(QStringLiteral("clones")).toString();
|
|
if (!cloneSource.isEmpty())
|
|
qCDebug(qLcKmsDebug) << "Output" << connectorName << " clones output " << cloneSource;
|
|
--
|
|
2.20.1
|
|
|