]> git.baikalelectronics.ru Git - kernel.git/commit
drm/format-helper: Rename drm_fb_xrgb8888_to_mono_reversed()
authorGeert Uytterhoeven <geert@linux-m68k.org>
Thu, 17 Mar 2022 08:18:26 +0000 (09:18 +0100)
committerJavier Martinez Canillas <javierm@redhat.com>
Thu, 17 Mar 2022 11:29:40 +0000 (12:29 +0100)
commitf61a1a3ba1e526a74c3c9858db4e6aea45c2a8e5
treee8b78229491556d87aa1b169cedb3a6c17442152
parent2d65e9b6640c0c8c07ba41d8e1727e16f2e029fa
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: d7bbc8bd7f7ac4e4 ("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
drivers/gpu/drm/drm_format_helper.c
drivers/gpu/drm/solomon/ssd130x.c
drivers/gpu/drm/tiny/repaper.c
include/drm/drm_format_helper.h