[PATCH] drm/display: Call panel_fitting function from pipe_config
Nemesa Garg
nemesa.garg at intel.com
Wed Jun 19 11:45:33 UTC 2024
In panel fitter/pipe scaler scenario the pch_pfit configuration
currently takes place before we account for bigjoiner.
So once the calculation for bigjoiner is done, proper values
of width and height can be used for panel fitting.
Signed-off-by: Nemesa Garg <nemesa.garg at intel.com>
---
drivers/gpu/drm/i915/display/intel_display.c | 20 ++++++++++++++++++++
drivers/gpu/drm/i915/display/intel_dp.c | 7 -------
2 files changed, 20 insertions(+), 7 deletions(-)
diff --git a/drivers/gpu/drm/i915/display/intel_display.c b/drivers/gpu/drm/i915/display/intel_display.c
index cce1420fb541..ac8e9e5b9648 100644
--- a/drivers/gpu/drm/i915/display/intel_display.c
+++ b/drivers/gpu/drm/i915/display/intel_display.c
@@ -4627,6 +4627,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 drm_display_mode *adjusted_mode = &crtc_state->hw.adjusted_mode;
int pipe_src_w, pipe_src_h;
int base_bpp, ret, i;
@@ -4759,6 +4761,24 @@ intel_modeset_pipe_config(struct intel_atomic_state *state,
crtc->base.base.id, crtc->base.name,
base_bpp, crtc_state->pipe_bpp, crtc_state->dither);
+ for_each_new_connector_in_state(&state->base, connector, connector_state, i) {
+ struct intel_encoder *encoder =
+ to_intel_encoder(connector_state->best_encoder);
+ struct intel_dp *intel_dp = enc_to_intel_dp(encoder);
+ struct intel_connector *connector = intel_dp->attached_connector;
+
+ if (connector_state->crtc != &crtc->base)
+ continue;
+
+ fixed_mode = intel_panel_fixed_mode(connector, adjusted_mode);
+ if ((intel_dp_is_edp(intel_dp) && fixed_mode) ||
+ crtc_state->output_format == INTEL_OUTPUT_FORMAT_YCBCR420) {
+ ret = intel_panel_fitting(crtc_state, connector_state);
+ if (ret)
+ return ret;
+ }
+ }
+
return 0;
}
diff --git a/drivers/gpu/drm/i915/display/intel_dp.c b/drivers/gpu/drm/i915/display/intel_dp.c
index c0a3b6d50681..bceb2c43ffba 100644
--- a/drivers/gpu/drm/i915/display/intel_dp.c
+++ b/drivers/gpu/drm/i915/display/intel_dp.c
@@ -2942,13 +2942,6 @@ intel_dp_compute_config(struct intel_encoder *encoder,
if (ret)
return ret;
- if ((intel_dp_is_edp(intel_dp) && fixed_mode) ||
- pipe_config->output_format == INTEL_OUTPUT_FORMAT_YCBCR420) {
- ret = intel_panel_fitting(pipe_config, conn_state);
- if (ret)
- return ret;
- }
-
pipe_config->limited_color_range =
intel_dp_limited_color_range(pipe_config, conn_state);
--
2.25.1
More information about the Intel-gfx-trybot
mailing list