2 * Copyright (C) ROCKCHIP, Inc.
3 * Author:yzq<yzq@rock-chips.com>
5 * based on exynos_drm_fb.h
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.
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.
16 #ifndef _ROCKCHIP_DRM_FB_H_
17 #define _ROCKCHIP_DRM_FB_H
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);
24 /* get memory information of a drm framebuffer */
25 struct rockchip_drm_gem_buf *rockchip_drm_fb_buffer(struct drm_framebuffer *fb,
28 void rockchip_drm_mode_config_init(struct drm_device *dev);
30 /* set a buffer count to drm framebuffer. */
31 void rockchip_drm_fb_set_buf_cnt(struct drm_framebuffer *fb,
34 /* get a buffer count to drm framebuffer. */
35 unsigned int rockchip_drm_fb_get_buf_cnt(struct drm_framebuffer *fb);