blob: bc2e1004e1665ea2d65bc7a20024c8e207bb69e1 [file] [log] [blame]
Gerd Hoffmann74152872019-04-05 11:52:15 +02001/*
2 * Copyright (C) 2016 Noralf Trønnes
3 *
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation; either version 2 of the License, or
7 * (at your option) any later version.
8 */
9
10#ifndef __LINUX_DRM_FORMAT_HELPER_H
11#define __LINUX_DRM_FORMAT_HELPER_H
12
13struct drm_framebuffer;
14struct drm_rect;
15
16void drm_fb_memcpy(void *dst, void *vaddr, struct drm_framebuffer *fb,
17 struct drm_rect *clip);
Gerd Hoffmannbf4f6d12019-04-10 08:38:13 +020018void drm_fb_memcpy_dstclip(void __iomem *dst, void *vaddr,
19 struct drm_framebuffer *fb,
Gerd Hoffmann26f024f2019-04-05 11:52:16 +020020 struct drm_rect *clip);
Gerd Hoffmann74152872019-04-05 11:52:15 +020021void drm_fb_swab16(u16 *dst, void *vaddr, struct drm_framebuffer *fb,
22 struct drm_rect *clip);
Gerd Hoffmannbcc44422019-04-05 11:52:17 +020023void drm_fb_xrgb8888_to_rgb565(void *dst, void *vaddr,
Gerd Hoffmann74152872019-04-05 11:52:15 +020024 struct drm_framebuffer *fb,
25 struct drm_rect *clip, bool swap);
Gerd Hoffmannbcc44422019-04-05 11:52:17 +020026void drm_fb_xrgb8888_to_rgb565_dstclip(void *dst, unsigned int dst_pitch,
27 void *vaddr, struct drm_framebuffer *fb,
28 struct drm_rect *clip, bool swap);
Gerd Hoffmannec3de7a2019-04-05 11:52:18 +020029void drm_fb_xrgb8888_to_rgb888_dstclip(void *dst, unsigned int dst_pitch,
30 void *vaddr, struct drm_framebuffer *fb,
31 struct drm_rect *clip);
Gerd Hoffmann74152872019-04-05 11:52:15 +020032void drm_fb_xrgb8888_to_gray8(u8 *dst, void *vaddr, struct drm_framebuffer *fb,
33 struct drm_rect *clip);
34
35#endif /* __LINUX_DRM_FORMAT_HELPER_H */