summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/i915/display/intel_sprite.c
diff options
context:
space:
mode:
authorVille Syrjälä <ville.syrjala@linux.intel.com>2024-06-12 23:47:06 +0300
committerVille Syrjälä <ville.syrjala@linux.intel.com>2024-06-24 17:09:50 +0300
commit195b7a0d2ebe5672a58210992f3629d19d5a95ae (patch)
tree7918d3662ad607f29ecebd03fba9e322f5dd19fb /drivers/gpu/drm/i915/display/intel_sprite.c
parent1c5f18d88eae348cf45f90aaee7b361f593b0701 (diff)
downloadlinux-195b7a0d2ebe5672a58210992f3629d19d5a95ae.tar.xz
drm/i915: Introduce the plane->min_alignment() vfunc
Different hardware generations have different scanout alignment requirements. Introduce a new vfunc that will allow us to make that distinction without horrible if-ladders. For now we directly plug in the existing intel_surf_alignment() and intel_cursor_alignment() functions. For fbdev we (temporarily) introduce intel_fbdev_min_alignment() that simply queries the alignment from the primary plane of the first crtc. TODO: someone will need to fix xe's alignment handling Reviewed-by: Imre Deak <imre.deak@intel.com> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20240612204712.31404-4-ville.syrjala@linux.intel.com Acked-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
Diffstat (limited to 'drivers/gpu/drm/i915/display/intel_sprite.c')
-rw-r--r--drivers/gpu/drm/i915/display/intel_sprite.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/gpu/drm/i915/display/intel_sprite.c b/drivers/gpu/drm/i915/display/intel_sprite.c
index e1c907f601da..6f9ae83b095c 100644
--- a/drivers/gpu/drm/i915/display/intel_sprite.c
+++ b/drivers/gpu/drm/i915/display/intel_sprite.c
@@ -1622,6 +1622,8 @@ intel_sprite_plane_create(struct drm_i915_private *dev_priv,
}
}
+ plane->min_alignment = intel_surf_alignment;
+
if (IS_CHERRYVIEW(dev_priv) && pipe == PIPE_B) {
supported_rotations =
DRM_MODE_ROTATE_0 | DRM_MODE_ROTATE_180 |