summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorThomas Zimmermann <tzimmermann@suse.de>2025-06-25 14:48:22 +0300
committerThomas Zimmermann <tzimmermann@suse.de>2025-06-27 16:59:23 +0300
commit8ad00a81d769ad81aac0ef65a4adbc2f53169b3c (patch)
tree5d3a66b6b3c28252f51248bfaaa421d1a5f5a764 /include
parentb462b0ef4d788d56f0e575406e58450358dcbd96 (diff)
downloadlinux-8ad00a81d769ad81aac0ef65a4adbc2f53169b3c.tar.xz
drm/format-helper: Split off byte swapping from drm_fb_xrgb8888_to_rgb565()
Move big-endian support from drm_fb_xrgb8888_to_rgb565() into the new helper drm_xrgb8888_to_rgb565be(). The functionality is required for displays with big-endian byte order. Update all callers. With the change applied, drm_fb_xrgb8888_to_rgb565() has the same signature as the other conversion functions, which is required for further updates to drm_fb_blit(). Also makes the format-conversion helper available to panic handlers, if necessary. Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de> Reviewed-by: Jocelyn Falempe <jfalempe@redhat.com> Link: https://lore.kernel.org/r/20250625114911.1121301-1-tzimmermann@suse.de
Diffstat (limited to 'include')
-rw-r--r--include/drm/drm_format_helper.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/include/drm/drm_format_helper.h b/include/drm/drm_format_helper.h
index 0d3ee2a1313f..562bc383ece4 100644
--- a/include/drm/drm_format_helper.h
+++ b/include/drm/drm_format_helper.h
@@ -82,8 +82,10 @@ void drm_fb_xrgb8888_to_rgb332(struct iosys_map *dst, const unsigned int *dst_pi
const struct drm_rect *clip, struct drm_format_conv_state *state);
void drm_fb_xrgb8888_to_rgb565(struct iosys_map *dst, const unsigned int *dst_pitch,
const struct iosys_map *src, const struct drm_framebuffer *fb,
- const struct drm_rect *clip, struct drm_format_conv_state *state,
- bool swab);
+ const struct drm_rect *clip, struct drm_format_conv_state *state);
+void drm_fb_xrgb8888_to_rgb565be(struct iosys_map *dst, const unsigned int *dst_pitch,
+ const struct iosys_map *src, const struct drm_framebuffer *fb,
+ const struct drm_rect *clip, struct drm_format_conv_state *state);
void drm_fb_xrgb8888_to_xrgb1555(struct iosys_map *dst, const unsigned int *dst_pitch,
const struct iosys_map *src, const struct drm_framebuffer *fb,
const struct drm_rect *clip, struct drm_format_conv_state *state);