drm/tinydrm: Add tinydrm_xrgb8888_to_gray8() helper

Drm has no monochrome or greyscale support so add a conversion
from the common format XR24.

Also reorder includes into the common order.

Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: Noralf Trønnes <noralf@tronnes.org>
Link: http://patchwork.freedesktop.org/patch/msgid/1496934875-51984-4-git-send-email-noralf@tronnes.org
This commit is contained in:
Noralf Trønnes
2017-06-08 17:14:34 +02:00
parent 7f0dc77772
commit 379ea9a1a5
2 changed files with 73 additions and 2 deletions

View File

@@ -43,6 +43,7 @@ void tinydrm_swab16(u16 *dst, void *vaddr, struct drm_framebuffer *fb,
void tinydrm_xrgb8888_to_rgb565(u16 *dst, void *vaddr,
struct drm_framebuffer *fb,
struct drm_clip_rect *clip, bool swap);
int tinydrm_xrgb8888_to_gray8(u8 *dst, struct drm_framebuffer *fb);
struct backlight_device *tinydrm_of_find_backlight(struct device *dev);
int tinydrm_enable_backlight(struct backlight_device *backlight);