]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
drm/i915/dp: Drop compute_pipe_bpp parameter from intel_dp_dsc_compute_config()
authorJani Nikula <jani.nikula@intel.com>
Fri, 31 Jan 2025 12:50:05 +0000 (14:50 +0200)
committerJani Nikula <jani.nikula@intel.com>
Mon, 3 Feb 2025 14:31:45 +0000 (16:31 +0200)
The parameter is basically just a proxy for whether the function is
being called for DP SST or DP MST. We can figure this out from crtc
state.

Reviewed-by: Imre Deak <imre.deak@intel.com>
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/82a4b84711b1416bb3382f5d8383fe65ab88159a.1738327620.git.jani.nikula@intel.com
drivers/gpu/drm/i915/display/intel_dp.c
drivers/gpu/drm/i915/display/intel_dp.h
drivers/gpu/drm/i915/display/intel_dp_mst.c

index 27f066ad4073767b118cc642bd76dae1dd2ee19c..adfd1b6d148d113ee8d95a5499a11eefd7a58044 100644 (file)
@@ -2307,8 +2307,7 @@ int intel_dp_dsc_compute_config(struct intel_dp *intel_dp,
                                struct intel_crtc_state *pipe_config,
                                struct drm_connector_state *conn_state,
                                const struct link_config_limits *limits,
-                               int timeslots,
-                               bool compute_pipe_bpp)
+                               int timeslots)
 {
        struct intel_display *display = to_intel_display(intel_dp);
        const struct intel_connector *connector =
@@ -2316,6 +2315,7 @@ int intel_dp_dsc_compute_config(struct intel_dp *intel_dp,
        const struct drm_display_mode *adjusted_mode =
                &pipe_config->hw.adjusted_mode;
        int num_joined_pipes = intel_crtc_num_joined_pipes(pipe_config);
+       bool is_mst = intel_crtc_has_type(pipe_config, INTEL_OUTPUT_DP_MST);
        int ret;
 
        intel_dp_fec_compute_config(intel_dp, pipe_config);
@@ -2324,12 +2324,10 @@ int intel_dp_dsc_compute_config(struct intel_dp *intel_dp,
                return -EINVAL;
 
        /*
-        * compute pipe bpp is set to false for DP MST DSC case
-        * and compressed_bpp is calculated same time once
-        * vpci timeslots are allocated, because overall bpp
-        * calculation procedure is bit different for MST case.
+        * Link parameters, pipe bpp and compressed bpp have already been
+        * figured out for DP MST DSC.
         */
-       if (compute_pipe_bpp) {
+       if (!is_mst) {
                if (intel_dp_is_edp(intel_dp))
                        ret = intel_edp_dsc_compute_pipe_bpp(intel_dp, pipe_config,
                                                             conn_state, limits);
@@ -2640,7 +2638,7 @@ intel_dp_compute_link_config(struct intel_encoder *encoder,
                        return -EINVAL;
 
                ret = intel_dp_dsc_compute_config(intel_dp, pipe_config,
-                                                 conn_state, &limits, 64, true);
+                                                 conn_state, &limits, 64);
                if (ret < 0)
                        return ret;
        }
index ffc27f8ad2269ff2c41bd90754c38d10bcb0fc19..9189db4c25946a0f082223ce059c242e80cc32dc 100644 (file)
@@ -76,8 +76,7 @@ int intel_dp_dsc_compute_config(struct intel_dp *intel_dp,
                                struct intel_crtc_state *pipe_config,
                                struct drm_connector_state *conn_state,
                                const struct link_config_limits *limits,
-                               int timeslots,
-                               bool recompute_pipe_bpp);
+                               int timeslots);
 void intel_dp_audio_compute_config(struct intel_encoder *encoder,
                                   struct intel_crtc_state *pipe_config,
                                   struct drm_connector_state *conn_state);
index ed7640728b2265eb88b25b7f335d40f6438b915d..04b840070fdb9f38b4d9f69421fbb1a672848289 100644 (file)
@@ -657,7 +657,7 @@ static int mst_stream_compute_config(struct intel_encoder *encoder,
 
                ret = intel_dp_dsc_compute_config(intel_dp, pipe_config,
                                                  conn_state, &limits,
-                                                 pipe_config->dp_m_n.tu, false);
+                                                 pipe_config->dp_m_n.tu);
        }
 
        if (ret)