Skip to content

Commit 6266f4a

Browse files
vsyrjalarodrigovivi
authored andcommitted
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> (cherry picked from commit fb64f55) Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
1 parent 80e54e8 commit 6266f4a

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

drivers/gpu/drm/i915/display/intel_display.c

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7830,9 +7830,6 @@ static void intel_atomic_commit_tail(struct intel_atomic_state *state)
78307830

78317831
intel_program_dpkgc_latency(state);
78327832

7833-
if (state->modeset)
7834-
intel_set_cdclk_post_plane_update(state);
7835-
78367833
intel_wait_for_vblank_workers(state);
78377834

78387835
/* FIXME: We should call drm_atomic_helper_commit_hw_done() here
@@ -7906,6 +7903,8 @@ static void intel_atomic_commit_tail(struct intel_atomic_state *state)
79067903
intel_verify_planes(state);
79077904

79087905
intel_sagv_post_plane_update(state);
7906+
if (state->modeset)
7907+
intel_set_cdclk_post_plane_update(state);
79097908
intel_pmdemand_post_plane_update(state);
79107909

79117910
drm_atomic_helper_commit_hw_done(&state->base);

0 commit comments

Comments
 (0)