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.
Showing the changes to include (1 of 4 files). Show all
Unified · Split
| @@ -43,8 +43,7 @@ int drm_fb_blit_toio(void __iomem *dst, unsigned int dst_pitch, uint32_t dst_for · 42 unmodified lines | |||
| 43 | const void *vmap, const struct drm_framebuffer *fb, | 43 | const void *vmap, const struct drm_framebuffer *fb, |
| 44 | const struct drm_rect *rect); | 44 | const struct drm_rect *rect); |
| 45 | 45 | ||
| 46 | void drm_fb_xrgb8888_to_mono_reversed(void *dst, unsigned int dst_pitch, const void *src, | 46 | void drm_fb_xrgb8888_to_mono(void *dst, unsigned int dst_pitch, const void *src, |
| 47 | const struct drm_framebuffer *fb, | 47 | const struct drm_framebuffer *fb, const struct drm_rect *clip); |
| 48 | const struct drm_rect *clip); | ||
| 49 | 48 | ||
| 50 | #endif /* __LINUX_DRM_FORMAT_HELPER_H */ | 49 | #endif /* __LINUX_DRM_FORMAT_HELPER_H */ |