Intel-GFX Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: "Nautiyal, Ankit K" <ankit.k.nautiyal@intel.com>
To: "Lisovskiy, Stanislav" <stanislav.lisovskiy@intel.com>
Cc: intel-gfx@lists.freedesktop.org
Subject: Re: [Intel-gfx] [PATCH] drm/i915/dp: Don't roundup max bpp, while computing compressed bpp
Date: Thu, 9 Mar 2023 17:46:51 +0530	[thread overview]
Message-ID: <c8eaeaf7-0375-57f5-f74e-9baf46ca2500@intel.com> (raw)
In-Reply-To: <ZAm4gw1mgdzEgkiv@intel.com>

Thanks Stan for the review.

On 3/9/2023 4:14 PM, Lisovskiy, Stanislav wrote:
> On Thu, Feb 23, 2023 at 05:25:09PM +0530, Ankit Nautiyal wrote:
>> While computing compressed bpp, maximum value of bits_per_pixel is
>> calculated that can be supported with the given link configuration
>> for a given mode. Avoid rounding up of this max bits_per_pixel.
>> Also improve documentation for computing max bits_per_pixel.
>>
>> Signed-off-by: Ankit Nautiyal <ankit.k.nautiyal@intel.com>
> Reviewed-by: Stanislav Lisovskiy <stanislav.lisovskiy@intel.com>
>
>> ---
>>   drivers/gpu/drm/i915/display/intel_dp.c | 14 ++++++++++++--
>>   1 file changed, 12 insertions(+), 2 deletions(-)
>>
>> diff --git a/drivers/gpu/drm/i915/display/intel_dp.c b/drivers/gpu/drm/i915/display/intel_dp.c
>> index b77bd4565864..51e9d0b2d8b3 100644
>> --- a/drivers/gpu/drm/i915/display/intel_dp.c
>> +++ b/drivers/gpu/drm/i915/display/intel_dp.c
>> @@ -716,9 +716,19 @@ u16 intel_dp_dsc_get_output_bpp(struct drm_i915_private *i915,
>>   	 * (LinkSymbolClock)* 8 * (TimeSlots / 64)
>>   	 * for SST -> TimeSlots is 64(i.e all TimeSlots that are available)
>>   	 * for MST -> TimeSlots has to be calculated, based on mode requirements
>> +	 *
>> +	 * Due to FEC overhead, the available bw is reduced to 97.2261%.
>> +	 * To support the given mode:
>> +	 * Bandwidth required should be <= Available link Bandwidth * FEC Overhead
>> +	 * =>ModeClock * bits_per_pixel <= Available Link Bandwidth * FEC Overhead
>> +	 * =>bits_per_pixel <= Available link Bandwidth * FEC Overhead / ModeClock
>> +	 * =>bits_per_pixel <= (NumberOfLanes * LinkSymbolClock) * 8 (TimeSlots / 64) /
>> +	 *		       (ModeClock / FEC Overhead)
>> +	 * =>bits_per_pixel <= (NumberOfLanes * LinkSymbolClock * TimeSlots) /
>> +	 *		       (ModeClock / FEC Overhead * 8)
>>   	 */
>> -	bits_per_pixel = DIV_ROUND_UP((link_clock * lane_count) * timeslots,
>> -				      intel_dp_mode_to_fec_clock(mode_clock) * 8);
>> +	bits_per_pixel = ((link_clock * lane_count) * timeslots) /
>> +			 (intel_dp_mode_to_fec_clock(mode_clock) * 8);
>>   
>>   	drm_dbg_kms(&i915->drm, "Max link bpp is %u for %u timeslots "
>>   				"total bw %u pixel clock %u\n",
>> -- 
>> 2.25.1
>>

      reply	other threads:[~2023-03-09 12:17 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-02-23 11:55 [Intel-gfx] [PATCH] drm/i915/dp: Don't roundup max bpp, while computing compressed bpp Ankit Nautiyal
2023-02-23 14:05 ` [Intel-gfx] ✓ Fi.CI.BAT: success for " Patchwork
2023-02-23 18:05 ` [Intel-gfx] ✗ Fi.CI.IGT: failure " Patchwork
2023-03-09 10:44 ` [Intel-gfx] [PATCH] " Lisovskiy, Stanislav
2023-03-09 12:16   ` Nautiyal, Ankit K [this message]

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=c8eaeaf7-0375-57f5-f74e-9baf46ca2500@intel.com \
    --to=ankit.k.nautiyal@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox