forked from ~ljy/RK356X_SDK_RELEASE

hc
2024-05-13 9d77db3c730780c8ef5ccd4b66403ff5675cfe4e
kernel/drivers/gpu/drm/qxl/qxl_object.h
....@@ -27,14 +27,15 @@
2727
2828 #include "qxl_drv.h"
2929
30
-static inline int qxl_bo_reserve(struct qxl_bo *bo, bool no_wait)
30
+static inline int qxl_bo_reserve(struct qxl_bo *bo)
3131 {
3232 int r;
3333
34
- r = ttm_bo_reserve(&bo->tbo, true, no_wait, NULL);
34
+ r = ttm_bo_reserve(&bo->tbo, true, false, NULL);
3535 if (unlikely(r != 0)) {
3636 if (r != -ERESTARTSYS) {
37
- struct drm_device *ddev = bo->gem_base.dev;
37
+ struct drm_device *ddev = bo->tbo.base.dev;
38
+
3839 dev_err(ddev->dev, "%p reserve failed\n", bo);
3940 }
4041 return r;
....@@ -47,11 +48,6 @@
4748 ttm_bo_unreserve(&bo->tbo);
4849 }
4950
50
-static inline u64 qxl_bo_gpu_offset(struct qxl_bo *bo)
51
-{
52
- return bo->tbo.offset;
53
-}
54
-
5551 static inline unsigned long qxl_bo_size(struct qxl_bo *bo)
5652 {
5753 return bo->tbo.num_pages << PAGE_SHIFT;
....@@ -59,7 +55,7 @@
5955
6056 static inline u64 qxl_bo_mmap_offset(struct qxl_bo *bo)
6157 {
62
- return drm_vma_node_offset_addr(&bo->tbo.vma_node);
58
+ return drm_vma_node_offset_addr(&bo->tbo.base.vma_node);
6359 }
6460
6561 static inline int qxl_bo_wait(struct qxl_bo *bo, u32 *mem_type,
....@@ -70,7 +66,8 @@
7066 r = ttm_bo_reserve(&bo->tbo, true, no_wait, NULL);
7167 if (unlikely(r != 0)) {
7268 if (r != -ERESTARTSYS) {
73
- struct drm_device *ddev = bo->gem_base.dev;
69
+ struct drm_device *ddev = bo->tbo.base.dev;
70
+
7471 dev_err(ddev->dev, "%p reserve failed for wait\n",
7572 bo);
7673 }
....@@ -87,6 +84,7 @@
8784 extern int qxl_bo_create(struct qxl_device *qdev,
8885 unsigned long size,
8986 bool kernel, bool pinned, u32 domain,
87
+ u32 priority,
9088 struct qxl_surface *surf,
9189 struct qxl_bo **bo_ptr);
9290 extern int qxl_bo_kmap(struct qxl_bo *bo, void **ptr);
....@@ -95,7 +93,7 @@
9593 void qxl_bo_kunmap_atomic_page(struct qxl_device *qdev, struct qxl_bo *bo, void *map);
9694 extern struct qxl_bo *qxl_bo_ref(struct qxl_bo *bo);
9795 extern void qxl_bo_unref(struct qxl_bo **bo);
98
-extern int qxl_bo_pin(struct qxl_bo *bo, u32 domain, u64 *gpu_addr);
96
+extern int qxl_bo_pin(struct qxl_bo *bo);
9997 extern int qxl_bo_unpin(struct qxl_bo *bo);
10098 extern void qxl_ttm_placement_from_domain(struct qxl_bo *qbo, u32 domain, bool pinned);
10199 extern bool qxl_ttm_bo_is_qxl_bo(struct ttm_buffer_object *bo);