Linux Audio

Check our new training course

Loading...
Note: File does not exist in v3.1.
 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
 9#include <linux/types.h>
10
11struct drm_device;
12struct drm_format_info;
13struct drm_framebuffer;
14struct drm_rect;
15
16struct iosys_map;
17
18unsigned int drm_fb_clip_offset(unsigned int pitch, const struct drm_format_info *format,
19				const struct drm_rect *clip);
20
21void drm_fb_memcpy(struct iosys_map *dst, const unsigned int *dst_pitch,
22		   const struct iosys_map *src, const struct drm_framebuffer *fb,
23		   const struct drm_rect *clip);
24void drm_fb_swab(struct iosys_map *dst, const unsigned int *dst_pitch,
25		 const struct iosys_map *src, const struct drm_framebuffer *fb,
26		 const struct drm_rect *clip, bool cached);
27void drm_fb_xrgb8888_to_rgb332(struct iosys_map *dst, const unsigned int *dst_pitch,
28			       const struct iosys_map *src, const struct drm_framebuffer *fb,
29			       const struct drm_rect *clip);
30void drm_fb_xrgb8888_to_rgb565(struct iosys_map *dst, const unsigned int *dst_pitch,
31			       const struct iosys_map *src, const struct drm_framebuffer *fb,
32			       const struct drm_rect *clip, bool swab);
33void drm_fb_xrgb8888_to_rgb888(struct iosys_map *dst, const unsigned int *dst_pitch,
34			       const struct iosys_map *src, const struct drm_framebuffer *fb,
35			       const struct drm_rect *clip);
36void drm_fb_xrgb8888_to_xrgb2101010(struct iosys_map *dst, const unsigned int *dst_pitch,
37				    const struct iosys_map *src, const struct drm_framebuffer *fb,
38				    const struct drm_rect *clip);
39void drm_fb_xrgb8888_to_gray8(struct iosys_map *dst, const unsigned int *dst_pitch,
40			      const struct iosys_map *src, const struct drm_framebuffer *fb,
41			      const struct drm_rect *clip);
42
43int drm_fb_blit(struct iosys_map *dst, const unsigned int *dst_pitch, uint32_t dst_format,
44		const struct iosys_map *src, const struct drm_framebuffer *fb,
45		const struct drm_rect *rect);
46
47void drm_fb_xrgb8888_to_mono(struct iosys_map *dst, const unsigned int *dst_pitch,
48			     const struct iosys_map *src, const struct drm_framebuffer *fb,
49			     const struct drm_rect *clip);
50
51size_t drm_fb_build_fourcc_list(struct drm_device *dev,
52				const u32 *native_fourccs, size_t native_nfourccs,
53				const u32 *extra_fourccs, size_t extra_nfourccs,
54				u32 *fourccs_out, size_t nfourccs_out);
55
56#endif /* __LINUX_DRM_FORMAT_HELPER_H */