diff options
author | Thomas Zimmermann <tzimmermann@suse.de> | 2023-01-02 12:29:22 +0100 |
---|---|---|
committer | Thomas Zimmermann <tzimmermann@suse.de> | 2023-01-03 14:25:41 +0100 |
commit | 56119bfb39142090fb84ac08a3f14dd48410e961 (patch) | |
tree | 39ac334b056b1370791263f334843e7b81967a25 /include/drm/drm_format_helper.h | |
parent | 175073d694cd9db4c4ca97c978a447acc6b5cb33 (diff) | |
download | lwn-56119bfb39142090fb84ac08a3f14dd48410e961.tar.gz lwn-56119bfb39142090fb84ac08a3f14dd48410e961.zip |
drm/format-helper: Add conversion from XRGB8888 to ARGB2101010
Add dedicated helper to convert from XRGB8888 to ARGB2101010. Sets
all alpha bits to make pixels fully opaque.
v2:
* set correct format in struct drm_framebuffer (Javier)
* 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-9-tzimmermann@suse.de
Diffstat (limited to 'include/drm/drm_format_helper.h')
-rw-r--r-- | include/drm/drm_format_helper.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/include/drm/drm_format_helper.h b/include/drm/drm_format_helper.h index 3ce8129dfe43..10b2d19cdb66 100644 --- a/include/drm/drm_format_helper.h +++ b/include/drm/drm_format_helper.h @@ -39,6 +39,9 @@ void drm_fb_xrgb8888_to_argb8888(struct iosys_map *dst, const unsigned int *dst_ 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); +void drm_fb_xrgb8888_to_argb2101010(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_gray8(struct iosys_map *dst, const unsigned int *dst_pitch, const struct iosys_map *src, const struct drm_framebuffer *fb, const struct drm_rect *clip); |