blob: ac220aa1a2453aed3eca4588812622366197ec6d [file] [log] [blame]
Thomas Gleixner2874c5f2019-05-27 08:55:01 +02001/* SPDX-License-Identifier: GPL-2.0-or-later */
Gerd Hoffmann74152872019-04-05 11:52:15 +02002/*
3 * Copyright (C) 2016 Noralf Trønnes
Gerd Hoffmann74152872019-04-05 11:52:15 +02004 */
5
6#ifndef __LINUX_DRM_FORMAT_HELPER_H
7#define __LINUX_DRM_FORMAT_HELPER_H
8
9struct drm_framebuffer;
10struct drm_rect;
11
12void drm_fb_memcpy(void *dst, void *vaddr, struct drm_framebuffer *fb,
13 struct drm_rect *clip);
Gerd Hoffmannbf4f6d12019-04-10 08:38:13 +020014void drm_fb_memcpy_dstclip(void __iomem *dst, void *vaddr,
15 struct drm_framebuffer *fb,
Gerd Hoffmann26f024f2019-04-05 11:52:16 +020016 struct drm_rect *clip);
Gerd Hoffmann74152872019-04-05 11:52:15 +020017void drm_fb_swab16(u16 *dst, void *vaddr, struct drm_framebuffer *fb,
18 struct drm_rect *clip);
Gerd Hoffmannbcc44422019-04-05 11:52:17 +020019void drm_fb_xrgb8888_to_rgb565(void *dst, void *vaddr,
Gerd Hoffmann74152872019-04-05 11:52:15 +020020 struct drm_framebuffer *fb,
Gerd Hoffmannd653bd32019-04-10 08:38:14 +020021 struct drm_rect *clip, bool swab);
22void drm_fb_xrgb8888_to_rgb565_dstclip(void __iomem *dst, unsigned int dst_pitch,
Gerd Hoffmannbcc44422019-04-05 11:52:17 +020023 void *vaddr, struct drm_framebuffer *fb,
Gerd Hoffmannd653bd32019-04-10 08:38:14 +020024 struct drm_rect *clip, bool swab);
Gerd Hoffmann5c5373b2019-04-10 08:38:15 +020025void drm_fb_xrgb8888_to_rgb888_dstclip(void __iomem *dst, unsigned int dst_pitch,
Gerd Hoffmannec3de7a2019-04-05 11:52:18 +020026 void *vaddr, struct drm_framebuffer *fb,
27 struct drm_rect *clip);
Gerd Hoffmann74152872019-04-05 11:52:15 +020028void drm_fb_xrgb8888_to_gray8(u8 *dst, void *vaddr, struct drm_framebuffer *fb,
29 struct drm_rect *clip);
30
31#endif /* __LINUX_DRM_FORMAT_HELPER_H */