drm/i915: Use plane->can_async_flip() for alignment exceptions
authorVille Syrjälä <ville.syrjala@linux.intel.com>
Wed, 9 Oct 2024 18:22:02 +0000 (21:22 +0300)
committerVille Syrjälä <ville.syrjala@linux.intel.com>
Mon, 20 Jan 2025 19:58:37 +0000 (21:58 +0200)
commit2f4c92166ed53d46b4ad66b7cffb1350dec8c0b6
tree26fbcc8de195ac36bf349d65e465db9f9451407d
parent7cc1e19703a553eda5f463cbe1fb011877ad16c2
drm/i915: Use plane->can_async_flip() for alignment exceptions

Async flips often require bigger alignment that sync flips.
Currently we have HAS_ASYNC_FLIPS() checks strewn about to
inidcate that async flips are generally supported and thus
we want more alignment. Switch that over to using
intel_plane_can_async_flip() so that we can handle these
in a slightly less messy way. Currently we don't have cases
where async flips would require different alignment for
different modifiers on the same plane.

We'll also move the HAS_ASYNC_FLIPS() check to the plane init
code so that we can still use that as a quick way to disable
the async flips workarounds for testing purposes.

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20241009182207.22900-5-ville.syrjala@linux.intel.com
Reviewed-by: Jouni Högander <jouni.hogander@intel.com>
drivers/gpu/drm/i915/display/i9xx_plane.c
drivers/gpu/drm/i915/display/skl_universal_plane.c