path: root/src/plugins/platforms/linuxfb
diff options
authorLaszlo Agocs <>2017-01-12 13:54:05 +0100
committerLaszlo Agocs <>2017-01-18 14:48:35 +0000
commita0bc9d0027e5e46d66b7d9b62b04d8c3cac9c82f (patch)
tree3b53de2428067a1896b84ec3c8806b6bde46ad9b /src/plugins/platforms/linuxfb
parent8c144298439a6537adc0d67ca03382a305484deb (diff)
DRM/KMS config: add support for specifying the primary screen
Not having a way to say that a given output should be registered as the primary screen (meaning it comes first in the QGuiApplication::screens() list, emits primaryScreenChanged() signal etc.) can be a problem for some systems. The order of the outputs array in the JSON configuration file is not relevant in this respect since screens are registered either in the original DRM connector order, or, when the virtual desktop layout is specified via virtualIndex, in the order specified by virtualIndex. The primary screen status is independent from this. Therefore, add a new, optional boolean property: primary. For example, the following forces the QScreen corresponding to the VGA output to be the primary screen on the Renesas R-Car H2 board, even though by default it is the HDMI one that happens to be reported first by the system. { "device": "/dev/dri/card0", "outputs": [ { "name": "HDMI1", "mode": "1280x720" }, { "name": "VGA1", "mode": "1280x720", "primary": true }, { "name": "LVDS1", "mode": "off" } ] } In addition, improve the quality of the logging output. [ChangeLog][Platform Specific Changes] Added support for specifying the primary screen in the JSON config file in QT_QPA_EGLFS_KMS_CONFIG when running on DRM/KMS with eglfs. Task-number: QTBUG-57980 Change-Id: Iba490800dee3b7162c68c4d40b0822f3f6d81b69 Reviewed-by: Andy Nichols <>
Diffstat (limited to 'src/plugins/platforms/linuxfb')
1 files changed, 5 insertions, 2 deletions
diff --git a/src/plugins/platforms/linuxfb/qlinuxfbdrmscreen.cpp b/src/plugins/platforms/linuxfb/qlinuxfbdrmscreen.cpp
index bdf2634642..2ca251c4af 100644
--- a/src/plugins/platforms/linuxfb/qlinuxfbdrmscreen.cpp
+++ b/src/plugins/platforms/linuxfb/qlinuxfbdrmscreen.cpp
@@ -106,6 +106,7 @@ private:
void *nativeDisplay() const override;
QPlatformScreen *createScreen(const QKmsOutput &output) override;
void registerScreen(QPlatformScreen *screen,
+ bool isPrimary,
const QPoint &virtualPos,
const QList<QPlatformScreen *> &virtualSiblings) override;
@@ -175,10 +176,12 @@ QPlatformScreen *QLinuxFbDevice::createScreen(const QKmsOutput &output)
void QLinuxFbDevice::registerScreen(QPlatformScreen *screen,
- const QPoint &virtualPos,
- const QList<QPlatformScreen *> &virtualSiblings)
+ bool isPrimary,
+ const QPoint &virtualPos,
+ const QList<QPlatformScreen *> &virtualSiblings)
+ Q_UNUSED(isPrimary);