The intel_dp pointer can be deducted from the connector pointer, so it's
enough to pass only connector to
intel_dp_compute_config_link_bpp_limits(), do so.

Reviewed-by: Vinod Govindapillai <[email protected]>
Signed-off-by: Imre Deak <[email protected]>
---
 drivers/gpu/drm/i915/display/intel_dp.c | 9 ++++-----
 1 file changed, 4 insertions(+), 5 deletions(-)

diff --git a/drivers/gpu/drm/i915/display/intel_dp.c 
b/drivers/gpu/drm/i915/display/intel_dp.c
index daab43187eb0f..bbb7cff908183 100644
--- a/drivers/gpu/drm/i915/display/intel_dp.c
+++ b/drivers/gpu/drm/i915/display/intel_dp.c
@@ -2654,13 +2654,13 @@ dsc_throughput_quirk_max_bpp_x16(const struct 
intel_connector *connector,
  * range, crtc_state and dsc mode. Return true on success.
  */
 static bool
-intel_dp_compute_config_link_bpp_limits(struct intel_dp *intel_dp,
-                                       const struct intel_connector *connector,
+intel_dp_compute_config_link_bpp_limits(struct intel_connector *connector,
                                        const struct intel_crtc_state 
*crtc_state,
                                        bool dsc,
                                        struct link_config_limits *limits)
 {
-       struct intel_display *display = to_intel_display(intel_dp);
+       struct intel_display *display = to_intel_display(connector);
+       struct intel_dp *intel_dp = intel_attached_dp(connector);
        const struct drm_display_mode *adjusted_mode =
                &crtc_state->hw.adjusted_mode;
        const struct intel_crtc *crtc = to_intel_crtc(crtc_state->uapi.crtc);
@@ -2832,8 +2832,7 @@ intel_dp_compute_config_limits(struct intel_dp *intel_dp,
 
        intel_dp_test_compute_config(intel_dp, crtc_state, limits);
 
-       return intel_dp_compute_config_link_bpp_limits(intel_dp,
-                                                      connector,
+       return intel_dp_compute_config_link_bpp_limits(connector,
                                                       crtc_state,
                                                       dsc,
                                                       limits);
-- 
2.49.1

Reply via email to