xref: /linux/drivers/gpu/drm/xe/compat-i915-headers/i915_vma.h (revision c532de5a67a70f8533d495f8f2aaa9a0491c3ad0)
1 /* SPDX-License-Identifier: MIT */
2 /*
3  * Copyright © 2023 Intel Corporation
4  */
5 
6 #ifndef I915_VMA_H
7 #define I915_VMA_H
8 
9 #include <uapi/drm/i915_drm.h>
10 
11 #include "xe_ggtt_types.h"
12 
13 /* We don't want these from i915_drm.h in case of Xe */
14 #undef I915_TILING_X
15 #undef I915_TILING_Y
16 #define I915_TILING_X 0
17 #define I915_TILING_Y 0
18 
19 struct xe_bo;
20 
21 struct i915_vma {
22 	struct xe_bo *bo, *dpt;
23 	struct xe_ggtt_node *node;
24 };
25 
26 #define i915_ggtt_clear_scanout(bo) do { } while (0)
27 
28 #define i915_vma_fence_id(vma) -1
29 
30 static inline u32 i915_ggtt_offset(const struct i915_vma *vma)
31 {
32 	return vma->node->base.start;
33 }
34 
35 #endif
36