Thomas Gleixner | 2874c5f | 2019-05-27 08:55:01 +0200 | [diff] [blame] | 1 | /* SPDX-License-Identifier: GPL-2.0-or-later */ |
Gerd Hoffmann | 7415287 | 2019-04-05 11:52:15 +0200 | [diff] [blame] | 2 | /* |
| 3 | * Copyright (C) 2016 Noralf Trønnes |
Gerd Hoffmann | 7415287 | 2019-04-05 11:52:15 +0200 | [diff] [blame] | 4 | */ |
| 5 | |
| 6 | #ifndef __LINUX_DRM_FORMAT_HELPER_H |
| 7 | #define __LINUX_DRM_FORMAT_HELPER_H |
| 8 | |
| 9 | struct drm_framebuffer; |
| 10 | struct drm_rect; |
| 11 | |
| 12 | void drm_fb_memcpy(void *dst, void *vaddr, struct drm_framebuffer *fb, |
| 13 | struct drm_rect *clip); |
Gerd Hoffmann | bf4f6d1 | 2019-04-10 08:38:13 +0200 | [diff] [blame] | 14 | void drm_fb_memcpy_dstclip(void __iomem *dst, void *vaddr, |
| 15 | struct drm_framebuffer *fb, |
Gerd Hoffmann | 26f024f | 2019-04-05 11:52:16 +0200 | [diff] [blame] | 16 | struct drm_rect *clip); |
Gerd Hoffmann | 7415287 | 2019-04-05 11:52:15 +0200 | [diff] [blame] | 17 | void drm_fb_swab16(u16 *dst, void *vaddr, struct drm_framebuffer *fb, |
| 18 | struct drm_rect *clip); |
Gerd Hoffmann | bcc4442 | 2019-04-05 11:52:17 +0200 | [diff] [blame] | 19 | void drm_fb_xrgb8888_to_rgb565(void *dst, void *vaddr, |
Gerd Hoffmann | 7415287 | 2019-04-05 11:52:15 +0200 | [diff] [blame] | 20 | struct drm_framebuffer *fb, |
Gerd Hoffmann | d653bd3 | 2019-04-10 08:38:14 +0200 | [diff] [blame] | 21 | struct drm_rect *clip, bool swab); |
| 22 | void drm_fb_xrgb8888_to_rgb565_dstclip(void __iomem *dst, unsigned int dst_pitch, |
Gerd Hoffmann | bcc4442 | 2019-04-05 11:52:17 +0200 | [diff] [blame] | 23 | void *vaddr, struct drm_framebuffer *fb, |
Gerd Hoffmann | d653bd3 | 2019-04-10 08:38:14 +0200 | [diff] [blame] | 24 | struct drm_rect *clip, bool swab); |
Gerd Hoffmann | 5c5373b | 2019-04-10 08:38:15 +0200 | [diff] [blame] | 25 | void drm_fb_xrgb8888_to_rgb888_dstclip(void __iomem *dst, unsigned int dst_pitch, |
Gerd Hoffmann | ec3de7a | 2019-04-05 11:52:18 +0200 | [diff] [blame] | 26 | void *vaddr, struct drm_framebuffer *fb, |
| 27 | struct drm_rect *clip); |
Gerd Hoffmann | 7415287 | 2019-04-05 11:52:15 +0200 | [diff] [blame] | 28 | void 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 */ |