drm/i915: Pass drm_format_info into plane->max_stride()
authorVille Syrjälä <ville.syrjala@linux.intel.com>
Fri, 7 Nov 2025 18:11:19 +0000 (20:11 +0200)
committerVille Syrjälä <ville.syrjala@linux.intel.com>
Wed, 12 Nov 2025 20:57:56 +0000 (22:57 +0200)
commit95357b68b693b6c659e2a3607d3afc5b7a8d4903
treef5814eca8b579156b82eb98c1ed2bbe7a0f7cda5
parent854efdc7efb59b0c90fb61b1d287eccb6718e861
drm/i915: Pass drm_format_info into plane->max_stride()

Pass the format info into plane->max_stride() from the
caller instead of doing yet another drm_format_info()
lookup on the spot.

drm_format_info() is both rather expensive, and technically
incorrect since it doesn't return the correct format info
for compressed formats (though that doesn't actually matter
for the current .max_stride() implementations since they
are just interested in the cpp value).

Most callers already have the format info available. The
only exception is intel_dumb_fb_max_stride() where we shall
use the actually correct drm_get_format_info() variant.

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patch.msgid.link/20251107181126.5743-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/i9xx_plane.h
drivers/gpu/drm/i915/display/intel_cursor.c
drivers/gpu/drm/i915/display/intel_display.c
drivers/gpu/drm/i915/display/intel_display.h
drivers/gpu/drm/i915/display/intel_display_types.h
drivers/gpu/drm/i915/display/intel_fb.c
drivers/gpu/drm/i915/display/intel_sprite.c
drivers/gpu/drm/i915/display/skl_universal_plane.c