drm/i915/cdclk: Do cdclk post plane programming later
authorVille Syrjälä <ville.syrjala@linux.intel.com>
Tue, 18 Feb 2025 21:18:55 +0000 (23:18 +0200)
committerVille Syrjälä <ville.syrjala@linux.intel.com>
Thu, 6 Mar 2025 13:30:51 +0000 (15:30 +0200)
commitfb64f5568c0e0b5730733d70a012ae26b1a55815
treec6a036796911267aa5932360edfcca7a36c4c6bb
parent41ff0b424d81b7936bc4d96e8957aa7f454c3527
drm/i915/cdclk: Do cdclk post plane programming later

We currently call intel_set_cdclk_post_plane_update() far
too early. When pipes are active during the reprogramming
the current spot only works for the cd2x divider update
case, as that is synchronize to the pipe's vblank. Squashing
and crawling are not synchronized in any way, so doing the
programming while the pipes/planes are potentially still using
the old hardware state could lead to underruns.

Move the post plane reprgramming to a spot where we know
that the pipes/planes have switched over the new hardware
state.

Cc: stable@vger.kernel.org
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20250218211913.27867-2-ville.syrjala@linux.intel.com
Reviewed-by: Vinod Govindapillai <vinod.govindapillai@intel.com>
drivers/gpu/drm/i915/display/intel_display.c