2874c5fd28426 (Thomas Gleixner 2019-05-27 08:55:01 +0200 1) /* SPDX-License-Identifier: GPL-2.0-or-later */
7415287e1f367 (Gerd Hoffmann 2019-04-05 11:52:15 +0200 2) /*
7415287e1f367 (Gerd Hoffmann 2019-04-05 11:52:15 +0200 3) * Copyright (C) 2016 Noralf Trønnes
7415287e1f367 (Gerd Hoffmann 2019-04-05 11:52:15 +0200 4) */
7415287e1f367 (Gerd Hoffmann 2019-04-05 11:52:15 +0200 5)
7415287e1f367 (Gerd Hoffmann 2019-04-05 11:52:15 +0200 6) #ifndef __LINUX_DRM_FORMAT_HELPER_H
7415287e1f367 (Gerd Hoffmann 2019-04-05 11:52:15 +0200 7) #define __LINUX_DRM_FORMAT_HELPER_H
7415287e1f367 (Gerd Hoffmann 2019-04-05 11:52:15 +0200 8)
7415287e1f367 (Gerd Hoffmann 2019-04-05 11:52:15 +0200 9) struct drm_framebuffer;
7415287e1f367 (Gerd Hoffmann 2019-04-05 11:52:15 +0200 10) struct drm_rect;
7415287e1f367 (Gerd Hoffmann 2019-04-05 11:52:15 +0200 11)
7415287e1f367 (Gerd Hoffmann 2019-04-05 11:52:15 +0200 12) void drm_fb_memcpy(void *dst, void *vaddr, struct drm_framebuffer *fb,
7415287e1f367 (Gerd Hoffmann 2019-04-05 11:52:15 +0200 13) struct drm_rect *clip);
5ab7af7151ba1 (Thomas Zimmermann 2021-04-30 12:58:32 +0200 14) void drm_fb_memcpy_dstclip(void __iomem *dst, unsigned int dst_pitch, void *vaddr,
bf4f6d16c8946 (Gerd Hoffmann 2019-04-10 08:38:13 +0200 15) struct drm_framebuffer *fb,
26f024f54ab69 (Gerd Hoffmann 2019-04-05 11:52:16 +0200 16) struct drm_rect *clip);
bd34cea2a0e4b (Noralf Trønnes 2020-05-09 16:16:16 +0200 17) void drm_fb_swab(void *dst, void *src, struct drm_framebuffer *fb,
bd34cea2a0e4b (Noralf Trønnes 2020-05-09 16:16:16 +0200 18) struct drm_rect *clip, bool cached);
bcc4442008aca (Gerd Hoffmann 2019-04-05 11:52:17 +0200 19) void drm_fb_xrgb8888_to_rgb565(void *dst, void *vaddr,
7415287e1f367 (Gerd Hoffmann 2019-04-05 11:52:15 +0200 20) struct drm_framebuffer *fb,
d653bd3948237 (Gerd Hoffmann 2019-04-10 08:38:14 +0200 21) struct drm_rect *clip, bool swab);
d653bd3948237 (Gerd Hoffmann 2019-04-10 08:38:14 +0200 22) void drm_fb_xrgb8888_to_rgb565_dstclip(void __iomem *dst, unsigned int dst_pitch,
bcc4442008aca (Gerd Hoffmann 2019-04-05 11:52:17 +0200 23) void *vaddr, struct drm_framebuffer *fb,
d653bd3948237 (Gerd Hoffmann 2019-04-10 08:38:14 +0200 24) struct drm_rect *clip, bool swab);
5c5373b51becb (Gerd Hoffmann 2019-04-10 08:38:15 +0200 25) void drm_fb_xrgb8888_to_rgb888_dstclip(void __iomem *dst, unsigned int dst_pitch,
ec3de7a43e9ca (Gerd Hoffmann 2019-04-05 11:52:18 +0200 26) void *vaddr, struct drm_framebuffer *fb,
ec3de7a43e9ca (Gerd Hoffmann 2019-04-05 11:52:18 +0200 27) struct drm_rect *clip);
7415287e1f367 (Gerd Hoffmann 2019-04-05 11:52:15 +0200 28) void drm_fb_xrgb8888_to_gray8(u8 *dst, void *vaddr, struct drm_framebuffer *fb,
7415287e1f367 (Gerd Hoffmann 2019-04-05 11:52:15 +0200 29) struct drm_rect *clip);
7415287e1f367 (Gerd Hoffmann 2019-04-05 11:52:15 +0200 30)
900d3e4a97892 (Thomas Zimmermann 2021-04-30 12:58:33 +0200 31) int drm_fb_blit_rect_dstclip(void __iomem *dst, unsigned int dst_pitch,
900d3e4a97892 (Thomas Zimmermann 2021-04-30 12:58:33 +0200 32) uint32_t dst_format, void *vmap,
900d3e4a97892 (Thomas Zimmermann 2021-04-30 12:58:33 +0200 33) struct drm_framebuffer *fb,
900d3e4a97892 (Thomas Zimmermann 2021-04-30 12:58:33 +0200 34) struct drm_rect *rect);
900d3e4a97892 (Thomas Zimmermann 2021-04-30 12:58:33 +0200 35) int drm_fb_blit_dstclip(void __iomem *dst, unsigned int dst_pitch,
900d3e4a97892 (Thomas Zimmermann 2021-04-30 12:58:33 +0200 36) uint32_t dst_format, void *vmap,
900d3e4a97892 (Thomas Zimmermann 2021-04-30 12:58:33 +0200 37) struct drm_framebuffer *fb);
900d3e4a97892 (Thomas Zimmermann 2021-04-30 12:58:33 +0200 38)
7415287e1f367 (Gerd Hoffmann 2019-04-05 11:52:15 +0200 39) #endif /* __LINUX_DRM_FORMAT_HELPER_H */