Intel-GFX Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: "Ville Syrjälä" <ville.syrjala@linux.intel.com>
To: Anshuman Gupta <anshuman.gupta@intel.com>
Cc: intel-gfx@lists.freedesktop.org
Subject: Re: [Intel-gfx] [PATCH 7/7] drm/i915: Enable 3 display pipes support
Date: Tue, 4 Feb 2020 16:35:19 +0200	[thread overview]
Message-ID: <20200204143519.GP13686@intel.com> (raw)
In-Reply-To: <20200204112927.17391-8-anshuman.gupta@intel.com>

On Tue, Feb 04, 2020 at 04:59:27PM +0530, Anshuman Gupta wrote:
> Allow 3-display pipes SKU system with any combination
> in INTEL_INFO pipe mask.
> B.Spec:50075
> 
> changes since RFC:
> - using intel_pipe_mask_is_valid() function to check integrity of
>   pipe_mask. [Ville]
> 
> Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
> Signed-off-by: Anshuman Gupta <anshuman.gupta@intel.com>
> ---
>  drivers/gpu/drm/i915/intel_device_info.c | 38 +++++++++++++++++-------
>  1 file changed, 28 insertions(+), 10 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/intel_device_info.c b/drivers/gpu/drm/i915/intel_device_info.c
> index fcdacd6d4aa5..caf93a68a056 100644
> --- a/drivers/gpu/drm/i915/intel_device_info.c
> +++ b/drivers/gpu/drm/i915/intel_device_info.c
> @@ -896,6 +896,30 @@ void intel_device_info_subplatform_init(struct drm_i915_private *i915)
>  	RUNTIME_INFO(i915)->platform_mask[pi] |= mask;
>  }
>  
> +static bool
> +intel_pipe_mask_is_valid(struct drm_i915_private *dev_priv, u8 pipe_mask)
> +{
> +	/*
> +	 * At least one pipe should be enabled.
> +	 */
> +	if (pipe_mask == 0)
> +		return false;

Doesn't that just mean the entire display engine is fused off?

> +	/*
> +	 * if there are disabled pipes they should be the last ones,
> +	 * with no holses in the mask for Dispaly Gen<=12.

"holes"

> +	 */
> +	if (!is_power_of_2(pipe_mask + 1)) {
> +		if (INTEL_GEN(dev_priv) <= 11)
> +			return false;
> +		else if (IS_TIGERLAKE(dev_priv))
> +			return false;
> +		else if (IS_GEN(dev_priv, 12))
> +			return true;

Why is tgl and rest of gen12 treated differently? I thought this
flexible fusing thing was next-gen stuff.

The structure of this function is a bit wonky. Simpler:

intel_pipe_mask_is_valid()
{
	if (is_whatever_supports_holes)
		return true;

	return is_power_of_2();
}


> +	}
> +
> +	return true;
> +}
> +
>  /**
>   * intel_device_info_runtime_init - initialize runtime info
>   * @dev_priv: the i915 device
> @@ -995,17 +1019,11 @@ void intel_device_info_runtime_init(struct drm_i915_private *dev_priv)
>  		    (dfsm & TGL_DFSM_PIPE_D_DISABLE))
>  			enabled_mask &= ~BIT(PIPE_D);
>  
> -		/*
> -		 * At least one pipe should be enabled and if there are
> -		 * disabled pipes, they should be the last ones, with no holes
> -		 * in the mask.
> -		 */
> -		if (enabled_mask == 0 || !is_power_of_2(enabled_mask + 1))
> -			drm_err(&dev_priv->drm,
> -				"invalid pipe fuse configuration: enabled_mask=0x%x\n",
> -				enabled_mask);
> -		else
> +		if (intel_pipe_mask_is_valid(dev_priv, enabled_mask))
>  			info->pipe_mask = enabled_mask;
> +		else
> +			drm_err(&dev_priv->drm, "invalid pipe fuse configuration: enabled_mask=0x%x\n",
> +				enabled_mask);
>  
>  		if (dfsm & SKL_DFSM_DISPLAY_HDCP_DISABLE)
>  			info->display.has_hdcp = 0;
> -- 
> 2.24.0

-- 
Ville Syrjälä
Intel
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

  reply	other threads:[~2020-02-04 14:35 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-02-04 11:29 [Intel-gfx] [PATCH 0/7] 3 display pipes combination system support Anshuman Gupta
2020-02-04 11:29 ` [Intel-gfx] [PATCH 1/7] drm/i915: Iterate over pipe and skip the disabled one Anshuman Gupta
2020-02-04 11:29 ` [Intel-gfx] [PATCH 2/7] drm/i915: Remove (pipe == crtc->index) assumption Anshuman Gupta
2020-02-04 11:52   ` Jani Nikula
2020-02-04 14:36   ` Ville Syrjälä
2020-02-05  8:02     ` Anshuman Gupta
2020-02-05 11:07       ` Ville Syrjälä
2020-02-04 11:29 ` [Intel-gfx] [PATCH 3/7] drm/i915: Fix broken transcoder err state Anshuman Gupta
2020-02-04 14:28   ` Ville Syrjälä
2020-02-04 16:37     ` Jani Nikula
2020-02-06 10:23       ` Anshuman Gupta
2020-02-04 11:29 ` [Intel-gfx] [PATCH 4/7] drm/i915: Fix wrongly populated plane possible_crtcs bit mask Anshuman Gupta
2020-02-04 14:30   ` Ville Syrjälä
2020-02-04 16:44     ` Ville Syrjälä
2020-02-06 10:15       ` Anshuman Gupta
2020-02-04 11:29 ` [Intel-gfx] [PATCH 5/7] drm/i915: Get right max plane stride Anshuman Gupta
2020-02-04 14:30   ` Ville Syrjälä
2020-02-04 11:29 ` [Intel-gfx] [PATCH 6/7] drm/i915: Add WARN_ON in intel_get_crtc_for_pipe() Anshuman Gupta
2020-02-04 11:29 ` [Intel-gfx] [PATCH 7/7] drm/i915: Enable 3 display pipes support Anshuman Gupta
2020-02-04 14:35   ` Ville Syrjälä [this message]
2020-02-05  1:36 ` [Intel-gfx] ✗ Fi.CI.BUILD: failure for 3 display pipes combination system support (rev2) 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=20200204143519.GP13686@intel.com \
    --to=ville.syrjala@linux.intel.com \
    --cc=anshuman.gupta@intel.com \
    --cc=intel-gfx@lists.freedesktop.org \
    /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