From: Jani Nikula Date: Fri, 27 Feb 2026 17:17:13 +0000 (+0200) Subject: drm/xe/compat: remove i915_vma.h from compat X-Git-Tag: v7.1-rc1~167^2~24^2~75 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=cb0f3a171f197325f0831d7d9b0c5388dae0608f;p=thirdparty%2Flinux.git drm/xe/compat: remove i915_vma.h from compat 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 Link: https://patch.msgid.link/ecd5d75981b4b21c3da3b1831faceccfe385d898.1772212579.git.jani.nikula@intel.com Signed-off-by: Jani Nikula --- diff --git a/drivers/gpu/drm/xe/compat-i915-headers/i915_vma.h b/drivers/gpu/drm/xe/compat-i915-headers/i915_vma.h deleted file mode 100644 index da1d97b48fee0..0000000000000 --- a/drivers/gpu/drm/xe/compat-i915-headers/i915_vma.h +++ /dev/null @@ -1,34 +0,0 @@ -/* SPDX-License-Identifier: MIT */ -/* - * Copyright © 2023 Intel Corporation - */ - -#ifndef I915_VMA_H -#define I915_VMA_H - -#include - -#include "xe_ggtt.h" - -#include - -/* 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 diff --git a/drivers/gpu/drm/xe/display/xe_display_vma.h b/drivers/gpu/drm/xe/display/xe_display_vma.h new file mode 100644 index 0000000000000..28267be61ae02 --- /dev/null +++ b/drivers/gpu/drm/xe/display/xe_display_vma.h @@ -0,0 +1,18 @@ +/* SPDX-License-Identifier: MIT */ +/* Copyright © 2026 Intel Corporation */ + +#ifndef _XE_DISPLAY_VMA_H_ +#define _XE_DISPLAY_VMA_H_ + +#include + +struct xe_bo; +struct xe_ggtt_node; + +struct i915_vma { + refcount_t ref; + struct xe_bo *bo, *dpt; + struct xe_ggtt_node *node; +}; + +#endif diff --git a/drivers/gpu/drm/xe/display/xe_fb_pin.c b/drivers/gpu/drm/xe/display/xe_fb_pin.c index 4cb37717d3b4d..bbe6a1d2aad35 100644 --- a/drivers/gpu/drm/xe/display/xe_fb_pin.c +++ b/drivers/gpu/drm/xe/display/xe_fb_pin.c @@ -5,7 +5,6 @@ #include -#include "i915_vma.h" #include "intel_display_core.h" #include "intel_display_types.h" #include "intel_fb.h" @@ -13,6 +12,7 @@ #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" @@ -409,7 +409,7 @@ found: 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; @@ -439,7 +439,7 @@ int intel_plane_pin_fb(struct intel_plane_state *new_plane_state, 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; diff --git a/drivers/gpu/drm/xe/display/xe_initial_plane.c b/drivers/gpu/drm/xe/display/xe_initial_plane.c index c46e9d8115bd8..4be0cfb6d0c11 100644 --- a/drivers/gpu/drm/xe/display/xe_initial_plane.c +++ b/drivers/gpu/drm/xe/display/xe_initial_plane.c @@ -12,7 +12,6 @@ #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" @@ -20,6 +19,7 @@ #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" @@ -165,7 +165,7 @@ xe_initial_plane_setup(struct drm_plane_state *_plane_state, 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;