Files
linux/drivers/gpu/drm/xe/compat-i915-headers/i915_vma.h
Maarten Lankhorst a7ae083691 drm/xe/display: Avoid dereferencing xe_ggtt_node
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
2026-01-12 16:28:34 +01:00

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