]> git.kernelconcepts.de Git - karo-tx-linux.git/blob - include/drm/drm_fb_cma_helper.h
Merge branches 'acpi-button', 'acpica' and 'acpi-sysfs'
[karo-tx-linux.git] / include / drm / drm_fb_cma_helper.h
1 #ifndef __DRM_FB_CMA_HELPER_H__
2 #define __DRM_FB_CMA_HELPER_H__
3
4 struct drm_fbdev_cma;
5 struct drm_gem_cma_object;
6
7 struct drm_fb_helper_surface_size;
8 struct drm_framebuffer_funcs;
9 struct drm_fb_helper_funcs;
10 struct drm_framebuffer;
11 struct drm_fb_helper;
12 struct drm_device;
13 struct drm_file;
14 struct drm_mode_fb_cmd2;
15 struct drm_plane;
16 struct drm_plane_state;
17
18 struct drm_fbdev_cma *drm_fbdev_cma_init_with_funcs(struct drm_device *dev,
19         unsigned int preferred_bpp, unsigned int max_conn_count,
20         const struct drm_framebuffer_funcs *funcs);
21 struct drm_fbdev_cma *drm_fbdev_cma_init(struct drm_device *dev,
22         unsigned int preferred_bpp, unsigned int max_conn_count);
23 void drm_fbdev_cma_fini(struct drm_fbdev_cma *fbdev_cma);
24
25 void drm_fbdev_cma_restore_mode(struct drm_fbdev_cma *fbdev_cma);
26 void drm_fbdev_cma_hotplug_event(struct drm_fbdev_cma *fbdev_cma);
27 void drm_fbdev_cma_set_suspend(struct drm_fbdev_cma *fbdev_cma, int state);
28 void drm_fbdev_cma_set_suspend_unlocked(struct drm_fbdev_cma *fbdev_cma,
29                                         int state);
30
31 void drm_fb_cma_destroy(struct drm_framebuffer *fb);
32 int drm_fb_cma_create_handle(struct drm_framebuffer *fb,
33         struct drm_file *file_priv, unsigned int *handle);
34
35 struct drm_framebuffer *drm_fb_cma_create_with_funcs(struct drm_device *dev,
36         struct drm_file *file_priv, const struct drm_mode_fb_cmd2 *mode_cmd,
37         const struct drm_framebuffer_funcs *funcs);
38 struct drm_framebuffer *drm_fb_cma_create(struct drm_device *dev,
39         struct drm_file *file_priv, const struct drm_mode_fb_cmd2 *mode_cmd);
40
41 struct drm_gem_cma_object *drm_fb_cma_get_gem_obj(struct drm_framebuffer *fb,
42         unsigned int plane);
43
44 int drm_fb_cma_prepare_fb(struct drm_plane *plane,
45                           struct drm_plane_state *state);
46
47 #ifdef CONFIG_DEBUG_FS
48 struct seq_file;
49
50 int drm_fb_cma_debugfs_show(struct seq_file *m, void *arg);
51 #endif
52
53 #endif
54