crtc->pipe == joiner_primary_pipe(crtc_state);
 }
 
-static int intel_crtc_num_joined_pipes(const struct intel_crtc_state *crtc_state)
+int intel_crtc_num_joined_pipes(const struct intel_crtc_state *crtc_state)
 {
        return hweight8(intel_crtc_joined_pipe_mask(crtc_state));
 }
 
 })
 
 bool intel_scanout_needs_vtd_wa(struct drm_i915_private *i915);
+int intel_crtc_num_joined_pipes(const struct intel_crtc_state *crtc_state);
 
 #endif
 
        u8 dsc_slice_count = 0;
        enum drm_mode_status status;
        bool dsc = false, joiner = false;
+       int num_joined_pipes;
 
        status = intel_cpu_transcoder_mode_valid(dev_priv, mode);
        if (status != MODE_OK)
                joiner = true;
                max_dotclk *= 2;
        }
+
+       num_joined_pipes = joiner ? 2 : 1;
+
        if (target_clock > max_dotclk)
                return MODE_CLOCK_HIGH;
 
                dsc = dsc_max_compressed_bpp && dsc_slice_count;
        }
 
-       if (intel_dp_joiner_needs_dsc(dev_priv, joiner) && !dsc)
+       if (intel_dp_joiner_needs_dsc(dev_priv, num_joined_pipes) && !dsc)
                return MODE_CLOCK_HIGH;
 
        if (mode_rate > max_rate && !dsc)
        return intel_dp_link_required(adjusted_mode->crtc_clock, bpp);
 }
 
-bool intel_dp_joiner_needs_dsc(struct drm_i915_private *i915, bool use_joiner)
+bool intel_dp_joiner_needs_dsc(struct drm_i915_private *i915,
+                              int num_joined_pipes)
 {
        /*
         * Pipe joiner needs compression up to display 12 due to bandwidth
         * limitation. DG2 onwards pipe joiner can be enabled without
         * compression.
         */
-       return !HAS_UNCOMPRESSED_JOINER(i915) && use_joiner;
+       return !HAS_UNCOMPRESSED_JOINER(i915) && num_joined_pipes == 2;
 }
 
 static int
        struct intel_dp *intel_dp = enc_to_intel_dp(encoder);
        struct link_config_limits limits;
        bool dsc_needed, joiner_needs_dsc;
+       int num_joined_pipes;
        int ret = 0;
 
        if (pipe_config->fec_enable &&
                                 adjusted_mode->crtc_clock))
                pipe_config->joiner_pipes = GENMASK(crtc->pipe + 1, crtc->pipe);
 
-       joiner_needs_dsc = intel_dp_joiner_needs_dsc(i915, pipe_config->joiner_pipes);
+       num_joined_pipes = intel_crtc_num_joined_pipes(pipe_config);
+
+       joiner_needs_dsc = intel_dp_joiner_needs_dsc(i915, num_joined_pipes);
 
        dsc_needed = joiner_needs_dsc || intel_dp->force_dsc_en ||
                     !intel_dp_compute_config_limits(intel_dp, pipe_config,
 
                                 int bw_overhead);
 int intel_dp_max_link_data_rate(struct intel_dp *intel_dp,
                                int max_dprx_rate, int max_dprx_lanes);
-bool intel_dp_joiner_needs_dsc(struct drm_i915_private *i915, bool use_joiner);
+bool intel_dp_joiner_needs_dsc(struct drm_i915_private *i915,
+                              int num_joined_pipes);
 bool intel_dp_has_joiner(struct intel_dp *intel_dp);
 bool intel_dp_needs_vsc_sdp(const struct intel_crtc_state *crtc_state,
                            const struct drm_connector_state *conn_state);
 
                &pipe_config->hw.adjusted_mode;
        struct link_config_limits limits;
        bool dsc_needed, joiner_needs_dsc;
+       int num_joined_pipes;
        int ret = 0;
 
        if (pipe_config->fec_enable &&
                                 adjusted_mode->crtc_clock))
                pipe_config->joiner_pipes = GENMASK(crtc->pipe + 1, crtc->pipe);
 
+       num_joined_pipes = intel_crtc_num_joined_pipes(pipe_config);
+
        pipe_config->sink_format = INTEL_OUTPUT_FORMAT_RGB;
        pipe_config->output_format = INTEL_OUTPUT_FORMAT_RGB;
        pipe_config->has_pch_encoder = false;
 
-       joiner_needs_dsc = intel_dp_joiner_needs_dsc(dev_priv, pipe_config->joiner_pipes);
+       joiner_needs_dsc = intel_dp_joiner_needs_dsc(dev_priv, num_joined_pipes);
 
        dsc_needed = joiner_needs_dsc || intel_dp->force_dsc_en ||
                     !intel_dp_mst_compute_config_limits(intel_dp,
        u16 dsc_max_compressed_bpp = 0;
        u8 dsc_slice_count = 0;
        int target_clock = mode->clock;
+       int num_joined_pipes;
 
        if (drm_connector_is_unregistered(connector)) {
                *status = MODE_ERROR;
                max_dotclk *= 2;
        }
 
+       num_joined_pipes = joiner ? 2 : 1;
+
        ret = drm_modeset_lock(&mgr->base.lock, ctx);
        if (ret)
                return ret;
                dsc = dsc_max_compressed_bpp && dsc_slice_count;
        }
 
-       if (intel_dp_joiner_needs_dsc(dev_priv, joiner) && !dsc) {
+       if (intel_dp_joiner_needs_dsc(dev_priv, num_joined_pipes) && !dsc) {
                *status = MODE_CLOCK_HIGH;
                return 0;
        }