All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jani Nikula <jani.nikula@linux.intel.com>
To: Ville Syrjala <ville.syrjala@linux.intel.com>,
	intel-gfx@lists.freedesktop.org
Subject: Re: [Intel-gfx] [PATCH 1/3] drm/i915: Reject bigjoiner if the pipe doesn't support it
Date: Fri, 21 Jan 2022 16:03:09 +0200	[thread overview]
Message-ID: <87y2392nky.fsf@intel.com> (raw)
In-Reply-To: <20220121130710.10382-1-ville.syrjala@linux.intel.com>

On Fri, 21 Jan 2022, Ville Syrjala <ville.syrjala@linux.intel.com> wrote:
> From: Ville Syrjälä <ville.syrjala@linux.intel.com>
>
> Check that our crtc can in fact be the bigjoiner master before
> we let the modeset proceed with bigjoiner enabled.
>
> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
> ---
>  drivers/gpu/drm/i915/display/intel_display.c | 16 ++++++++++++++++
>  1 file changed, 16 insertions(+)
>
> diff --git a/drivers/gpu/drm/i915/display/intel_display.c b/drivers/gpu/drm/i915/display/intel_display.c
> index 0964b2403e2d..36e547bd0cbe 100644
> --- a/drivers/gpu/drm/i915/display/intel_display.c
> +++ b/drivers/gpu/drm/i915/display/intel_display.c
> @@ -4102,6 +4102,14 @@ static u8 bigjoiner_pipes(struct drm_i915_private *i915)
>  		return 0;
>  }
>  
> +static u8 bigjoiner_master_pipes(struct drm_i915_private *i915)
> +{
> +	u8 pipes = bigjoiner_pipes(i915);
> +
> +	/* last pipe can not be master */
> +	return pipes & (pipes >> 1);
> +}
> +
>  static bool transcoder_ddi_func_is_enabled(struct drm_i915_private *dev_priv,
>  					   enum transcoder cpu_transcoder)
>  {
> @@ -7600,6 +7608,7 @@ static int intel_atomic_check_bigjoiner(struct intel_atomic_state *state,
>  					struct intel_crtc_state *old_crtc_state,
>  					struct intel_crtc_state *new_crtc_state)
>  {
> +	struct drm_i915_private *i915 = to_i915(state->base.dev);
>  	struct intel_crtc_state *slave_crtc_state, *master_crtc_state;
>  	struct intel_crtc *slave_crtc, *master_crtc;
>  
> @@ -7615,6 +7624,13 @@ static int intel_atomic_check_bigjoiner(struct intel_atomic_state *state,
>  	if (!new_crtc_state->bigjoiner)
>  		return 0;
>  
> +	if ((bigjoiner_master_pipes(i915) & BIT(crtc->pipe)) == 0) {

Feels like the check should be in
intel_dsc_get_bigjoiner_{secondary,primary}.

They already contain the check that the next/prev pipe exists, which
(silly me) I thought was enough.

BR,
Jani.

> +		drm_dbg_kms(&i915->drm,
> +			    "[CRTC:%d:%s] Bigjoiner not available on this pipe\n",
> +			    crtc->base.base.id, crtc->base.name);
> +		return -EINVAL;
> +	}
> +
>  	slave_crtc = intel_dsc_get_bigjoiner_secondary(crtc);
>  	if (!slave_crtc) {
>  		DRM_DEBUG_KMS("[CRTC:%d:%s] Big joiner configuration requires "

-- 
Jani Nikula, Intel Open Source Graphics Center

  parent reply	other threads:[~2022-01-21 14:03 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-01-21 13:07 [Intel-gfx] [PATCH 1/3] drm/i915: Reject bigjoiner if the pipe doesn't support it Ville Syrjala
2022-01-21 13:07 ` [Intel-gfx] [PATCH 2/3] drm/i915: Simplify intel_dsc_source_support() Ville Syrjala
2022-01-21 14:05   ` Jani Nikula
2022-01-21 13:07 ` [Intel-gfx] [PATCH 3/3] drm/i915: Use per-device debugs for bigjoiner stuff Ville Syrjala
2022-01-21 14:06   ` Jani Nikula
2022-01-21 14:03 ` Jani Nikula [this message]
2022-01-21 15:55   ` [Intel-gfx] [PATCH 1/3] drm/i915: Reject bigjoiner if the pipe doesn't support it Ville Syrjälä
2022-01-21 16:33     ` Ville Syrjälä
2022-01-21 14:54 ` [Intel-gfx] ✓ Fi.CI.BAT: success for series starting with [1/3] " Patchwork
2022-01-21 18:34 ` [Intel-gfx] ✗ Fi.CI.IGT: 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=87y2392nky.fsf@intel.com \
    --to=jani.nikula@linux.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.