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 #include <linux/refcount.h> 14 15 /* We don't want these from i915_drm.h in case of Xe */ 16 #undef I915_TILING_X 17 #undef I915_TILING_Y 18 #define I915_TILING_X 0 19 #define I915_TILING_Y 0 20 21 struct xe_bo; 22 23 struct i915_vma { 24 refcount_t ref; 25 struct xe_bo *bo, *dpt; 26 struct xe_ggtt_node *node; 27 }; 28 29 #define i915_ggtt_clear_scanout(bo) do { } while (0) 30 31 #define i915_vma_fence_id(vma) -1 32 i915_ggtt_offset(const struct i915_vma * vma)33static inline u32 i915_ggtt_offset(const struct i915_vma *vma) 34 { 35 return vma->node->base.start; 36 } 37 38 #endif 39