forked from ~ljy/RK356X_SDK_RELEASE

hc
2024-05-13 9d77db3c730780c8ef5ccd4b66403ff5675cfe4e
kernel/drivers/gpu/drm/rockchip/rockchip_drm_gem.h
....@@ -1,19 +1,13 @@
1
+/* SPDX-License-Identifier: GPL-2.0-only */
12 /*
23 * Copyright (C) Fuzhou Rockchip Electronics Co.Ltd
34 * 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.
135 */
146
157 #ifndef _ROCKCHIP_DRM_GEM_H
168 #define _ROCKCHIP_DRM_GEM_H
9
+
10
+#include <linux/dma-direction.h>
1711
1812 #define to_rockchip_obj(x) container_of(x, struct rockchip_gem_object, base)
1913
....@@ -29,10 +23,8 @@
2923 enum rockchip_gem_buf_type buf_type;
3024
3125 void *kvaddr;
32
- void *cookie;
3326 dma_addr_t dma_addr; /* iova if iommu enable, otherwise physical address */
3427 dma_addr_t dma_handle; /* physical address */
35
-
3628 /* Used when IOMMU is disabled */
3729 unsigned long dma_attrs;
3830
....@@ -68,9 +60,6 @@
6860 int rockchip_gem_dumb_create(struct drm_file *file_priv,
6961 struct drm_device *dev,
7062 struct drm_mode_create_dumb *args);
71
-int rockchip_gem_dumb_map_offset(struct drm_file *file_priv,
72
- struct drm_device *dev, uint32_t handle,
73
- uint64_t *offset);
7463 /*
7564 * request gem object creation and buffer allocation as the size
7665 * that it is calculated with framebuffer information such as width,
....@@ -92,14 +81,5 @@
9281 int rockchip_gem_prime_end_cpu_access(struct drm_gem_object *obj,
9382 enum dma_data_direction dir);
9483
95
-int rockchip_gem_prime_begin_cpu_access_partial(struct drm_gem_object *obj,
96
- enum dma_data_direction dir,
97
- unsigned int offset,
98
- unsigned int len);
99
-
100
-int rockchip_gem_prime_end_cpu_access_partial(struct drm_gem_object *obj,
101
- enum dma_data_direction dir,
102
- unsigned int offset,
103
- unsigned int len);
104
-
84
+void rockchip_gem_get_ddr_info(void);
10585 #endif /* _ROCKCHIP_DRM_GEM_H */