path: root/src/plugins/platforms/eglfs/deviceintegration/eglfs_kms_support
diff options
authorLionel CHAZALLON <>2018-03-08 07:37:36 +0100
committerLaszlo Agocs <>2018-04-04 06:37:36 +0000
commitddfd744d83344fe694f162baca68154c43448d21 (patch)
tree1f6b22b24f3f3db00918a210e79083569df07a5a /src/plugins/platforms/eglfs/deviceintegration/eglfs_kms_support
parentb60b2c5fc5f015192e73f5471eb28ba83b99cc56 (diff)
eglfs/kms: Add framebuffer scaling ability with KMS atomic
This commit will add the possibility to have a different sizes between framebuffer and videomode using DRM atomic, which is not possible with DRM legacy. The main goal of this change is to allow to get decent performance on embedded devices which can support high resolution display (ie UHD), and which don't have a GPU able to achieve decent framerate in such resolutions. This patch adds a "size" member to the output configuration in KMS configuration file. The GBM framebuffer will be created with that size and the GBM screen will report that size so that EGLFS can do everything normally. Scaling planes with different size than the video mode size is not something supported consistently with DRM legacy, so that feature will be only available when using the DRM atomic API. This was tested on Rock64 device, both with drm legacy and atomic. Change-Id: I8ba5bae35e61fcb7d9fc58234504bdfd647b43f6 Reviewed-by: Laszlo Agocs <> Reviewed-by: Lionel CHAZALLON <>
Diffstat (limited to 'src/plugins/platforms/eglfs/deviceintegration/eglfs_kms_support')
1 files changed, 2 insertions, 3 deletions
diff --git a/src/plugins/platforms/eglfs/deviceintegration/eglfs_kms_support/qeglfskmsscreen.cpp b/src/plugins/platforms/eglfs/deviceintegration/eglfs_kms_support/qeglfskmsscreen.cpp
index 5e45b42abe..e5354d97bd 100644
--- a/src/plugins/platforms/eglfs/deviceintegration/eglfs_kms_support/qeglfskmsscreen.cpp
+++ b/src/plugins/platforms/eglfs/deviceintegration/eglfs_kms_support/qeglfskmsscreen.cpp
@@ -113,10 +113,9 @@ QRect QEglFSKmsScreen::rawGeometry() const
if (m_headless)
return QRect(QPoint(0, 0), m_device->screenConfig()->headlessSize());
- const int mode = m_output.mode;
return QRect(m_pos.x(), m_pos.y(),
- m_output.modes[mode].hdisplay,
- m_output.modes[mode].vdisplay);
+ m_output.size.width(),
+ m_output.size.height());
int QEglFSKmsScreen::depth() const