File Index
Files and directories
Sign in
FILE

drm_gem_framebuffer_helper.h

File preview with syntax highlighting.

linux-6.19.14/include/drm/drm_gem_framebuffer_helper.h C
 1#ifndef __DRM_GEM_FB_HELPER_H__
 2#define __DRM_GEM_FB_HELPER_H__
 3
 4#include <linux/dma-buf.h>
 5#include <linux/iosys-map.h>
 6
 7struct drm_afbc_framebuffer;
 8struct drm_device;
 9struct drm_fb_helper_surface_size;
10struct drm_file;
11struct drm_format_info;
12struct drm_framebuffer;
13struct drm_framebuffer_funcs;
14struct drm_gem_object;
15struct drm_mode_fb_cmd2;
16
17#define AFBC_VENDOR_AND_TYPE_MASK	GENMASK_ULL(63, 52)
18
19struct drm_gem_object *drm_gem_fb_get_obj(struct drm_framebuffer *fb,
20					  unsigned int plane);
21void drm_gem_fb_destroy(struct drm_framebuffer *fb);
22int drm_gem_fb_create_handle(struct drm_framebuffer *fb, struct drm_file *file,
23			     unsigned int *handle);
24
25int drm_gem_fb_init_with_funcs(struct drm_device *dev,
26			       struct drm_framebuffer *fb,
27			       struct drm_file *file,
28			       const struct drm_format_info *info,
29			       const struct drm_mode_fb_cmd2 *mode_cmd,
30			       const struct drm_framebuffer_funcs *funcs);
31struct drm_framebuffer *
32drm_gem_fb_create_with_funcs(struct drm_device *dev, struct drm_file *file,
33			     const struct drm_format_info *info,
34			     const struct drm_mode_fb_cmd2 *mode_cmd,
35			     const struct drm_framebuffer_funcs *funcs);
36struct drm_framebuffer *
37drm_gem_fb_create(struct drm_device *dev, struct drm_file *file,
38		  const struct drm_format_info *info,
39		  const struct drm_mode_fb_cmd2 *mode_cmd);
40struct drm_framebuffer *
41drm_gem_fb_create_with_dirty(struct drm_device *dev, struct drm_file *file,
42			     const struct drm_format_info *info,
43			     const struct drm_mode_fb_cmd2 *mode_cmd);
44
45int drm_gem_fb_vmap(struct drm_framebuffer *fb, struct iosys_map *map,
46		    struct iosys_map *data);
47void drm_gem_fb_vunmap(struct drm_framebuffer *fb, struct iosys_map *map);
48int drm_gem_fb_begin_cpu_access(struct drm_framebuffer *fb, enum dma_data_direction dir);
49void drm_gem_fb_end_cpu_access(struct drm_framebuffer *fb, enum dma_data_direction dir);
50
51#define drm_is_afbc(modifier) \
52	(((modifier) & AFBC_VENDOR_AND_TYPE_MASK) == DRM_FORMAT_MOD_ARM_AFBC(0))
53
54int drm_gem_fb_afbc_init(struct drm_device *dev,
55			 const struct drm_format_info *info,
56			 const struct drm_mode_fb_cmd2 *mode_cmd,
57			 struct drm_afbc_framebuffer *afbc_fb);
58
59#endif
~/ Read-only file preview.