From: "Ville Syrjälä" <ville.syrjala@linux.intel.com>
To: Nemesa Garg <nemesa.garg@intel.com>
Cc: intel-gfx@lists.freedesktop.org, intel-xe@lists.freedesktop.org
Subject: Re: [PATCH v5 2/6] drm/i915/display: Add gmch_panel_fitting in all encoders
Date: Fri, 22 Nov 2024 20:48:56 +0200 [thread overview]
Message-ID: <Z0DSGC5FF0Wdbxyh@intel.com> (raw)
In-Reply-To: <20241120053838.3794419-3-nemesa.garg@intel.com>
On Wed, Nov 20, 2024 at 11:08:34AM +0530, Nemesa Garg wrote:
> For all encoders add gmch_panel_fitting and remove
> pch_panel_fitting as it will be called from pipe_config
> after joiner calculation is done.
>
> -v5: Nuke GMCH check from few places [Ville]
>
> Signed-off-by: Nemesa Garg <nemesa.garg@intel.com>
> ---
> drivers/gpu/drm/i915/display/icl_dsi.c | 4 ----
> drivers/gpu/drm/i915/display/intel_dp.c | 6 +++---
> drivers/gpu/drm/i915/display/intel_hdmi.c | 6 ------
> drivers/gpu/drm/i915/display/intel_lvds.c | 10 ++++++----
> drivers/gpu/drm/i915/display/intel_pfit.c | 15 ++++++++-------
> drivers/gpu/drm/i915/display/intel_pfit.h | 6 ++++--
> drivers/gpu/drm/i915/display/vlv_dsi.c | 9 ++++++---
> 7 files changed, 27 insertions(+), 29 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/display/icl_dsi.c b/drivers/gpu/drm/i915/display/icl_dsi.c
> index 74ab3d1a1622..30c2393d9f30 100644
> --- a/drivers/gpu/drm/i915/display/icl_dsi.c
> +++ b/drivers/gpu/drm/i915/display/icl_dsi.c
> @@ -1651,10 +1651,6 @@ static int gen11_dsi_compute_config(struct intel_encoder *encoder,
> if (ret)
> return ret;
>
> - ret = intel_panel_fitting(pipe_config, conn_state);
> - if (ret)
> - return ret;
> -
I don't you adding the pch_panel_fitting() call anywhere,
so this patch looks completely broken on ilk+.
> adjusted_mode->flags = 0;
>
> /* Dual link goes to trancoder DSI'0' */
> diff --git a/drivers/gpu/drm/i915/display/intel_dp.c b/drivers/gpu/drm/i915/display/intel_dp.c
> index 053a9a4182e7..0b1ff6291e74 100644
> --- a/drivers/gpu/drm/i915/display/intel_dp.c
> +++ b/drivers/gpu/drm/i915/display/intel_dp.c
> @@ -3090,6 +3090,7 @@ intel_dp_compute_config(struct intel_encoder *encoder,
> struct intel_crtc_state *pipe_config,
> struct drm_connector_state *conn_state)
> {
> + struct intel_display *display = to_intel_display(encoder);
> struct drm_i915_private *dev_priv = to_i915(encoder->base.dev);
> struct intel_atomic_state *state = to_intel_atomic_state(conn_state->state);
> struct drm_display_mode *adjusted_mode = &pipe_config->hw.adjusted_mode;
> @@ -3131,9 +3132,8 @@ 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 (HAS_GMCH(display)) {
> + ret = intel_gmch_panel_fitting(pipe_config, conn_state);
> if (ret)
> return ret;
> }
> diff --git a/drivers/gpu/drm/i915/display/intel_hdmi.c b/drivers/gpu/drm/i915/display/intel_hdmi.c
> index 23c270a8c4aa..20fb1bd44b4f 100644
> --- a/drivers/gpu/drm/i915/display/intel_hdmi.c
> +++ b/drivers/gpu/drm/i915/display/intel_hdmi.c
> @@ -2374,12 +2374,6 @@ int intel_hdmi_compute_config(struct intel_encoder *encoder,
> return ret;
> }
>
> - if (intel_hdmi_is_ycbcr420(pipe_config)) {
> - ret = intel_panel_fitting(pipe_config, conn_state);
> - if (ret)
> - return ret;
> - }
> -
> pipe_config->limited_color_range =
> intel_hdmi_limited_color_range(pipe_config, conn_state);
>
> diff --git a/drivers/gpu/drm/i915/display/intel_lvds.c b/drivers/gpu/drm/i915/display/intel_lvds.c
> index 6d7637ad980a..92f0b7b76cc7 100644
> --- a/drivers/gpu/drm/i915/display/intel_lvds.c
> +++ b/drivers/gpu/drm/i915/display/intel_lvds.c
> @@ -416,6 +416,7 @@ static int intel_lvds_compute_config(struct intel_encoder *encoder,
> struct intel_crtc_state *crtc_state,
> struct drm_connector_state *conn_state)
> {
> + struct intel_display *display = to_intel_display(encoder);
> struct drm_i915_private *i915 = to_i915(encoder->base.dev);
> struct intel_lvds_encoder *lvds_encoder = to_lvds_encoder(encoder);
> struct intel_connector *connector = lvds_encoder->attached_connector;
> @@ -465,10 +466,11 @@ static int intel_lvds_compute_config(struct intel_encoder *encoder,
> if (adjusted_mode->flags & DRM_MODE_FLAG_DBLSCAN)
> return -EINVAL;
>
> - ret = intel_panel_fitting(crtc_state, conn_state);
> - if (ret)
> - return ret;
> -
> + if (HAS_GMCH(display)) {
> + ret = intel_gmch_panel_fitting(crtc_state, conn_state);
> + if (ret)
> + return ret;
> + }
> /*
> * XXX: It would be nice to support lower refresh rates on the
> * panels to reduce power consumption, and perhaps match the
> diff --git a/drivers/gpu/drm/i915/display/intel_pfit.c b/drivers/gpu/drm/i915/display/intel_pfit.c
> index e214e19f8174..fb6387b537b7 100644
> --- a/drivers/gpu/drm/i915/display/intel_pfit.c
> +++ b/drivers/gpu/drm/i915/display/intel_pfit.c
> @@ -545,13 +545,14 @@ static int gmch_panel_fitting(struct intel_crtc_state *crtc_state,
> return intel_gmch_pfit_check_timings(crtc_state);
> }
>
> -int intel_panel_fitting(struct intel_crtc_state *crtc_state,
> - const struct drm_connector_state *conn_state)
> +int intel_gmch_panel_fitting(struct intel_crtc_state *crtc_state,
> + const struct drm_connector_state *conn_state)
> {
> - struct intel_display *display = to_intel_display(crtc_state);
> + return gmch_panel_fitting(crtc_state, conn_state);
> +}
>
> - if (HAS_GMCH(display))
> - return gmch_panel_fitting(crtc_state, conn_state);
> - else
> - return pch_panel_fitting(crtc_state, conn_state);
> +int intel_pch_panel_fitting(struct intel_crtc_state *crtc_state,
> + const struct drm_connector_state *conn_state)
> +{
> + return pch_panel_fitting(crtc_state, conn_state);
> }
> diff --git a/drivers/gpu/drm/i915/display/intel_pfit.h b/drivers/gpu/drm/i915/display/intel_pfit.h
> index add8d78de2c9..1365ab86c89c 100644
> --- a/drivers/gpu/drm/i915/display/intel_pfit.h
> +++ b/drivers/gpu/drm/i915/display/intel_pfit.h
> @@ -9,7 +9,9 @@
> struct drm_connector_state;
> struct intel_crtc_state;
>
> -int intel_panel_fitting(struct intel_crtc_state *crtc_state,
> - const struct drm_connector_state *conn_state);
> +int intel_gmch_panel_fitting(struct intel_crtc_state *crtc_state,
> + const struct drm_connector_state *conn_state);
> +int intel_pch_panel_fitting(struct intel_crtc_state *crtc_state,
> + const struct drm_connector_state *conn_state);
>
> #endif /* __INTEL_PFIT_H__ */
> diff --git a/drivers/gpu/drm/i915/display/vlv_dsi.c b/drivers/gpu/drm/i915/display/vlv_dsi.c
> index d49e9b3c7627..6de10f5722b4 100644
> --- a/drivers/gpu/drm/i915/display/vlv_dsi.c
> +++ b/drivers/gpu/drm/i915/display/vlv_dsi.c
> @@ -269,6 +269,7 @@ static int intel_dsi_compute_config(struct intel_encoder *encoder,
> struct intel_crtc_state *pipe_config,
> struct drm_connector_state *conn_state)
> {
> + struct intel_display *display = to_intel_display(encoder);
> struct drm_i915_private *dev_priv = to_i915(encoder->base.dev);
> struct intel_dsi *intel_dsi = enc_to_intel_dsi(encoder);
> struct intel_connector *intel_connector = intel_dsi->attached_connector;
> @@ -283,9 +284,11 @@ static int intel_dsi_compute_config(struct intel_encoder *encoder,
> if (ret)
> return ret;
>
> - ret = intel_panel_fitting(pipe_config, conn_state);
> - if (ret)
> - return ret;
> + if (HAS_GMCH(display)) {
> + ret = intel_gmch_panel_fitting(pipe_config, conn_state);
> + if (ret)
> + return ret;
> + }
>
> if (adjusted_mode->flags & DRM_MODE_FLAG_DBLSCAN)
> return -EINVAL;
> --
> 2.25.1
--
Ville Syrjälä
Intel
next prev parent reply other threads:[~2024-11-22 18:49 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-11-20 5:38 [PATCH 0/6] Consider joiner calculation for panel fitting Nemesa Garg
2024-11-20 5:38 ` [PATCH 1/6] drm/i915/display: Disable joiner and pfit Nemesa Garg
2024-11-22 18:45 ` Ville Syrjälä
2024-11-20 5:38 ` [PATCH v5 2/6] drm/i915/display: Add gmch_panel_fitting in all encoders Nemesa Garg
2024-11-22 18:47 ` Ville Syrjälä
2024-11-22 18:48 ` Ville Syrjälä [this message]
2024-11-20 5:38 ` [PATCH 3/6] drm/i915/display: Replace adjusted mode with pipe mode Nemesa Garg
2024-11-22 20:01 ` Ville Syrjälä
2024-12-11 9:19 ` Garg, Nemesa
2024-11-20 5:38 ` [PATCH v5 4/6] drm/i915/display: Call panel_fitting from pipe_config Nemesa Garg
2024-11-20 5:38 ` [PATCH 5/6] drm/i915/dispaly: Allow joiner and pfit Nemesa Garg
2024-11-20 5:38 ` [PATCH 6/6] drm/i915/display: Initialize pipe_src in compute stage Nemesa Garg
2024-11-20 6:13 ` ✗ Fi.CI.SPARSE: warning for Consider joiner calculation for panel fitting (rev5) Patchwork
2024-11-20 7:27 ` ✓ Fi.CI.BAT: success " Patchwork
2024-11-23 13:04 ` ✗ i915.CI.Full: failure " Patchwork
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=Z0DSGC5FF0Wdbxyh@intel.com \
--to=ville.syrjala@linux.intel.com \
--cc=intel-gfx@lists.freedesktop.org \
--cc=intel-xe@lists.freedesktop.org \
--cc=nemesa.garg@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox