]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commitdiff
drm/i915/vrr: Eliminate redundant function arguments
authorVille Syrjälä <ville.syrjala@linux.intel.com>
Mon, 20 Mar 2023 20:33:48 +0000 (22:33 +0200)
committerVille Syrjälä <ville.syrjala@linux.intel.com>
Wed, 12 Apr 2023 14:29:45 +0000 (17:29 +0300)
Some of the VRR functions take redundant arguments. Get rid
of them to make life simpler.

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20230320203352.19515-3-ville.syrjala@linux.intel.com
Reviewed-by: Mitul Golani <mitulkumar.ajitkumar.golani@intel.com>
drivers/gpu/drm/i915/display/intel_ddi.c
drivers/gpu/drm/i915/display/intel_display.c
drivers/gpu/drm/i915/display/intel_vrr.c
drivers/gpu/drm/i915/display/intel_vrr.h

index dc294717bcdf4962a6536af2c6773a3a5bb073d4..1f453362d079c392f02238871c844cfafca5e867 100644 (file)
@@ -2963,7 +2963,7 @@ static void intel_enable_ddi(struct intel_atomic_state *state,
 
        intel_enable_transcoder(crtc_state);
 
-       intel_vrr_enable(encoder, crtc_state);
+       intel_vrr_enable(crtc_state);
 
        intel_crtc_vblank_on(crtc_state);
 
index d93cb8c63296f0c3708d660e90e508b3a05414b8..d8ef03637830b0c7c617a68a87511fc38d4f3686 100644 (file)
@@ -3909,7 +3909,7 @@ static bool hsw_get_pipe_config(struct intel_crtc *crtc,
                intel_get_transcoder_timings(crtc, pipe_config);
 
        if (HAS_VRR(dev_priv) && !transcoder_is_dsi(pipe_config->cpu_transcoder))
-               intel_vrr_get_config(crtc, pipe_config);
+               intel_vrr_get_config(pipe_config);
 
        intel_get_pipe_src_size(crtc, pipe_config);
 
index 4228f26b4c11dd002e7eebecc9e9107f997abe96..6d749de71058c7d9d2236ea9c19fe90c265dbc73 100644 (file)
@@ -168,10 +168,9 @@ static u32 trans_vrr_ctl(const struct intel_crtc_state *crtc_state)
                        VRR_CTL_PIPELINE_FULL_OVERRIDE;
 }
 
-void intel_vrr_enable(struct intel_encoder *encoder,
-                     const struct intel_crtc_state *crtc_state)
+void intel_vrr_enable(const struct intel_crtc_state *crtc_state)
 {
-       struct drm_i915_private *dev_priv = to_i915(encoder->base.dev);
+       struct drm_i915_private *dev_priv = to_i915(crtc_state->uapi.crtc->dev);
        enum transcoder cpu_transcoder = crtc_state->cpu_transcoder;
 
        if (!crtc_state->vrr.enable)
@@ -230,10 +229,9 @@ void intel_vrr_disable(const struct intel_crtc_state *old_crtc_state)
        intel_de_write(dev_priv, TRANS_VRR_CTL(cpu_transcoder), 0);
 }
 
-void intel_vrr_get_config(struct intel_crtc *crtc,
-                         struct intel_crtc_state *crtc_state)
+void intel_vrr_get_config(struct intel_crtc_state *crtc_state)
 {
-       struct drm_i915_private *dev_priv = to_i915(crtc->base.dev);
+       struct drm_i915_private *dev_priv = to_i915(crtc_state->uapi.crtc->dev);
        enum transcoder cpu_transcoder = crtc_state->cpu_transcoder;
        u32 trans_vrr_ctl;
 
index 9fda1135b0dd53a1cd0cb5a712add6ce6b625e8c..ee636a5367c8b1c8d80fe929d89390b18a7e961d 100644 (file)
 struct drm_connector_state;
 struct intel_atomic_state;
 struct intel_connector;
-struct intel_crtc;
 struct intel_crtc_state;
-struct intel_dp;
-struct intel_encoder;
 
 bool intel_vrr_is_capable(struct intel_connector *connector);
 void intel_vrr_check_modeset(struct intel_atomic_state *state);
 void intel_vrr_compute_config(struct intel_crtc_state *crtc_state,
                              struct drm_connector_state *conn_state);
-void intel_vrr_enable(struct intel_encoder *encoder,
-                     const struct intel_crtc_state *crtc_state);
+void intel_vrr_enable(const struct intel_crtc_state *crtc_state);
 void intel_vrr_send_push(const struct intel_crtc_state *crtc_state);
 bool intel_vrr_is_push_sent(const struct intel_crtc_state *crtc_state);
 void intel_vrr_disable(const struct intel_crtc_state *old_crtc_state);
-void intel_vrr_get_config(struct intel_crtc *crtc,
-                         struct intel_crtc_state *crtc_state);
+void intel_vrr_get_config(struct intel_crtc_state *crtc_state);
 int intel_vrr_vmax_vblank_start(const struct intel_crtc_state *crtc_state);
 int intel_vrr_vmin_vblank_start(const struct intel_crtc_state *crtc_state);