summaryrefslogtreecommitdiffstats
path: root/src/platformsupport/kmsconvenience/qkmsdevice_p.h
diff options
context:
space:
mode:
authorLionel CHAZALLON <longchair@hotmail.com>2018-03-08 07:37:36 +0100
committerLaszlo Agocs <laszlo.agocs@qt.io>2018-04-04 06:37:36 +0000
commitddfd744d83344fe694f162baca68154c43448d21 (patch)
tree1f6b22b24f3f3db00918a210e79083569df07a5a /src/platformsupport/kmsconvenience/qkmsdevice_p.h
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 <laszlo.agocs@qt.io> Reviewed-by: Lionel CHAZALLON <longchair@hotmail.com>
Diffstat (limited to 'src/platformsupport/kmsconvenience/qkmsdevice_p.h')
-rw-r--r--src/platformsupport/kmsconvenience/qkmsdevice_p.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/platformsupport/kmsconvenience/qkmsdevice_p.h b/src/platformsupport/kmsconvenience/qkmsdevice_p.h
index 2210ef479d..9737be9800 100644
--- a/src/platformsupport/kmsconvenience/qkmsdevice_p.h
+++ b/src/platformsupport/kmsconvenience/qkmsdevice_p.h
@@ -169,6 +169,10 @@ struct QKmsPlane
uint32_t rotationPropertyId = 0;
uint32_t crtcPropertyId = 0;
uint32_t framebufferPropertyId = 0;
+ uint32_t srcwidthPropertyId = 0;
+ uint32_t srcheightPropertyId = 0;
+ uint32_t crtcwidthPropertyId = 0;
+ uint32_t crtcheightPropertyId = 0;
};
Q_DECLARE_OPERATORS_FOR_FLAGS(QKmsPlane::Rotations)
@@ -195,6 +199,7 @@ struct QKmsOutput
QString clone_source;
QVector<QKmsPlane> available_planes;
struct QKmsPlane *eglfs_plane = nullptr;
+ QSize size;
uint32_t crtcIdPropertyId = 0;
uint32_t modeIdPropertyId = 0;
uint32_t activePropertyId = 0;