dri-devel.lists.freedesktop.org archive mirror
 help / color / mirror / Atom feed
From: "Pandiyan, Dhinakaran" <dhinakaran.pandiyan@intel.com>
To: "intel-gfx@lists.freedesktop.org" <intel-gfx@lists.freedesktop.org>
Cc: "daniel.vetter@ffwll.ch" <daniel.vetter@ffwll.ch>,
	"dri-devel@lists.freedesktop.org"
	<dri-devel@lists.freedesktop.org>
Subject: Re: [PATCH 2/3] drm/dp/mst: Calculate total link bandwidth instead of hardcoding it
Date: Sat, 19 Nov 2016 02:01:21 +0000	[thread overview]
Message-ID: <1479521903.12812.47.camel@dk-H97M-D3H> (raw)
In-Reply-To: <1479434628-2373-3-git-send-email-dhinakaran.pandiyan@intel.com>

This patch along with https://patchwork.freedesktop.org/series/15305/
will fix https://bugs.freedesktop.org/show_bug.cgi?id=98141. I'd like
this to be reviewed independently since the other two patches in this
series require rework for atomic support.

-DK

On Thu, 2016-11-17 at 18:03 -0800, Dhinakaran Pandiyan wrote:
> The total or the nominal link bandwidth, which we save in terms of PBN, is
> a factor of link rate and lane count. But, currently we hardcode it to
> 2560 PBN. This results in incorrect computation of total slots.
> 
> E.g, 2 lane HBR2 configuration and 4k@60Hz, 24bpp mode
>   nominal link bw = 1080 MBps = 1280PBN = 64 slots
>   required bw 533.25 MHz*3 = 1599.75 MBps or 1896 PBN
>      with +0.6% margin = 1907.376 PBN = 96 slots
>   This is greater than the max. possible value of 64 slots. But, we
>   incorrectly compute available slots as 2560 PBN = 128 slots and don't
>   return error.
> 
> So, let's fix this by calculating the total link bandwidth as
> link bw (PBN) = BW per time slot(PBN) * max. time slots , where max. time
> slots is 64
> 
> Signed-off-by: Dhinakaran Pandiyan <dhinakaran.pandiyan@intel.com>
> ---
>  drivers/gpu/drm/drm_dp_mst_topology.c | 5 ++---
>  1 file changed, 2 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/gpu/drm/drm_dp_mst_topology.c b/drivers/gpu/drm/drm_dp_mst_topology.c
> index 04e4571..26dfd99 100644
> --- a/drivers/gpu/drm/drm_dp_mst_topology.c
> +++ b/drivers/gpu/drm/drm_dp_mst_topology.c
> @@ -2038,9 +2038,8 @@ int drm_dp_mst_topology_mgr_set_mst(struct drm_dp_mst_topology_mgr *mgr, bool ms
>  			ret = -EINVAL;
>  			goto out_unlock;
>  		}
> -
> -		mgr->total_pbn = 2560;
> -		mgr->total_slots = DIV_ROUND_UP(mgr->total_pbn, mgr->pbn_div);
> +		mgr->total_pbn = 64 * mgr->pbn_div;
> +		mgr->total_slots = 64;
>  		mgr->avail_slots = mgr->total_slots;
>  
>  		/* add initial branch device at LCT 1 */

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

  reply	other threads:[~2016-11-19  2:01 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-11-18  2:03 [PATCH 0/3] Track available link bandwidth for DP MST Dhinakaran Pandiyan
2016-11-18  2:03 ` [PATCH 1/3] drm/i915/dp: Fail DP MST config when there are not enough vcpi slots Dhinakaran Pandiyan
2016-11-18  8:43   ` Daniel Vetter
2016-11-18  9:17     ` Daniel Vetter
2016-11-19  0:04     ` Pandiyan, Dhinakaran
2016-11-21  9:09       ` [Intel-gfx] " Daniel Vetter
2016-11-18  2:03 ` [PATCH 2/3] drm/dp/mst: Calculate total link bandwidth instead of hardcoding it Dhinakaran Pandiyan
2016-11-19  2:01   ` Pandiyan, Dhinakaran [this message]
2016-11-29 20:58   ` Ville Syrjälä
2016-11-29 21:04     ` Pandiyan, Dhinakaran
2016-11-18  2:03 ` [PATCH 3/3] drm/dp/mst: Track available time slots in DP Multi-Stream Transport Packet Dhinakaran Pandiyan
2016-11-18  5:53   ` kbuild test robot
2016-11-18  6:19   ` Manasi Navare
2016-11-18  6:57   ` [Intel-gfx] " Chris Wilson
2016-11-18  8:44     ` Daniel Vetter
2016-11-19  0:07     ` Pandiyan, Dhinakaran

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=1479521903.12812.47.camel@dk-H97M-D3H \
    --to=dhinakaran.pandiyan@intel.com \
    --cc=daniel.vetter@ffwll.ch \
    --cc=dri-devel@lists.freedesktop.org \
    --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;
as well as URLs for NNTP newsgroup(s).