From: Animesh Manna <[email protected]>

Let intel_set_transcoder_timings() take the target transcoder as an
explicit argument instead of always using crtc_state->cpu_transcoder.
This makes the helper reusable for callers that need to program timings
for a transcoder other than the CRTC's CPU transcoder.

Update all existing callers to pass crtc_state->cpu_transcoder so there
is no functional change.

Reviewed-by: Uma Shankar <[email protected]>
Signed-off-by: Animesh Manna <[email protected]>
---
 drivers/gpu/drm/i915/display/intel_display.c | 13 +++++++------
 1 file changed, 7 insertions(+), 6 deletions(-)

diff --git a/drivers/gpu/drm/i915/display/intel_display.c 
b/drivers/gpu/drm/i915/display/intel_display.c
index e2e4b00a8fa9..dceb70cf5397 100644
--- a/drivers/gpu/drm/i915/display/intel_display.c
+++ b/drivers/gpu/drm/i915/display/intel_display.c
@@ -132,7 +132,8 @@
 #include "vlv_dsi_pll.h"
 #include "vlv_dsi_regs.h"
 
-static void intel_set_transcoder_timings(const struct intel_crtc_state 
*crtc_state);
+static void intel_set_transcoder_timings(const struct intel_crtc_state 
*crtc_state,
+                                        enum transcoder cpu_transcoder);
 static void intel_set_pipe_src_size(const struct intel_crtc_state *crtc_state);
 static void hsw_set_transconf(const struct intel_crtc_state *crtc_state);
 static void bdw_set_pipe_misc(struct intel_dsb *dsb,
@@ -1504,7 +1505,7 @@ static void ilk_configure_cpu_transcoder(const struct 
intel_crtc_state *crtc_sta
                                               &crtc_state->dp_m2_n2);
        }
 
-       intel_set_transcoder_timings(crtc_state);
+       intel_set_transcoder_timings(crtc_state, crtc_state->cpu_transcoder);
 
        ilk_set_pipeconf(crtc_state);
 }
@@ -1635,7 +1636,7 @@ static void hsw_configure_cpu_transcoder(const struct 
intel_crtc_state *crtc_sta
                                               &crtc_state->dp_m2_n2);
        }
 
-       intel_set_transcoder_timings(crtc_state);
+       intel_set_transcoder_timings(crtc_state, crtc_state->cpu_transcoder);
 
        if (cpu_transcoder != TRANSCODER_EDP)
                intel_de_write(display, TRANS_MULT(display, cpu_transcoder),
@@ -2048,7 +2049,7 @@ static void i9xx_configure_cpu_transcoder(const struct 
intel_crtc_state *crtc_st
                                               &crtc_state->dp_m2_n2);
        }
 
-       intel_set_transcoder_timings(crtc_state);
+       intel_set_transcoder_timings(crtc_state, crtc_state->cpu_transcoder);
 
        i9xx_set_pipeconf(crtc_state);
 }
@@ -2664,12 +2665,12 @@ transcoder_has_vrr(const struct intel_crtc_state 
*crtc_state)
        return HAS_VRR(display) && !transcoder_is_dsi(cpu_transcoder);
 }
 
-static void intel_set_transcoder_timings(const struct intel_crtc_state 
*crtc_state)
+static void intel_set_transcoder_timings(const struct intel_crtc_state 
*crtc_state,
+                                        enum transcoder cpu_transcoder)
 {
        struct intel_display *display = to_intel_display(crtc_state);
        struct intel_crtc *crtc = to_intel_crtc(crtc_state->uapi.crtc);
        enum pipe pipe = crtc->pipe;
-       enum transcoder cpu_transcoder = crtc_state->cpu_transcoder;
        const struct drm_display_mode *adjusted_mode = 
&crtc_state->hw.adjusted_mode;
        u32 crtc_vdisplay, crtc_vtotal, crtc_vblank_start, crtc_vblank_end;
        int vsyncshift = 0;
-- 
2.43.0

Reply via email to