]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
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)
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

index f7cb38145e9d75e5ad6f777b49c6184539a48fde..51c011de4a1668fc1ca7cb095433daa097b65c63 100644 (file)
@@ -7354,9 +7354,6 @@ static void intel_atomic_commit_tail(struct intel_atomic_state *state)
 
        intel_program_dpkgc_latency(state);
 
-       if (state->modeset)
-               intel_set_cdclk_post_plane_update(state);
-
        intel_wait_for_vblank_workers(state);
 
        /* FIXME: We should call drm_atomic_helper_commit_hw_done() here
@@ -7433,6 +7430,8 @@ static void intel_atomic_commit_tail(struct intel_atomic_state *state)
                intel_verify_planes(state);
 
        intel_sagv_post_plane_update(state);
+       if (state->modeset)
+               intel_set_cdclk_post_plane_update(state);
        intel_pmdemand_post_plane_update(state);
 
        drm_atomic_helper_commit_hw_done(&state->base);