aboutsummaryrefslogtreecommitdiffstats
path: root/include/drm
diff options
context:
space:
mode:
authorMarcus Folkesson <marcus.folkesson@gmail.com>2025-07-21 12:43:35 +0200
committerJavier Martinez Canillas <javierm@redhat.com>2025-09-01 15:35:07 +0200
commit8bde81ec684238587decd5ab6b1bf18041814937 (patch)
treeb8ffe67ee51aeadc0e7f4bb8b206535b83889ae7 /include/drm
parentdrm/st7571-i2c: add support for inverted pixel format (diff)
downloadlinux-8bde81ec684238587decd5ab6b1bf18041814937.tar.gz
linux-8bde81ec684238587decd5ab6b1bf18041814937.zip
drm/format-helper: introduce drm_fb_xrgb8888_to_gray2()
Convert XRGB8888 to 2bit grayscale. It uses drm_fb_xrgb8888_to_gray8() to convert the pixels to gray8 as an intermediate step before converting to gray2. Signed-off-by: Marcus Folkesson <marcus.folkesson@gmail.com> Reviewed-by: Javier Martinez Canillas <javierm@redhat.com> Acked-by: Thomas Zimmermann <tzimmermann@suse.de> Link: https://lore.kernel.org/r/20250721-st7571-format-v2-5-159f4134098c@gmail.com Signed-off-by: Javier Martinez Canillas <javierm@redhat.com>
Diffstat (limited to 'include/drm')
-rw-r--r--include/drm/drm_format_helper.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/include/drm/drm_format_helper.h b/include/drm/drm_format_helper.h
index 562bc383ece4..32d57d6c5327 100644
--- a/include/drm/drm_format_helper.h
+++ b/include/drm/drm_format_helper.h
@@ -136,4 +136,8 @@ void drm_fb_xrgb8888_to_mono(struct iosys_map *dst, const unsigned int *dst_pitc
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_gray2(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);
+
#endif /* __LINUX_DRM_FORMAT_HELPER_H */