aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/include
diff options
context:
space:
mode:
authorGeert Uytterhoeven <geert@linux-m68k.org>2022-03-17 09:18:26 +0100
committerJavier Martinez Canillas <javierm@redhat.com>2022-03-17 12:29:40 +0100
commit9b13a3fcd35fc24045d2fd0f0e13ddd8d7985b4b (patch)
treee8b78229491556d87aa1b169cedb3a6c17442152 /include
parentdrm/doc: Clarify what ioctls can be used on render nodes (diff)
downloadwireguard-linux-9b13a3fcd35fc24045d2fd0f0e13ddd8d7985b4b.tar.xz
wireguard-linux-9b13a3fcd35fc24045d2fd0f0e13ddd8d7985b4b.zip
drm/format-helper: Rename drm_fb_xrgb8888_to_mono_reversed()
There is no "reversed" handling in drm_fb_xrgb8888_to_mono_reversed(): the function just converts from color to grayscale, and reduces the number of grayscale levels from 256 to 2 (i.e. brightness 0-127 is mapped to 0, 128-255 to 1). All "reversed" handling is done in the repaper driver, where this function originated. Hence make this clear by renaming drm_fb_xrgb8888_to_mono_reversed() to drm_fb_xrgb8888_to_mono(), and documenting the black/white pixel mapping. Fixes: bcf8b616deb87941 ("drm/format-helper: Add drm_fb_xrgb8888_to_mono_reversed()") Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org> Acked-by: Javier Martinez Canillas <javierm@redhat.com> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Signed-off-by: Javier Martinez Canillas <javierm@redhat.com> Link: https://patchwork.freedesktop.org/patch/msgid/20220317081830.1211400-2-geert@linux-m68k.org
Diffstat (limited to 'include')
-rw-r--r--include/drm/drm_format_helper.h5
1 files changed, 2 insertions, 3 deletions
diff --git a/include/drm/drm_format_helper.h b/include/drm/drm_format_helper.h
index 0b0937c0b2f6..55145eca0782 100644
--- a/include/drm/drm_format_helper.h
+++ b/include/drm/drm_format_helper.h
@@ -43,8 +43,7 @@ int drm_fb_blit_toio(void __iomem *dst, unsigned int dst_pitch, uint32_t dst_for
const void *vmap, const struct drm_framebuffer *fb,
const struct drm_rect *rect);
-void drm_fb_xrgb8888_to_mono_reversed(void *dst, unsigned int dst_pitch, const void *src,
- const struct drm_framebuffer *fb,
- const struct drm_rect *clip);
+void drm_fb_xrgb8888_to_mono(void *dst, unsigned int dst_pitch, const void *src,
+ const struct drm_framebuffer *fb, const struct drm_rect *clip);
#endif /* __LINUX_DRM_FORMAT_HELPER_H */