summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/vkms/vkms_writeback.c
diff options
context:
space:
mode:
authorIgor Torrente <igormtorrente@gmail.com>2022-09-05 22:08:11 +0300
committerMelissa Wen <melissa.srw@gmail.com>2022-09-06 00:25:08 +0300
commit396369d6754993e40f1c84b2e22e40e92dfa4c49 (patch)
tree94e7c0b3f6d9115fee6b738f01ec4d701f8cf3e8 /drivers/gpu/drm/vkms/vkms_writeback.c
parent3675d8a1726337bd1e839a185e0a7ce0bc459b6b (diff)
downloadlinux-396369d6754993e40f1c84b2e22e40e92dfa4c49.tar.xz
drm: vkms: Add support to the RGB565 format
This commit also adds new helper macros to deal with fixed-point arithmetic. It was done to improve the precision of the conversion to ARGB16161616 since the "conversion ratio" is not an integer. V3: Adapt the handlers to the new format introduced in patch 7 V3. V5: Minor improvements V6: Minor improvements (Pekka Paalanen) Reviewed-by: Melissa Wen <mwen@igalia.com> Signed-off-by: Igor Torrente <igormtorrente@gmail.com> Signed-off-by: Melissa Wen <melissa.srw@gmail.com> Link: https://patchwork.freedesktop.org/patch/msgid/20220905190811.25024-10-igormtorrente@gmail.com
Diffstat (limited to 'drivers/gpu/drm/vkms/vkms_writeback.c')
-rw-r--r--drivers/gpu/drm/vkms/vkms_writeback.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/gpu/drm/vkms/vkms_writeback.c b/drivers/gpu/drm/vkms/vkms_writeback.c
index 16feea884646..84a51cd281b9 100644
--- a/drivers/gpu/drm/vkms/vkms_writeback.c
+++ b/drivers/gpu/drm/vkms/vkms_writeback.c
@@ -17,7 +17,8 @@
static const u32 vkms_wb_formats[] = {
DRM_FORMAT_XRGB8888,
DRM_FORMAT_XRGB16161616,
- DRM_FORMAT_ARGB16161616
+ DRM_FORMAT_ARGB16161616,
+ DRM_FORMAT_RGB565
};
static const struct drm_connector_funcs vkms_wb_connector_funcs = {