drm: vkms: Add support to the RGB565 format
authorIgor Torrente <igormtorrente@gmail.com>
Mon, 5 Sep 2022 19:08:11 +0000 (16:08 -0300)
committerMelissa Wen <melissa.srw@gmail.com>
Mon, 5 Sep 2022 21:25:08 +0000 (20:25 -0100)
commit396369d6754993e40f1c84b2e22e40e92dfa4c49
tree94e7c0b3f6d9115fee6b738f01ec4d701f8cf3e8
parent3675d8a1726337bd1e839a185e0a7ce0bc459b6b
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
drivers/gpu/drm/vkms/vkms_formats.c
drivers/gpu/drm/vkms/vkms_plane.c
drivers/gpu/drm/vkms/vkms_writeback.c