drm/i915/fdi: Recompute state for affected CRTCs on FDI links
authorImre Deak <imre.deak@intel.com>
Thu, 21 Sep 2023 19:51:59 +0000 (22:51 +0300)
committerImre Deak <imre.deak@intel.com>
Thu, 28 Sep 2023 09:52:28 +0000 (12:52 +0300)
commitf67ff36f2117ff789876abb2e48f42e086475095
tree3dd0aadc0a5429a0de94bcfe68dd5679fe6bcb30
parent998d2cd361caeb59d7d9574617f1f5d25ae73788
drm/i915/fdi: Recompute state for affected CRTCs on FDI links

Recompute the state of all CRTCs on an FDI link during a modeset that
may be affected by the modeset of other CRTCs on the same link. This
ensures that each CRTC on the link maximizes its BW use (after another
CRTC is disabled).

In practice this means recomputing pipe B's config on IVB if pipe C gets
disabled.

v2:
- Add the change recomputing affected CRTC states in a separate patch.
  (Ville)
v3: (Ville)
- Constify old and new crtc states.
- Check for fused off pipe C.
- Fix new vs. old crtc state mixup.
- Drop check for pipe C's enabled state.

Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Signed-off-by: Imre Deak <imre.deak@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20230921195159.2646027-12-imre.deak@intel.com
drivers/gpu/drm/i915/display/intel_display.c
drivers/gpu/drm/i915/display/intel_fdi.c
drivers/gpu/drm/i915/display/intel_fdi.h