drm_format_helper.h (2382B)
1/* SPDX-License-Identifier: GPL-2.0-or-later */ 2/* 3 * Copyright (C) 2016 Noralf Trønnes 4 */ 5 6#ifndef __LINUX_DRM_FORMAT_HELPER_H 7#define __LINUX_DRM_FORMAT_HELPER_H 8 9struct drm_format_info; 10struct drm_framebuffer; 11struct drm_rect; 12 13unsigned int drm_fb_clip_offset(unsigned int pitch, const struct drm_format_info *format, 14 const struct drm_rect *clip); 15 16void drm_fb_memcpy(void *dst, unsigned int dst_pitch, const void *vaddr, 17 const struct drm_framebuffer *fb, const struct drm_rect *clip); 18void drm_fb_memcpy_toio(void __iomem *dst, unsigned int dst_pitch, const void *vaddr, 19 const struct drm_framebuffer *fb, const struct drm_rect *clip); 20void drm_fb_swab(void *dst, unsigned int dst_pitch, const void *src, 21 const struct drm_framebuffer *fb, const struct drm_rect *clip, 22 bool cached); 23void drm_fb_xrgb8888_to_rgb332(void *dst, unsigned int dst_pitch, const void *vaddr, 24 const struct drm_framebuffer *fb, const struct drm_rect *clip); 25void drm_fb_xrgb8888_to_rgb565(void *dst, unsigned int dst_pitch, const void *vaddr, 26 const struct drm_framebuffer *fb, const struct drm_rect *clip, 27 bool swab); 28void drm_fb_xrgb8888_to_rgb565_toio(void __iomem *dst, unsigned int dst_pitch, 29 const void *vaddr, const struct drm_framebuffer *fb, 30 const struct drm_rect *clip, bool swab); 31void drm_fb_xrgb8888_to_rgb888(void *dst, unsigned int dst_pitch, const void *src, 32 const struct drm_framebuffer *fb, const struct drm_rect *clip); 33void drm_fb_xrgb8888_to_rgb888_toio(void __iomem *dst, unsigned int dst_pitch, 34 const void *vaddr, const struct drm_framebuffer *fb, 35 const struct drm_rect *clip); 36void drm_fb_xrgb8888_to_xrgb2101010_toio(void __iomem *dst, unsigned int dst_pitch, 37 const void *vaddr, const struct drm_framebuffer *fb, 38 const struct drm_rect *clip); 39void drm_fb_xrgb8888_to_gray8(void *dst, unsigned int dst_pitch, const void *vaddr, 40 const struct drm_framebuffer *fb, const struct drm_rect *clip); 41 42int drm_fb_blit_toio(void __iomem *dst, unsigned int dst_pitch, uint32_t dst_format, 43 const void *vmap, const struct drm_framebuffer *fb, 44 const struct drm_rect *rect); 45 46void drm_fb_xrgb8888_to_mono(void *dst, unsigned int dst_pitch, const void *src, 47 const struct drm_framebuffer *fb, const struct drm_rect *clip); 48 49#endif /* __LINUX_DRM_FORMAT_HELPER_H */