Intel-GFX Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: "Ville Syrjälä" <ville.syrjala@linux.intel.com>
To: Nemesa Garg <nemesa.garg@intel.com>
Cc: intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH 2/3] drm/i915/display: Add gmch_panel_fitting in all encoders
Date: Wed, 25 Sep 2024 23:21:50 +0300	[thread overview]
Message-ID: <ZvRw3vqQ15OCrUo3@intel.com> (raw)
In-Reply-To: <20240925063032.2311796-3-nemesa.garg@intel.com>

On Wed, Sep 25, 2024 at 12:00:31PM +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.
> 
> Signed-off-by: Nemesa Garg <nemesa.garg@intel.com>
> ---
>  drivers/gpu/drm/i915/display/icl_dsi.c    | 8 +++++---
>  drivers/gpu/drm/i915/display/intel_dp.c   | 5 ++---
>  drivers/gpu/drm/i915/display/intel_hdmi.c | 4 ++--
>  drivers/gpu/drm/i915/display/intel_lvds.c | 8 +++++---
>  drivers/gpu/drm/i915/display/vlv_dsi.c    | 8 +++++---
>  5 files changed, 19 insertions(+), 14 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/display/icl_dsi.c b/drivers/gpu/drm/i915/display/icl_dsi.c
> index 293efc1f841d..cfbfbc815d8c 100644
> --- a/drivers/gpu/drm/i915/display/icl_dsi.c
> +++ b/drivers/gpu/drm/i915/display/icl_dsi.c
> @@ -1641,9 +1641,11 @@ 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;
> +	if (HAS_GMCH(i915)) {
> +		ret = intel_gch_panel_fitting(pipe_config, conn_state);
> +		if (ret)
> +			return ret;
> +	}

This one can be nuked entirely as Jani pointed out.

>  
>  	adjusted_mode->flags = 0;
>  
> diff --git a/drivers/gpu/drm/i915/display/intel_dp.c b/drivers/gpu/drm/i915/display/intel_dp.c
> index a1fcedfd404b..480cb8dc2948 100644
> --- a/drivers/gpu/drm/i915/display/intel_dp.c
> +++ b/drivers/gpu/drm/i915/display/intel_dp.c
> @@ -3049,9 +3049,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(dev_priv)) {

Hmm. Technically we only need this for eDP (no 4:2:0
on gmch so that part is irrelevant), but I suppose
there should be no real harm in calling it
unconditionally as gmch_panel_fitting() will check
whether pipe_src matches the mode.

> +		ret = intel_gch_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 cd9ee171e0df..90b4664f66f8 100644
> --- a/drivers/gpu/drm/i915/display/intel_hdmi.c
> +++ b/drivers/gpu/drm/i915/display/intel_hdmi.c
> @@ -2345,8 +2345,8 @@ 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 (HAS_GMCH(display)) {
> +		ret = intel_gch_panel_fitting(pipe_config, conn_state);
>  		if (ret)
>  			return ret;
>  	}

This too can be nuked since there is no 4:2:0 support 
on gmch platforms.

> diff --git a/drivers/gpu/drm/i915/display/intel_lvds.c b/drivers/gpu/drm/i915/display/intel_lvds.c
> index fb4ed9f7855b..c28979b4ac15 100644
> --- a/drivers/gpu/drm/i915/display/intel_lvds.c
> +++ b/drivers/gpu/drm/i915/display/intel_lvds.c
> @@ -463,9 +463,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(i915)) {
> +		ret = intel_gch_panel_fitting(crtc_state, conn_state);
> +		if (ret)
> +			return ret;
> +	}
>  
>  	/*
>  	 * XXX: It would be nice to support lower refresh rates on the
> diff --git a/drivers/gpu/drm/i915/display/vlv_dsi.c b/drivers/gpu/drm/i915/display/vlv_dsi.c
> index d21f3fb39706..753a883c30c2 100644
> --- a/drivers/gpu/drm/i915/display/vlv_dsi.c
> +++ b/drivers/gpu/drm/i915/display/vlv_dsi.c
> @@ -282,9 +282,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(dev_priv)) {
> +		ret = intel_gch_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

  parent reply	other threads:[~2024-09-25 20:21 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-09-25  6:30 [PATCH 0/3] Consider joiner calculation for panel fitting Nemesa Garg
2024-09-25  6:30 ` [PATCH 1/3] drm/i915/display: Modify panel_fitting code for joiner Nemesa Garg
2024-09-25  9:11   ` Jani Nikula
2024-09-25 12:30     ` Garg, Nemesa
2024-09-25 20:13   ` Ville Syrjälä
2024-09-25  6:30 ` [PATCH 2/3] drm/i915/display: Add gmch_panel_fitting in all encoders Nemesa Garg
2024-09-25  9:12   ` Jani Nikula
2024-09-25 12:28     ` Garg, Nemesa
2024-09-25 20:21   ` Ville Syrjälä [this message]
2024-09-25  6:30 ` [PATCH v4 3/3] drm/i915/display: Call panel_fitting from pipe_config Nemesa Garg
2024-09-25 19:22   ` kernel test robot
2024-09-25 20:36   ` Ville Syrjälä
2024-10-01  7:10   ` Dan Carpenter
2024-09-27  1:02 ` ✗ Fi.CI.SPARSE: warning for Consider joiner calculation for panel fitting (rev4) Patchwork
2024-09-27  1:11 ` ✗ Fi.CI.BAT: 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=ZvRw3vqQ15OCrUo3@intel.com \
    --to=ville.syrjala@linux.intel.com \
    --cc=intel-gfx@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