summaryrefslogtreecommitdiff
path: root/include/drm/drm_format_helper.h
diff options
context:
space:
mode:
authorThomas Zimmermann <tzimmermann@suse.de>2023-01-02 14:29:21 +0300
committerThomas Zimmermann <tzimmermann@suse.de>2023-01-03 16:25:17 +0300
commit175073d694cd9db4c4ca97c978a447acc6b5cb33 (patch)
tree7824e6f23bd498085ae60694f508a6c8f4cb8a85 /include/drm/drm_format_helper.h
parentf238ac30afde0da3dcc047ba6f735837a238f2b1 (diff)
downloadlinux-175073d694cd9db4c4ca97c978a447acc6b5cb33.tar.xz
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
Diffstat (limited to 'include/drm/drm_format_helper.h')
-rw-r--r--include/drm/drm_format_helper.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/include/drm/drm_format_helper.h b/include/drm/drm_format_helper.h
index eb5c98cf82b8..3ce8129dfe43 100644
--- a/include/drm/drm_format_helper.h
+++ b/include/drm/drm_format_helper.h
@@ -33,6 +33,9 @@ void drm_fb_xrgb8888_to_rgb565(struct iosys_map *dst, const unsigned int *dst_pi
void drm_fb_xrgb8888_to_rgb888(struct iosys_map *dst, const unsigned int *dst_pitch,
const struct iosys_map *src, const struct drm_framebuffer *fb,
const struct drm_rect *clip);
+void drm_fb_xrgb8888_to_argb8888(struct iosys_map *dst, const unsigned int *dst_pitch,
+ const struct iosys_map *src, const struct drm_framebuffer *fb,
+ const struct drm_rect *clip);
void drm_fb_xrgb8888_to_xrgb2101010(struct iosys_map *dst, const unsigned int *dst_pitch,
const struct iosys_map *src, const struct drm_framebuffer *fb,
const struct drm_rect *clip);