df6111ef2a58dc99d30dd08ea0b6f904b84f5393
[firefly-linux-kernel-4.4.55.git] / drivers / gpu / drm / rockchip / rockchip_drm_fb.h
1 /*
2  * Copyright (C) Fuzhou Rockchip Electronics Co.Ltd
3  * Author:Mark Yao <mark.yao@rock-chips.com>
4  *
5  * This software is licensed under the terms of the GNU General Public
6  * License version 2, as published by the Free Software Foundation, and
7  * may be copied, distributed, and modified under those terms.
8  *
9  * This program is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12  * GNU General Public License for more details.
13  */
14
15 #ifndef _ROCKCHIP_DRM_FB_H
16 #define _ROCKCHIP_DRM_FB_H
17
18 struct drm_framebuffer *
19 rockchip_drm_framebuffer_init(struct drm_device *dev,
20                               struct drm_mode_fb_cmd2 *mode_cmd,
21                               struct drm_gem_object *obj);
22 void rockchip_drm_framebuffer_fini(struct drm_framebuffer *fb);
23
24 void rockchip_drm_mode_config_init(struct drm_device *dev);
25
26 struct drm_framebuffer *
27 rockchip_fb_alloc(struct drm_device *dev, struct drm_mode_fb_cmd2 *mode_cmd,
28                   struct drm_gem_object **obj, struct resource *res,
29                   unsigned int num_planes);
30
31 dma_addr_t rockchip_fb_get_dma_addr(struct drm_framebuffer *fb,
32                                     unsigned int plane, struct device *dev);
33 #endif /* _ROCKCHIP_DRM_FB_H */