2 * Copyright (C) ROCKCHIP, Inc.
3 * Author:yzq<yzq@rock-chips.com>
4 * This software is licensed under the terms of the GNU General Public
5 * License version 2, as published by the Free Software Foundation, and
6 * may be copied, distributed, and modified under those terms.
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
13 #ifndef _ROCKCHIP_DRM_BUF_H_
14 #define _ROCKCHIP_DRM_BUF_H_
16 /* create and initialize buffer object. */
17 struct rockchip_drm_gem_buf *rockchip_drm_init_buf(struct drm_device *dev,
20 /* destroy buffer object. */
21 void rockchip_drm_fini_buf(struct drm_device *dev,
22 struct rockchip_drm_gem_buf *buffer);
24 /* allocate physical memory region and setup sgt. */
25 int rockchip_drm_alloc_buf(struct drm_device *dev,
26 struct rockchip_drm_gem_buf *buf,
29 /* release physical memory region, and sgt. */
30 void rockchip_drm_free_buf(struct drm_device *dev,
32 struct rockchip_drm_gem_buf *buffer);