Lars-Peter Clausen | 2e3b3c4 | 2012-07-02 16:37:47 +0200 | [diff] [blame] | 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 | |
Noralf Trønnes | 199c771 | 2016-04-28 17:18:35 +0200 | [diff] [blame] | 7 | struct drm_fb_helper_surface_size; |
| 8 | struct drm_framebuffer_funcs; |
| 9 | struct drm_fb_helper_funcs; |
Lars-Peter Clausen | 2e3b3c4 | 2012-07-02 16:37:47 +0200 | [diff] [blame] | 10 | struct drm_framebuffer; |
Noralf Trønnes | 199c771 | 2016-04-28 17:18:35 +0200 | [diff] [blame] | 11 | struct drm_fb_helper; |
Lars-Peter Clausen | 2e3b3c4 | 2012-07-02 16:37:47 +0200 | [diff] [blame] | 12 | struct drm_device; |
| 13 | struct drm_file; |
| 14 | struct drm_mode_fb_cmd2; |
| 15 | |
Noralf Trønnes | 199c771 | 2016-04-28 17:18:35 +0200 | [diff] [blame] | 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); |
Lars-Peter Clausen | 2e3b3c4 | 2012-07-02 16:37:47 +0200 | [diff] [blame] | 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); |
Stefan Agner | 917f425 | 2016-02-11 17:30:14 -0800 | [diff] [blame] | 26 | void drm_fbdev_cma_set_suspend(struct drm_fbdev_cma *fbdev_cma, int state); |
Noralf Trønnes | 199c771 | 2016-04-28 17:18:35 +0200 | [diff] [blame] | 27 | int drm_fbdev_cma_create_with_funcs(struct drm_fb_helper *helper, |
| 28 | struct drm_fb_helper_surface_size *sizes, |
Noralf Trønnes | fdce184 | 2016-05-12 20:25:21 +0200 | [diff] [blame] | 29 | const struct drm_framebuffer_funcs *funcs); |
Noralf Trønnes | 199c771 | 2016-04-28 17:18:35 +0200 | [diff] [blame] | 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); |
Lars-Peter Clausen | 2e3b3c4 | 2012-07-02 16:37:47 +0200 | [diff] [blame] | 34 | |
Noralf Trønnes | 3995b39 | 2016-05-12 20:25:22 +0200 | [diff] [blame] | 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); |
Lars-Peter Clausen | 2e3b3c4 | 2012-07-02 16:37:47 +0200 | [diff] [blame] | 38 | struct drm_framebuffer *drm_fb_cma_create(struct drm_device *dev, |
Ville Syrjälä | 1eb8345 | 2015-11-11 19:11:29 +0200 | [diff] [blame] | 39 | struct drm_file *file_priv, const struct drm_mode_fb_cmd2 *mode_cmd); |
Lars-Peter Clausen | 2e3b3c4 | 2012-07-02 16:37:47 +0200 | [diff] [blame] | 40 | |
| 41 | struct drm_gem_cma_object *drm_fb_cma_get_gem_obj(struct drm_framebuffer *fb, |
| 42 | unsigned int plane); |
| 43 | |
Rob Clark | 6f64609 | 2012-12-10 10:46:43 -0600 | [diff] [blame] | 44 | #ifdef CONFIG_DEBUG_FS |
Maxime Ripard | 80588a8 | 2016-02-08 13:58:56 +0100 | [diff] [blame] | 45 | struct seq_file; |
| 46 | |
Rob Clark | 6f64609 | 2012-12-10 10:46:43 -0600 | [diff] [blame] | 47 | int drm_fb_cma_debugfs_show(struct seq_file *m, void *arg); |
| 48 | #endif |
| 49 | |
Lars-Peter Clausen | 2e3b3c4 | 2012-07-02 16:37:47 +0200 | [diff] [blame] | 50 | #endif |
| 51 | |