]> www.infradead.org Git - users/willy/xarray.git/commitdiff
drm/i915: Use i915_vma_offset() in intel_dpt_offset()
authorVille Syrjälä <ville.syrjala@linux.intel.com>
Thu, 17 Jul 2025 17:13:50 +0000 (20:13 +0300)
committerVille Syrjälä <ville.syrjala@linux.intel.com>
Sat, 19 Jul 2025 17:55:25 +0000 (20:55 +0300)
Replace the open coded vma mm node stuff in intel_dpt_offset()
with i915_vma_offset(). This will also include the VT-d guard
in the result. Granted that should always be 0 for DPT, but
it seems prudent to include that in our DPT vma offset check
anyway.

Reviewed-by: Jani Nikula <jani.nikula@intel.com>
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20250717171353.23090-5-ville.syrjala@linux.intel.com
drivers/gpu/drm/i915/display/intel_dpt.c
drivers/gpu/drm/i915/display/intel_fb_pin.c

index aea249e2699f3fde2fb779569335672c47802167..4743d8b0bf40b17f95dd2ac5a1419a11debf7725 100644 (file)
@@ -322,5 +322,5 @@ void intel_dpt_destroy(struct i915_address_space *vm)
 
 u64 intel_dpt_offset(struct i915_vma *dpt_vma)
 {
-       return dpt_vma->node.start;
+       return i915_vma_offset(dpt_vma);
 }
index b0557976836d979f37718804557306fccad10cfe..d598a005f8471694105f25e24a2f8326d6aaeb36 100644 (file)
@@ -302,8 +302,8 @@ int intel_plane_pin_fb(struct intel_plane_state *plane_state,
                WARN_ON(plane_state->ggtt_vma == plane_state->dpt_vma);
 
                /*
-                * The DPT object contains only one vma, so
-                * the VMA's offset within the DPT is always 0.
+                * The DPT object contains only one vma, and there is no VT-d
+                * guard, so the VMA's offset within the DPT is always 0.
                 */
                drm_WARN_ON(display->drm, intel_dpt_offset(plane_state->dpt_vma));
        }