All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jani Nikula <jani.nikula@linux.intel.com>
To: Stanislav Lisovskiy <stanislav.lisovskiy@intel.com>,
	intel-gfx@lists.freedesktop.org
Subject: Re: [Intel-gfx] [PATCH 1/2] drm/i915: Add generic constraint checker when determining DP MST DSC bpp
Date: Thu, 02 Feb 2023 12:04:56 +0200	[thread overview]
Message-ID: <87sffo1iyf.fsf@intel.com> (raw)
In-Reply-To: <20230202094726.6435-2-stanislav.lisovskiy@intel.com>

On Thu, 02 Feb 2023, Stanislav Lisovskiy <stanislav.lisovskiy@intel.com> wrote:
> There are might be multiple contraints which we need to check while determining
> if we can use desired compressed bpp, so might be good idea to add a special
> helper, so that we don't overcomplicate the main bpp calculation function.

It is, but I don't see the value in adding an empty function like this.

>
> Signed-off-by: Stanislav Lisovskiy <stanislav.lisovskiy@intel.com>
> ---
>  drivers/gpu/drm/i915/display/intel_dp_mst.c | 15 +++++++++++++--
>  1 file changed, 13 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/display/intel_dp_mst.c b/drivers/gpu/drm/i915/display/intel_dp_mst.c
> index 8b0e4defa3f1..e3e7c305fece 100644
> --- a/drivers/gpu/drm/i915/display/intel_dp_mst.c
> +++ b/drivers/gpu/drm/i915/display/intel_dp_mst.c
> @@ -45,6 +45,13 @@
>  #include "intel_hotplug.h"
>  #include "skl_scaler.h"
>  
> +static int intel_dp_mst_check_constraints(struct drm_i915_private *i915, int bpp,
> +					  const struct drm_display_mode *adjusted_mode,
> +					  struct intel_crtc_state *crtc_state)
> +{
> +	return 0;
> +}
> +
>  static int intel_dp_mst_find_vcpi_slots_for_bpp(struct intel_encoder *encoder,
>  						struct intel_crtc_state *crtc_state,
>  						int max_bpp,
> @@ -87,6 +94,10 @@ static int intel_dp_mst_find_vcpi_slots_for_bpp(struct intel_encoder *encoder,
>  
>  		drm_dbg_kms(&i915->drm, "Trying bpp %d\n", bpp);
>  
> +		ret = intel_dp_mst_check_constraints(i915, bpp, adjusted_mode, crtc_state);
> +		if (ret)
> +			continue;
> +
>  		slots = drm_dp_atomic_find_time_slots(state, &intel_dp->mst_mgr,
>  						      connector->port,
>  						      crtc_state->pbn);
> @@ -104,8 +115,8 @@ static int intel_dp_mst_find_vcpi_slots_for_bpp(struct intel_encoder *encoder,
>  		}
>  	}
>  
> -	/* Despite slots are non-zero, we still failed the atomic check */
> -	if (ret && slots >= 0)
> +	/* We failed to find a proper bpp/timeslots, return error */
> +	if (ret)
>  		slots = ret;
>  
>  	if (slots < 0) {

-- 
Jani Nikula, Intel Open Source Graphics Center

  reply	other threads:[~2023-02-02 10:05 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-02-02  9:47 [Intel-gfx] [PATCH 0/2] We need to have additional checks for DP MST UHBR Stanislav Lisovskiy
2023-02-02  9:47 ` [Intel-gfx] [PATCH 1/2] drm/i915: Add generic constraint checker when determining DP MST DSC bpp Stanislav Lisovskiy
2023-02-02 10:04   ` Jani Nikula [this message]
2023-02-02  9:47 ` [Intel-gfx] [PATCH 2/2] drm/i915: Implement UHBR bandwidth check Stanislav Lisovskiy
2023-02-02 10:05   ` Jani Nikula
2023-02-02 10:34 ` [Intel-gfx] ✓ Fi.CI.BAT: success for We need to have additional checks for DP MST UHBR (rev2) Patchwork
2023-02-02 16:54 ` [Intel-gfx] ✓ Fi.CI.IGT: " Patchwork
  -- strict thread matches above, loose matches on Subject: below --
2023-01-16 11:19 [Intel-gfx] [PATCH 0/2] We need to have additional checks for DP MST UHBR Stanislav Lisovskiy
2023-01-16 11:19 ` [Intel-gfx] [PATCH 1/2] drm/i915: Add generic constraint checker when determining DP MST DSC bpp Stanislav Lisovskiy

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=87sffo1iyf.fsf@intel.com \
    --to=jani.nikula@linux.intel.com \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=stanislav.lisovskiy@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.