Move compat i915_vma.h to xe_display_vma.h, and remove all extra
cruft. Drop the i915_ggtt_offset() wrapper in favour of using
xe_ggtt_node_addr() directly.
The usefulness of the I915_TILING_X and I915_TILING_Y undef/define is
unclear, since uapi/drm/i915_drm.h is included in other paths as well.
The naming of struct i915_vma is a bit unfortunate in xe, but (at least
for now) a necessity for maintaining type safety on the opaque type.
Reviewed-by: Michał Grzelak <michal.grzelak@intel.com>
Link: https://patch.msgid.link/ecd5d75981b4b21c3da3b1831faceccfe385d898.1772212579.git.jani.nikula@intel.com
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
+++ /dev/null
-/* 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;
-};
-
-static inline u32 i915_ggtt_offset(const struct i915_vma *vma)
-{
- return xe_ggtt_node_addr(vma->node);
-}
-
-#endif
--- /dev/null
+/* SPDX-License-Identifier: MIT */
+/* Copyright © 2026 Intel Corporation */
+
+#ifndef _XE_DISPLAY_VMA_H_
+#define _XE_DISPLAY_VMA_H_
+
+#include <linux/refcount.h>
+
+struct xe_bo;
+struct xe_ggtt_node;
+
+struct i915_vma {
+ refcount_t ref;
+ struct xe_bo *bo, *dpt;
+ struct xe_ggtt_node *node;
+};
+
+#endif
#include <drm/ttm/ttm_bo.h>
-#include "i915_vma.h"
#include "intel_display_core.h"
#include "intel_display_types.h"
#include "intel_fb.h"
#include "intel_fbdev.h"
#include "xe_bo.h"
#include "xe_device.h"
+#include "xe_display_vma.h"
#include "xe_ggtt.h"
#include "xe_pm.h"
#include "xe_vram_types.h"
refcount_inc(&vma->ref);
new_plane_state->ggtt_vma = vma;
- new_plane_state->surf = i915_ggtt_offset(new_plane_state->ggtt_vma) +
+ new_plane_state->surf = xe_ggtt_node_addr(new_plane_state->ggtt_vma->node) +
plane->surf_offset(new_plane_state);
return true;
new_plane_state->ggtt_vma = vma;
- new_plane_state->surf = i915_ggtt_offset(new_plane_state->ggtt_vma) +
+ new_plane_state->surf = xe_ggtt_node_addr(new_plane_state->ggtt_vma->node) +
plane->surf_offset(new_plane_state);
return 0;
#include "xe_ggtt.h"
#include "xe_mmio.h"
-#include "i915_vma.h"
#include "intel_crtc.h"
#include "intel_display_regs.h"
#include "intel_display_types.h"
#include "intel_fbdev_fb.h"
#include "intel_fb_pin.h"
#include "xe_bo.h"
+#include "xe_display_vma.h"
#include "xe_vram_types.h"
#include "xe_wa.h"
plane_state->ggtt_vma = vma;
- plane_state->surf = i915_ggtt_offset(plane_state->ggtt_vma);
+ plane_state->surf = xe_ggtt_node_addr(plane_state->ggtt_vma->node);
plane_config->vma = vma;