drm/amd/powerplay: fix bug that get wrong polaris evv voltage.
[linux-2.6-block.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
16 struct drm_fbdev_cma *drm_fbdev_cma_init_with_funcs(struct drm_device *dev,
17         unsigned int preferred_bpp, unsigned int num_crtc,
18         unsigned int max_conn_count, const struct drm_fb_helper_funcs *funcs);
19 struct drm_fbdev_cma *drm_fbdev_cma_init(struct drm_device *dev,
20         unsigned int preferred_bpp, unsigned int num_crtc,
21         unsigned int max_conn_count);
22 void drm_fbdev_cma_fini(struct drm_fbdev_cma *fbdev_cma);
23
24 void drm_fbdev_cma_restore_mode(struct drm_fbdev_cma *fbdev_cma);
25 void drm_fbdev_cma_hotplug_event(struct drm_fbdev_cma *fbdev_cma);
26 int drm_fbdev_cma_create_with_funcs(struct drm_fb_helper *helper,
27         struct drm_fb_helper_surface_size *sizes,
28         const struct drm_framebuffer_funcs *funcs);
29
30 void drm_fb_cma_destroy(struct drm_framebuffer *fb);
31 int drm_fb_cma_create_handle(struct drm_framebuffer *fb,
32         struct drm_file *file_priv, unsigned int *handle);
33
34 struct drm_framebuffer *drm_fb_cma_create_with_funcs(struct drm_device *dev,
35         struct drm_file *file_priv, const struct drm_mode_fb_cmd2 *mode_cmd,
36         const struct drm_framebuffer_funcs *funcs);
37 struct drm_framebuffer *drm_fb_cma_create(struct drm_device *dev,
38         struct drm_file *file_priv, const struct drm_mode_fb_cmd2 *mode_cmd);
39
40 struct drm_gem_cma_object *drm_fb_cma_get_gem_obj(struct drm_framebuffer *fb,
41         unsigned int plane);
42
43 #ifdef CONFIG_DEBUG_FS
44 struct seq_file;
45
46 int drm_fb_cma_debugfs_show(struct seq_file *m, void *arg);
47 #endif
48
49 #endif
50