[PATCH] drm/display: Call panel_fitting function from pipe_config
Nemesa Garg
nemesa.garg at intel.com
Fri Jun 21 05:51:05 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 | 6 ++++++
drivers/gpu/drm/i915/display/intel_display_types.h | 1 +
drivers/gpu/drm/i915/display/intel_dp.c | 8 +++-----
3 files changed, 10 insertions(+), 5 deletions(-)
diff --git a/drivers/gpu/drm/i915/display/intel_display.c b/drivers/gpu/drm/i915/display/intel_display.c
index 5a2bbcd2ce2e..edd8b4bd5bc2 100644
--- a/drivers/gpu/drm/i915/display/intel_display.c
+++ b/drivers/gpu/drm/i915/display/intel_display.c
@@ -4796,6 +4796,12 @@ 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);
+ if (crtc_state->pch_pfit.is_pch_required) {
+ ret = intel_panel_fitting(crtc_state, connector_state);
+ if (ret)
+ return ret;
+ }
+
return 0;
}
diff --git a/drivers/gpu/drm/i915/display/intel_display_types.h b/drivers/gpu/drm/i915/display/intel_display_types.h
index c0418e34d841..f9bc0ad1ab54 100644
--- a/drivers/gpu/drm/i915/display/intel_display_types.h
+++ b/drivers/gpu/drm/i915/display/intel_display_types.h
@@ -1247,6 +1247,7 @@ struct intel_crtc_state {
struct drm_rect dst;
bool enabled;
bool force_thru;
+ bool is_pch_required;
} pch_pfit;
/* FDI configuration, only valid if has_pch_encoder is set. */
diff --git a/drivers/gpu/drm/i915/display/intel_dp.c b/drivers/gpu/drm/i915/display/intel_dp.c
index 692082ff6309..2d5fc4e03f03 100644
--- a/drivers/gpu/drm/i915/display/intel_dp.c
+++ b/drivers/gpu/drm/i915/display/intel_dp.c
@@ -2963,11 +2963,9 @@ intel_dp_compute_config(struct intel_encoder *encoder,
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->output_format == INTEL_OUTPUT_FORMAT_YCBCR420) {
+ pipe_config->pch_pfit.is_pch_required = true;
+ }
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