Intel-GFX Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: "Navare, Manasi" <manasi.d.navare@intel.com>
To: Ville Syrjala <ville.syrjala@linux.intel.com>
Cc: intel-gfx@lists.freedesktop.org
Subject: Re: [Intel-gfx] [PATCH 09/10] drm/i915: Return both master and slave pipes from enabled_bigjoiner_pipes()
Date: Wed, 9 Feb 2022 12:00:26 -0800	[thread overview]
Message-ID: <20220209200026.GC31646@labuser-Z97X-UD5H> (raw)
In-Reply-To: <20220203183823.22890-10-ville.syrjala@linux.intel.com>

On Thu, Feb 03, 2022 at 08:38:22PM +0200, Ville Syrjala wrote:
> From: Ville Syrjälä <ville.syrjala@linux.intel.com>
> 
> Return both the master and slave pipe bitmasks from
> enabled_bigjoiner_pipes(). We'll have use for both during
> readout soon.
> 
> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>

This looks good, can this be just combined with the patch that would use the slave and mastr pipes
in the readout ?

Either way,

Reviewed-by: Manasi Navare <manasi.d.navare@intel.com>

Manasi

> ---
>  drivers/gpu/drm/i915/display/intel_display.c | 25 +++++++++++---------
>  1 file changed, 14 insertions(+), 11 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/display/intel_display.c b/drivers/gpu/drm/i915/display/intel_display.c
> index 6df498fc720a..34b6b4ab3a1b 100644
> --- a/drivers/gpu/drm/i915/display/intel_display.c
> +++ b/drivers/gpu/drm/i915/display/intel_display.c
> @@ -4064,11 +4064,14 @@ static bool transcoder_ddi_func_is_enabled(struct drm_i915_private *dev_priv,
>  	return tmp & TRANS_DDI_FUNC_ENABLE;
>  }
>  
> -static u8 enabled_bigjoiner_pipes(struct drm_i915_private *dev_priv)
> +static void enabled_bigjoiner_pipes(struct drm_i915_private *dev_priv,
> +				    u8 *master_pipes, u8 *slave_pipes)
>  {
> -	u8 master_pipes = 0, slave_pipes = 0;
>  	struct intel_crtc *crtc;
>  
> +	*master_pipes = 0;
> +	*slave_pipes = 0;
> +
>  	for_each_intel_crtc_in_pipe_mask(&dev_priv->drm, crtc,
>  					 bigjoiner_pipes(dev_priv)) {
>  		enum intel_display_power_domain power_domain;
> @@ -4083,9 +4086,9 @@ static u8 enabled_bigjoiner_pipes(struct drm_i915_private *dev_priv)
>  				continue;
>  
>  			if (tmp & MASTER_BIG_JOINER_ENABLE)
> -				master_pipes |= BIT(pipe);
> +				*master_pipes |= BIT(pipe);
>  			else
> -				slave_pipes |= BIT(pipe);
> +				*slave_pipes |= BIT(pipe);
>  		}
>  
>  		if (DISPLAY_VER(dev_priv) < 13)
> @@ -4096,18 +4099,16 @@ static u8 enabled_bigjoiner_pipes(struct drm_i915_private *dev_priv)
>  			u32 tmp = intel_de_read(dev_priv, ICL_PIPE_DSS_CTL1(pipe));
>  
>  			if (tmp & UNCOMPRESSED_JOINER_MASTER)
> -				master_pipes |= BIT(pipe);
> +				*master_pipes |= BIT(pipe);
>  			if (tmp & UNCOMPRESSED_JOINER_SLAVE)
> -				slave_pipes |= BIT(pipe);
> +				*slave_pipes |= BIT(pipe);
>  		}
>  	}
>  
>  	/* Bigjoiner pipes should always be consecutive master and slave */
> -	drm_WARN(&dev_priv->drm, slave_pipes != master_pipes << 1,
> +	drm_WARN(&dev_priv->drm, *slave_pipes != *master_pipes << 1,
>  		 "Bigjoiner misconfigured (master pipes 0x%x, slave pipes 0x%x)\n",
> -		 master_pipes, slave_pipes);
> -
> -	return slave_pipes;
> +		 *master_pipes, *slave_pipes);
>  }
>  
>  static u8 hsw_panel_transcoders(struct drm_i915_private *i915)
> @@ -4126,6 +4127,7 @@ static u8 hsw_enabled_transcoders(struct intel_crtc *crtc)
>  	struct drm_i915_private *dev_priv = to_i915(dev);
>  	u8 panel_transcoder_mask = hsw_panel_transcoders(dev_priv);
>  	enum transcoder cpu_transcoder;
> +	u8 master_pipes, slave_pipes;
>  	u8 enabled_transcoders = 0;
>  
>  	/*
> @@ -4177,7 +4179,8 @@ static u8 hsw_enabled_transcoders(struct intel_crtc *crtc)
>  		enabled_transcoders |= BIT(cpu_transcoder);
>  
>  	/* bigjoiner slave -> consider the master pipe's transcoder as well */
> -	if (enabled_bigjoiner_pipes(dev_priv) & BIT(crtc->pipe)) {
> +	enabled_bigjoiner_pipes(dev_priv, &master_pipes, &slave_pipes);
> +	if (slave_pipes & BIT(crtc->pipe)) {
>  		cpu_transcoder = (enum transcoder) crtc->pipe - 1;
>  		if (transcoder_ddi_func_is_enabled(dev_priv, cpu_transcoder))
>  			enabled_transcoders |= BIT(cpu_transcoder);
> -- 
> 2.34.1
> 

  reply	other threads:[~2022-02-09 20:00 UTC|newest]

Thread overview: 41+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-02-03 18:38 [Intel-gfx] [PATCH 00/10] drm/i915: Use a bitmask for bigjoiner state tracking Ville Syrjala
2022-02-03 18:38 ` [Intel-gfx] [PATCH 01/10] drm/i915: Flag crtc scaling_filter changes as modeset Ville Syrjala
2022-02-03 21:58   ` Navare, Manasi
2022-02-04  6:53     ` Ville Syrjälä
2022-02-03 18:38 ` [Intel-gfx] [PATCH 02/10] drm/i915: Fix bigjoiner state copy fails Ville Syrjala
2022-02-03 22:13   ` Navare, Manasi
2022-02-04  7:05     ` Ville Syrjälä
2022-02-04  7:20   ` [Intel-gfx] [PATCH v2 " Ville Syrjala
2022-02-04 20:58     ` Navare, Manasi
2022-02-03 18:38 ` [Intel-gfx] [PATCH 03/10] drm/i915: Remove weird code from intel_atomic_check_bigjoiner() Ville Syrjala
2022-02-03 22:20   ` Navare, Manasi
2022-02-03 18:38 ` [Intel-gfx] [PATCH 04/10] drm/i915: Clean up the bigjoiner state copy logic Ville Syrjala
2022-02-04  7:20   ` [Intel-gfx] [PATCH v2 " Ville Syrjala
2022-02-04 20:52     ` Navare, Manasi
2022-02-07  7:32       ` Ville Syrjälä
2022-02-03 18:38 ` [Intel-gfx] [PATCH 05/10] drm/i915: Nuke some dead code Ville Syrjala
2022-02-04 21:08   ` Navare, Manasi
2022-02-03 18:38 ` [Intel-gfx] [PATCH 06/10] drm/i915: Introduce intel_crtc_is_bigjoiner_{slave, master}() Ville Syrjala
2022-02-04 21:27   ` Navare, Manasi
2022-02-07  7:31     ` Ville Syrjälä
2022-02-15 10:53       ` Nautiyal, Ankit K
2022-02-03 18:38 ` [Intel-gfx] [PATCH 07/10] drm/i915: Convert for_each_intel_crtc_mask() to take a pipe mask instead Ville Syrjala
2022-02-09 19:57   ` Navare, Manasi
2022-02-03 18:38 ` [Intel-gfx] [PATCH 08/10] drm/i915: Use for_each_intel_crtc_in_pipe_mask() more Ville Syrjala
2022-02-09 19:58   ` Navare, Manasi
2022-02-03 18:38 ` [Intel-gfx] [PATCH 09/10] drm/i915: Return both master and slave pipes from enabled_bigjoiner_pipes() Ville Syrjala
2022-02-09 20:00   ` Navare, Manasi [this message]
2022-02-09 20:10     ` Ville Syrjälä
2022-02-03 18:38 ` [Intel-gfx] [PATCH 10/10] drm/i915: Change bigjoiner state tracking to use the pipe bitmask Ville Syrjala
2022-02-04 23:58   ` Navare, Manasi
2022-02-07  7:31     ` Ville Syrjälä
2022-02-07 23:56       ` Navare, Manasi
2022-02-03 18:50 ` [Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for drm/i915: Use a bitmask for bigjoiner state tracking Patchwork
2022-02-03 18:51 ` [Intel-gfx] ✗ Fi.CI.SPARSE: " Patchwork
2022-02-03 19:19 ` [Intel-gfx] ✓ Fi.CI.BAT: success " Patchwork
2022-02-03 21:18 ` [Intel-gfx] ✗ Fi.CI.IGT: failure " Patchwork
2022-02-04  7:33 ` [Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for drm/i915: Use a bitmask for bigjoiner state tracking (rev3) Patchwork
2022-02-04  7:34 ` [Intel-gfx] ✗ Fi.CI.SPARSE: " Patchwork
2022-02-04  8:03 ` [Intel-gfx] ✓ Fi.CI.BAT: success " Patchwork
2022-02-04  9:22 ` [Intel-gfx] ✗ Fi.CI.IGT: failure " Patchwork
2022-02-15 22:34 ` [Intel-gfx] ✗ Fi.CI.BUILD: failure for drm/i915: Use a bitmask for bigjoiner state tracking (rev4) 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=20220209200026.GC31646@labuser-Z97X-UD5H \
    --to=manasi.d.navare@intel.com \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=ville.syrjala@linux.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