Merge tag 'lsk-v3.10-15.04-android'
[firefly-linux-kernel-4.4.55.git] / drivers / gpu / drm / rockchip / rockchip_drm_fb.h
1 /*
2  * Copyright (C) ROCKCHIP, Inc.
3  * Author:yzq<yzq@rock-chips.com>
4  *
5  * based on exynos_drm_fb.h
6  *
7  * This software is licensed under the terms of the GNU General Public
8  * License version 2, as published by the Free Software Foundation, and
9  * may be copied, distributed, and modified under those terms.
10  *
11  * This program is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14  * GNU General Public License for more details.
15  */
16 #ifndef _ROCKCHIP_DRM_FB_H_
17 #define _ROCKCHIP_DRM_FB_H
18
19 struct drm_framebuffer *
20 rockchip_drm_framebuffer_init(struct drm_device *dev,
21                             struct drm_mode_fb_cmd2 *mode_cmd,
22                             struct drm_gem_object *obj);
23
24 /* get memory information of a drm framebuffer */
25 struct rockchip_drm_gem_buf *rockchip_drm_fb_buffer(struct drm_framebuffer *fb,
26                                                  int index);
27
28 void rockchip_drm_mode_config_init(struct drm_device *dev);
29
30 /* set a buffer count to drm framebuffer. */
31 void rockchip_drm_fb_set_buf_cnt(struct drm_framebuffer *fb,
32                                                 unsigned int cnt);
33
34 /* get a buffer count to drm framebuffer. */
35 unsigned int rockchip_drm_fb_get_buf_cnt(struct drm_framebuffer *fb);
36
37 #endif