]> www.infradead.org Git - users/jedix/linux-maple.git/commit
drm/i915: Calculate the VT-d guard size in the display code
authorVille Syrjälä <ville.syrjala@linux.intel.com>
Wed, 22 Jan 2025 15:17:53 +0000 (17:17 +0200)
committerVille Syrjälä <ville.syrjala@linux.intel.com>
Thu, 6 Feb 2025 13:35:44 +0000 (15:35 +0200)
commit44a34dec43e8f214913e16204525d7253acc1891
treed553fdde60a33693b209c49651168802d2d399f9
parent2ffa4878512d429eecffe4ef786cbf102a8b8165
drm/i915: Calculate the VT-d guard size in the display code

Currently i915_gem_object_pin_to_display_plane() uses
i915_gem_object_get_tile_row_size() to calculate the tile row
size for the VT-d guard w/a. That's not really proper since
i915_gem_object_get_tile_row_size() only works for fenced BOs,
nor does it take rotation into account.

Remedy the situation by calculating the VT-d guard size in the
display code where we have more information readily available.
Although the default guard size (168 PTEs now) should cover
the more typical fb size use cases anyway, and only very large
Y/Yf-tiled framebuffers might have tile row size that exceeds it.

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20250122151755.6928-4-ville.syrjala@linux.intel.com
Reviewed-by: Jani Nikula <jani.nikula@intel.com>
drivers/gpu/drm/i915/display/intel_fb.c
drivers/gpu/drm/i915/display/intel_fb.h
drivers/gpu/drm/i915/display/intel_fb_pin.c
drivers/gpu/drm/i915/display/intel_fb_pin.h
drivers/gpu/drm/i915/display/intel_fbdev.c
drivers/gpu/drm/i915/display/intel_overlay.c
drivers/gpu/drm/i915/gem/i915_gem_domain.c
drivers/gpu/drm/i915/gem/i915_gem_object.h
drivers/gpu/drm/xe/display/xe_fb_pin.c
drivers/gpu/drm/xe/display/xe_plane_initial.c