]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
drm/i915: Use more optimal VTd alignment for planes
authorVille Syrjälä <ville.syrjala@linux.intel.com>
Wed, 22 Jan 2025 15:17:52 +0000 (17:17 +0200)
committerVille Syrjälä <ville.syrjala@linux.intel.com>
Thu, 6 Feb 2025 13:11:55 +0000 (15:11 +0200)
Depending on the platform and/or plane type we can get away
with a bit less alignment in the VT-d w/a. Reduce the numbers
accordingly.

Note that it's not actually clear in VLV/CHV need this w/a,
and if they do we don't actually know what kind of alignment
is sufficient. Leave the 256k alignment in place for now, but
toss in a FIXME.

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

index 19cc34babef3517eb888956944eddf6edfd58377..65a2eb9e92c40039a0ee8758de9a8aec3e3cc9d3 100644 (file)
@@ -785,6 +785,7 @@ unsigned int vlv_plane_min_alignment(struct intel_plane *plane,
        if (intel_plane_can_async_flip(plane, fb->modifier))
                return 256 * 1024;
 
+       /* FIXME undocumented so not sure what's actually needed */
        if (intel_scanout_needs_vtd_wa(i915))
                return 256 * 1024;
 
index ed8e6536453907430f82d90763863be5611d1588..cbeea9d965174edf9129883d22b6a0a8ddfdc48f 100644 (file)
@@ -375,7 +375,7 @@ static unsigned int i9xx_cursor_min_alignment(struct intel_plane *plane,
        struct drm_i915_private *i915 = to_i915(plane->base.dev);
 
        if (intel_scanout_needs_vtd_wa(i915))
-               return 256 * 1024;
+               return 64 * 1024;
 
        return 4 * 1024; /* physical for i915/i945 */
 }
index d63e71fe469ed8626c2392b79f0088b20e365378..af121c720b89dec67343502e7ce710ff0cca39c2 100644 (file)
@@ -983,7 +983,7 @@ static unsigned int g4x_sprite_min_alignment(struct intel_plane *plane,
        struct drm_i915_private *i915 = to_i915(plane->base.dev);
 
        if (intel_scanout_needs_vtd_wa(i915))
-               return 256 * 1024;
+               return 128 * 1024;
 
        return 4 * 1024;
 }