Intel-GFX Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: "Ville Syrjälä" <ville.syrjala@linux.intel.com>
To: Ankit Nautiyal <ankit.k.nautiyal@intel.com>
Cc: intel-gfx@lists.freedesktop.org
Subject: Re: [Intel-gfx] [PATCH 2/2] drm/i915/dp: Use current cdclk for DSC Bigjoiner BW check
Date: Wed, 29 Mar 2023 12:57:26 +0300	[thread overview]
Message-ID: <ZCQLhkwNGRnZkD4k@intel.com> (raw)
In-Reply-To: <20230329084449.717954-3-ankit.k.nautiyal@intel.com>

On Wed, Mar 29, 2023 at 02:14:49PM +0530, Ankit Nautiyal wrote:
> As per Bspec, Big Joiner BW check is:
> Output bpp <= PPC * CDCLK frequency * Big joiner interface bits /
> Pixel clock
> 
> Currently we always use max_cdclk in the check for both modevalid
> and compute config steps.
> 
> During modevalid use max_cdclk_freq for the check.
> During compute config step use current cdclk for the check.

Nak. cdclk is computed much later based on what is actually needed.
The cdclk freq you are using here is essentially a random number.

> 
> Signed-off-by: Ankit Nautiyal <ankit.k.nautiyal@intel.com>
> ---
>  drivers/gpu/drm/i915/display/intel_dp.c     | 9 ++++++---
>  drivers/gpu/drm/i915/display/intel_dp.h     | 1 +
>  drivers/gpu/drm/i915/display/intel_dp_mst.c | 1 +
>  3 files changed, 8 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/display/intel_dp.c b/drivers/gpu/drm/i915/display/intel_dp.c
> index 3fe651a8f5d0..d6600de1ab49 100644
> --- a/drivers/gpu/drm/i915/display/intel_dp.c
> +++ b/drivers/gpu/drm/i915/display/intel_dp.c
> @@ -711,6 +711,7 @@ u32 intel_dp_dsc_nearest_valid_bpp(struct drm_i915_private *i915, u32 bpp, u32 p
>  u16 intel_dp_dsc_get_output_bpp(struct drm_i915_private *i915,
>  				u32 link_clock, u32 lane_count,
>  				u32 mode_clock, u32 mode_hdisplay,
> +				unsigned int cdclk,
>  				bool bigjoiner,
>  				u32 pipe_bpp,
>  				u32 timeslots)
> @@ -757,9 +758,9 @@ u16 intel_dp_dsc_get_output_bpp(struct drm_i915_private *i915,
>  
>  	if (bigjoiner) {
>  		int bigjoiner_interface_bits = DISPLAY_VER(i915) <= 12 ? 24 : 36;
> -		u32 max_bpp_bigjoiner =
> -			i915->display.cdclk.max_cdclk_freq * 2 * bigjoiner_interface_bits /
> -			intel_dp_mode_to_fec_clock(mode_clock);
> +
> +		u32 max_bpp_bigjoiner = cdclk * 2 * bigjoiner_interface_bits /
> +					intel_dp_mode_to_fec_clock(mode_clock);
>  
>  		bits_per_pixel = min(bits_per_pixel, max_bpp_bigjoiner);
>  	}
> @@ -1073,6 +1074,7 @@ intel_dp_mode_valid(struct drm_connector *_connector,
>  							    max_lanes,
>  							    target_clock,
>  							    mode->hdisplay,
> +							    dev_priv->display.cdclk.max_cdclk_freq,
>  							    bigjoiner,
>  							    pipe_bpp, 64) >> 4;
>  			dsc_slice_count =
> @@ -1580,6 +1582,7 @@ int intel_dp_dsc_compute_config(struct intel_dp *intel_dp,
>  							    pipe_config->lane_count,
>  							    adjusted_mode->crtc_clock,
>  							    adjusted_mode->crtc_hdisplay,
> +							    dev_priv->display.cdclk.hw.cdclk,
>  							    pipe_config->bigjoiner_pipes,
>  							    pipe_bpp,
>  							    timeslots);
> diff --git a/drivers/gpu/drm/i915/display/intel_dp.h b/drivers/gpu/drm/i915/display/intel_dp.h
> index ef39e4f7a329..d150bfe8abf4 100644
> --- a/drivers/gpu/drm/i915/display/intel_dp.h
> +++ b/drivers/gpu/drm/i915/display/intel_dp.h
> @@ -106,6 +106,7 @@ int intel_dp_dsc_compute_bpp(struct intel_dp *intel_dp, u8 dsc_max_bpc);
>  u16 intel_dp_dsc_get_output_bpp(struct drm_i915_private *i915,
>  				u32 link_clock, u32 lane_count,
>  				u32 mode_clock, u32 mode_hdisplay,
> +				unsigned int cdclk,
>  				bool bigjoiner,
>  				u32 pipe_bpp,
>  				u32 timeslots);
> diff --git a/drivers/gpu/drm/i915/display/intel_dp_mst.c b/drivers/gpu/drm/i915/display/intel_dp_mst.c
> index a860cbc5dbea..266e31b78729 100644
> --- a/drivers/gpu/drm/i915/display/intel_dp_mst.c
> +++ b/drivers/gpu/drm/i915/display/intel_dp_mst.c
> @@ -925,6 +925,7 @@ intel_dp_mst_mode_valid_ctx(struct drm_connector *connector,
>  							    max_lanes,
>  							    target_clock,
>  							    mode->hdisplay,
> +							    dev_priv->display.cdclk.max_cdclk_freq,
>  							    bigjoiner,
>  							    pipe_bpp, 64) >> 4;
>  			dsc_slice_count =
> -- 
> 2.25.1

-- 
Ville Syrjälä
Intel

  reply	other threads:[~2023-03-29  9:57 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-03-29  8:44 [Intel-gfx] [PATCH 0/2] Update DSC Bigjoiner BW check Ankit Nautiyal
2023-03-29  8:44 ` [Intel-gfx] [PATCH 1/2] drm/i915/dp: Update Bigjoiner interface bits for computing compressed bpp Ankit Nautiyal
2023-03-29  9:07   ` [Intel-gfx] [PATCH v2 " Ankit Nautiyal
2023-03-29 10:54     ` Ville Syrjälä
2023-03-29 11:23       ` Nautiyal, Ankit K
2023-03-29 11:59         ` Ville Syrjälä
2023-03-29  8:44 ` [Intel-gfx] [PATCH 2/2] drm/i915/dp: Use current cdclk for DSC Bigjoiner BW check Ankit Nautiyal
2023-03-29  9:57   ` Ville Syrjälä [this message]
2023-03-29 10:36     ` Nautiyal, Ankit K
2023-03-29 10:53       ` Ville Syrjälä
2023-03-29 11:30         ` Nautiyal, Ankit K
2023-03-29 11:35           ` Ville Syrjälä
2023-03-29 13:44             ` Lisovskiy, Stanislav
2023-03-29 14:05               ` Ville Syrjälä
2023-03-30 11:07               ` Nautiyal, Ankit K
2023-03-30 11:11             ` Nautiyal, Ankit K
2023-04-03 21:33               ` Manasi Navare
2023-04-04  5:13                 ` Nautiyal, Ankit K
2023-03-29 16:52 ` [Intel-gfx] ✗ Fi.CI.BUILD: failure for Update DSC Bigjoiner BW check (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=ZCQLhkwNGRnZkD4k@intel.com \
    --to=ville.syrjala@linux.intel.com \
    --cc=ankit.k.nautiyal@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