blob: 8dbbe1eece1bd28eb18e4ee82788b8ad840b670f [file] [log] [blame]
Greg Kroah-Hartmanb2441312017-11-01 15:07:57 +01001/* SPDX-License-Identifier: GPL-2.0 */
Lars-Peter Clausen2e3b3c42012-07-02 16:37:47 +02002#ifndef __DRM_FB_CMA_HELPER_H__
3#define __DRM_FB_CMA_HELPER_H__
4
5struct drm_fbdev_cma;
6struct drm_gem_cma_object;
7
Noralf Trønnes199c7712016-04-28 17:18:35 +02008struct drm_fb_helper_surface_size;
9struct drm_framebuffer_funcs;
10struct drm_fb_helper_funcs;
Lars-Peter Clausen2e3b3c42012-07-02 16:37:47 +020011struct drm_framebuffer;
Noralf Trønnes199c7712016-04-28 17:18:35 +020012struct drm_fb_helper;
Lars-Peter Clausen2e3b3c42012-07-02 16:37:47 +020013struct drm_device;
14struct drm_file;
15struct drm_mode_fb_cmd2;
Marek Vasut196594e2016-11-15 11:55:29 +010016struct drm_plane;
17struct drm_plane_state;
Lars-Peter Clausen2e3b3c42012-07-02 16:37:47 +020018
Noralf Trønnes41b676e2017-11-15 15:19:41 +010019int drm_fb_cma_fbdev_init(struct drm_device *dev, unsigned int preferred_bpp,
20 unsigned int max_conn_count);
21void drm_fb_cma_fbdev_fini(struct drm_device *dev);
22
Lars-Peter Clausen2e3b3c42012-07-02 16:37:47 +020023struct drm_fbdev_cma *drm_fbdev_cma_init(struct drm_device *dev,
Gabriel Krisman Bertazie4563f62017-02-02 14:26:40 -020024 unsigned int preferred_bpp, unsigned int max_conn_count);
Lars-Peter Clausen2e3b3c42012-07-02 16:37:47 +020025void drm_fbdev_cma_fini(struct drm_fbdev_cma *fbdev_cma);
26
27void drm_fbdev_cma_restore_mode(struct drm_fbdev_cma *fbdev_cma);
28void drm_fbdev_cma_hotplug_event(struct drm_fbdev_cma *fbdev_cma);
Noralf Trønnes199c7712016-04-28 17:18:35 +020029
Lars-Peter Clausen2e3b3c42012-07-02 16:37:47 +020030struct drm_gem_cma_object *drm_fb_cma_get_gem_obj(struct drm_framebuffer *fb,
31 unsigned int plane);
32
Yannick Fertre4636ce92017-04-14 12:13:32 +020033dma_addr_t drm_fb_cma_get_gem_addr(struct drm_framebuffer *fb,
34 struct drm_plane_state *state,
35 unsigned int plane);
36
Lars-Peter Clausen2e3b3c42012-07-02 16:37:47 +020037#endif
38