xref: /linux/drivers/gpu/drm/xe/compat-i915-headers/i915_vma.h (revision ea518afc992032f7570c0a89ac9240b387dc0faf)
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 #include <drm/drm_mm.h>
11 
12 /* We don't want these from i915_drm.h in case of Xe */
13 #undef I915_TILING_X
14 #undef I915_TILING_Y
15 #define I915_TILING_X 0
16 #define I915_TILING_Y 0
17 
18 struct xe_bo;
19 
20 struct i915_vma {
21 	struct xe_bo *bo, *dpt;
22 	struct drm_mm_node node;
23 };
24 
25 #define i915_ggtt_clear_scanout(bo) do { } while (0)
26 
27 #define i915_vma_fence_id(vma) -1
28 
29 static inline u32 i915_ggtt_offset(const struct i915_vma *vma)
30 {
31 	return vma->node.start;
32 }
33 
34 #endif
35