mirror of
https://github.com/torvalds/linux.git
synced 2026-04-21 16:23:59 -04:00
Start using xe_ggtt_node_addr, and avoid comparing the base offset as vma->node is dynamically allocated. Also sneak in a xe_bo_size() for stolen, too small to put as separate commit. Reviewed-by: Matthew Brost <matthew.brost@intel.com> Signed-off-by: Maarten Lankhorst <dev@lankhorst.se> Acked-by: Rodrigo Vivi <rodrigo.vivi@intel.com> Link: https://patch.msgid.link/20260108101014.579906-13-dev@lankhorst.se
37 lines
606 B
C
37 lines
606 B
C
/* SPDX-License-Identifier: MIT */
|
|
/*
|
|
* Copyright © 2023 Intel Corporation
|
|
*/
|
|
|
|
#ifndef I915_VMA_H
|
|
#define I915_VMA_H
|
|
|
|
#include <uapi/drm/i915_drm.h>
|
|
|
|
#include "xe_ggtt.h"
|
|
|
|
#include <linux/refcount.h>
|
|
|
|
/* We don't want these from i915_drm.h in case of Xe */
|
|
#undef I915_TILING_X
|
|
#undef I915_TILING_Y
|
|
#define I915_TILING_X 0
|
|
#define I915_TILING_Y 0
|
|
|
|
struct xe_bo;
|
|
|
|
struct i915_vma {
|
|
refcount_t ref;
|
|
struct xe_bo *bo, *dpt;
|
|
struct xe_ggtt_node *node;
|
|
};
|
|
|
|
#define i915_vma_fence_id(vma) -1
|
|
|
|
static inline u32 i915_ggtt_offset(const struct i915_vma *vma)
|
|
{
|
|
return xe_ggtt_node_addr(vma->node);
|
|
}
|
|
|
|
#endif
|