b/drivers/gpu/drm/tinydrm/st7586.c
@@ -56,6 +56,34 @@
static const u8 st7586_lookup[] = { 0x7, 0x4, 0x2, 0x0 };
+static void st7586_gray8_to_gray332(u8 *dst, void *vaddr,
+ struct drm_framebuffer *fb,
+ struct drm_clip_rect *clip)
+{
...
+}
+
static void st7586_xrgb8888_to_gray332(u8 *dst, void *vaddr,
struct drm_framebuffer *fb,
struct drm_clip_rect *clip)
@@ -98,7 +126,14 @@ static int st7586_buf_copy(void *dst, struct
drm_framebuffer *fb,
return ret;
}
- st7586_xrgb8888_to_gray332(dst, src, fb, clip);
+ switch(fb->format->format) {
+ case DRM_FORMAT_Y8:
+ st7586_gray8_to_gray332(dst, src, fb, clip);
+ break;
+ case DRM_FORMAT_XRGB8888:
+ st7586_xrgb8888_to_gray332(dst, src, fb, clip);
+ break;
+ }
if (import_attach)
ret = dma_buf_end_cpu_access(import_attach->dmabuf,
@@ -260,6 +295,7 @@ static void st7586_pipe_disable(struct
drm_simple_display_pipe *pipe)
}
static const u32 st7586_formats[] = {