History

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.

Geert Uytterhoeven committed 4 years ago

Commit 9b13a3f1 parent aa457ff4 files · +19 −21Browse files

Showing the changes to include (1 of 4 files). Show all

Unified · Split

include/drm/drm_format_helper.h+2−3
@@ -43,8 +43,7 @@ int drm_fb_blit_toio(void __iomem *dst, unsigned int dst_pitch, uint32_t dst_for · 42 unmodified lines
4343 const void *vmap, const struct drm_framebuffer *fb,
4444 const struct drm_rect *rect);
4545
46−void drm_fb_xrgb8888_to_mono_reversed(void *dst, unsigned int dst_pitch, const void *src,
47− const struct drm_framebuffer *fb,
48− const struct drm_rect *clip);
46+void drm_fb_xrgb8888_to_mono(void *dst, unsigned int dst_pitch, const void *src,
47+ const struct drm_framebuffer *fb, const struct drm_rect *clip);
4948
5049 #endif /* __LINUX_DRM_FORMAT_HELPER_H */

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t