drm_fb_cma_helper.h 1.8 KB
Newer Older
1 2 3 4 5 6
#ifndef __DRM_FB_CMA_HELPER_H__
#define __DRM_FB_CMA_HELPER_H__

struct drm_fbdev_cma;
struct drm_gem_cma_object;

7 8 9
struct drm_fb_helper_surface_size;
struct drm_framebuffer_funcs;
struct drm_fb_helper_funcs;
10
struct drm_framebuffer;
11
struct drm_fb_helper;
12 13 14 15
struct drm_device;
struct drm_file;
struct drm_mode_fb_cmd2;

16 17 18
struct drm_fbdev_cma *drm_fbdev_cma_init_with_funcs(struct drm_device *dev,
	unsigned int preferred_bpp, unsigned int num_crtc,
	unsigned int max_conn_count, const struct drm_fb_helper_funcs *funcs);
19 20 21 22 23 24 25
struct drm_fbdev_cma *drm_fbdev_cma_init(struct drm_device *dev,
	unsigned int preferred_bpp, unsigned int num_crtc,
	unsigned int max_conn_count);
void drm_fbdev_cma_fini(struct drm_fbdev_cma *fbdev_cma);

void drm_fbdev_cma_restore_mode(struct drm_fbdev_cma *fbdev_cma);
void drm_fbdev_cma_hotplug_event(struct drm_fbdev_cma *fbdev_cma);
26
void drm_fbdev_cma_set_suspend(struct drm_fbdev_cma *fbdev_cma, int state);
27 28
int drm_fbdev_cma_create_with_funcs(struct drm_fb_helper *helper,
	struct drm_fb_helper_surface_size *sizes,
29
	const struct drm_framebuffer_funcs *funcs);
30 31 32 33

void drm_fb_cma_destroy(struct drm_framebuffer *fb);
int drm_fb_cma_create_handle(struct drm_framebuffer *fb,
	struct drm_file *file_priv, unsigned int *handle);
34

35 36 37
struct drm_framebuffer *drm_fb_cma_create_with_funcs(struct drm_device *dev,
	struct drm_file *file_priv, const struct drm_mode_fb_cmd2 *mode_cmd,
	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 42 43

struct drm_gem_cma_object *drm_fb_cma_get_gem_obj(struct drm_framebuffer *fb,
	unsigned int plane);

44 45 46
int drm_fb_cma_prepare_fb(struct drm_plane *plane,
			  struct drm_plane_state *state);

R
Rob Clark 已提交
47
#ifdef CONFIG_DEBUG_FS
M
Maxime Ripard 已提交
48 49
struct seq_file;

R
Rob Clark 已提交
50 51 52
int drm_fb_cma_debugfs_show(struct seq_file *m, void *arg);
#endif

53 54
#endif