Loading...
1/* SPDX-License-Identifier: GPL-2.0 */
2#ifndef __DRM_FB_CMA_HELPER_H__
3#define __DRM_FB_CMA_HELPER_H__
4
5struct drm_framebuffer;
6struct drm_plane_state;
7
8struct drm_gem_cma_object *drm_fb_cma_get_gem_obj(struct drm_framebuffer *fb,
9 unsigned int plane);
10
11dma_addr_t drm_fb_cma_get_gem_addr(struct drm_framebuffer *fb,
12 struct drm_plane_state *state,
13 unsigned int plane);
14
15#endif
16
1#ifndef __DRM_FB_CMA_HELPER_H__
2#define __DRM_FB_CMA_HELPER_H__
3
4struct drm_fbdev_cma;
5struct drm_gem_cma_object;
6
7struct drm_fb_helper_surface_size;
8struct drm_framebuffer_funcs;
9struct drm_fb_helper_funcs;
10struct drm_framebuffer;
11struct drm_fb_helper;
12struct drm_device;
13struct drm_file;
14struct drm_mode_fb_cmd2;
15struct drm_plane;
16struct drm_plane_state;
17
18struct drm_fbdev_cma *drm_fbdev_cma_init_with_funcs(struct drm_device *dev,
19 unsigned int preferred_bpp, unsigned int num_crtc,
20 unsigned int max_conn_count, const struct drm_fb_helper_funcs *funcs);
21struct drm_fbdev_cma *drm_fbdev_cma_init(struct drm_device *dev,
22 unsigned int preferred_bpp, unsigned int num_crtc,
23 unsigned int max_conn_count);
24void drm_fbdev_cma_fini(struct drm_fbdev_cma *fbdev_cma);
25
26void drm_fbdev_cma_restore_mode(struct drm_fbdev_cma *fbdev_cma);
27void drm_fbdev_cma_hotplug_event(struct drm_fbdev_cma *fbdev_cma);
28void drm_fbdev_cma_set_suspend(struct drm_fbdev_cma *fbdev_cma, int state);
29int drm_fbdev_cma_create_with_funcs(struct drm_fb_helper *helper,
30 struct drm_fb_helper_surface_size *sizes,
31 const struct drm_framebuffer_funcs *funcs);
32
33void drm_fb_cma_destroy(struct drm_framebuffer *fb);
34int drm_fb_cma_create_handle(struct drm_framebuffer *fb,
35 struct drm_file *file_priv, unsigned int *handle);
36
37struct drm_framebuffer *drm_fb_cma_create_with_funcs(struct drm_device *dev,
38 struct drm_file *file_priv, const struct drm_mode_fb_cmd2 *mode_cmd,
39 const struct drm_framebuffer_funcs *funcs);
40struct drm_framebuffer *drm_fb_cma_create(struct drm_device *dev,
41 struct drm_file *file_priv, const struct drm_mode_fb_cmd2 *mode_cmd);
42
43struct drm_gem_cma_object *drm_fb_cma_get_gem_obj(struct drm_framebuffer *fb,
44 unsigned int plane);
45
46int drm_fb_cma_prepare_fb(struct drm_plane *plane,
47 struct drm_plane_state *state);
48
49#ifdef CONFIG_DEBUG_FS
50struct seq_file;
51
52int drm_fb_cma_debugfs_show(struct seq_file *m, void *arg);
53#endif
54
55#endif
56