drm/format-helper: Add conversion from XRGB8888 to ARGB8888
authorThomas Zimmermann <tzimmermann@suse.de>
Mon, 2 Jan 2023 11:29:21 +0000 (12:29 +0100)
committerThomas Zimmermann <tzimmermann@suse.de>
Tue, 3 Jan 2023 13:25:17 +0000 (14:25 +0100)
commit175073d694cd9db4c4ca97c978a447acc6b5cb33
tree7824e6f23bd498085ae60694f508a6c8f4cb8a85
parentf238ac30afde0da3dcc047ba6f735837a238f2b1
drm/format-helper: Add conversion from XRGB8888 to ARGB8888

Add dedicated helper to convert from XRGB8888 to ARGB8888. Sets
all alpha bits to make pixels fully opaque.

v3:
* use __le32 for destination buffer (Jose, kernel test robot)
v2:
* use cpubuf_to_le32()
* type fixes

Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Reviewed-by: Javier Martinez Canillas <javierm@redhat.com>
Reviewed-by: José Expósito <jose.exposito89@gmail.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20230102112927.26565-8-tzimmermann@suse.de
drivers/gpu/drm/drm_format_helper.c
drivers/gpu/drm/tests/drm_format_helper_test.c
include/drm/drm_format_helper.h