In panel fitter/pipe scaler scenario the pch_pfit configuration currently takes place before accounting for pipe_src width for joiner. This causes issue when pch_pfit and joiner get enabled together. Call panel_fitting from pipe_config once pipe src is computed. v4: Remove need_joiner flag [Ville] Signed-off-by: Nemesa Garg <nemesa.garg@xxxxxxxxx> --- drivers/gpu/drm/i915/display/intel_display.c | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/drivers/gpu/drm/i915/display/intel_display.c b/drivers/gpu/drm/i915/display/intel_display.c index b4ef4d59da1a..0148939caaaa 100644 --- a/drivers/gpu/drm/i915/display/intel_display.c +++ b/drivers/gpu/drm/i915/display/intel_display.c @@ -4653,6 +4653,8 @@ intel_modeset_pipe_config(struct intel_atomic_state *state, intel_atomic_get_new_crtc_state(state, crtc); struct drm_connector *connector; struct drm_connector_state *connector_state; + const struct drm_display_mode *fixed_mode; + struct intel_dp *intel_dp; int pipe_src_w, pipe_src_h; int base_bpp, ret, i; @@ -4774,6 +4776,24 @@ intel_modeset_pipe_config(struct intel_atomic_state *state, return ret; } + for_each_new_connector_in_state(&state->base, connector, + connector_state, i) { + struct intel_encoder *encoder = + to_intel_encoder(connector_state->best_encoder); + + if (connector_state->crtc != &crtc->base) + continue; + + intel_dp = enc_to_intel_dp(encoder); + + if (!intel_dp) + continue; + + if ((intel_dp_is_edp(intel_dp) && fixed_mode) || + crtc_state->output_format == INTEL_OUTPUT_FORMAT_YCBCR420) + return intel_pch_panel_fitting(crtc_state, connector_state); + } + /* Dithering seems to not pass-through bits correctly when it should, so * only enable it on 6bpc panels and when its not a compliance * test requesting 6bpc video pattern. -- 2.25.1