public inbox for intel-gfx@lists.freedesktop.org
 help / color / mirror / Atom feed
From: Jani Nikula <jani.nikula@linux.intel.com>
To: Anusha Srivatsa <anusha.srivatsa@intel.com>,
	intel-gfx@lists.freedesktop.org
Cc: dhinakaran.pandiyan@intel.com
Subject: Re: [PATCH v2 1/2] drm/i915/mst: Validate modes against	available link bandwidth
Date: Tue, 16 Aug 2016 14:23:37 +0300	[thread overview]
Message-ID: <87k2fht0sm.fsf@intel.com> (raw)
In-Reply-To: <1471035647-5384-1-git-send-email-anusha.srivatsa@intel.com>

On Sat, 13 Aug 2016, Anusha Srivatsa <anusha.srivatsa@intel.com> wrote:
> Validate the modes against available link bandwidth rather than
> maximum link bandwidth so that we have a better idea as to whether
> a proposed mode can truly run beside existing stream.

But if the existing link was trained for the existing stream, there
isn't necessarily any bandwidth left. I'd think this is something that
the up front link training + atomic mode setting will take care of.

BR,
Jani.



>
> v2: Put the Signed-off to the end of the commit message
>
> Cc: dhinakaran.pandiyan@intel.com
>
> Signed-off-by: Anusha Srivatsa <anusha.srivatsa@intel.com>
> ---
>  drivers/gpu/drm/i915/intel_dp_mst.c | 14 ++++++++++++--
>  1 file changed, 12 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/intel_dp_mst.c b/drivers/gpu/drm/i915/intel_dp_mst.c
> index 629337d..e7e87d7 100644
> --- a/drivers/gpu/drm/i915/intel_dp_mst.c
> +++ b/drivers/gpu/drm/i915/intel_dp_mst.c
> @@ -352,13 +352,23 @@ static enum drm_mode_status
>  intel_dp_mst_mode_valid(struct drm_connector *connector,
>  			struct drm_display_mode *mode)
>  {
> +	int req_pbn = 0;
> +	int avail_pbn = 0;
> +	struct intel_connector *intel_connector = to_intel_connector(connector);
> +	struct intel_dp *intel_dp = intel_connector->mst_port;
> +	struct drm_dp_mst_topology_mgr *mgr = &intel_dp->mst_mgr;
> +	struct drm_dp_mst_port *port = (struct drm_dp_mst_port *) (intel_connector->port);
>  	int max_dotclk = to_i915(connector->dev)->max_dotclk_freq;
>  
> -	/* TODO - validate mode against available PBN for link */
> +	avail_pbn = drm_dp_mst_get_avail_pbn(mgr, port);
> +	req_pbn = drm_dp_calc_pbn_mode(mode->clock, 24);
> +	if (req_pbn > avail_pbn)
> +		return MODE_H_ILLEGAL;
> +
>  	if (mode->clock < 10000)
>  		return MODE_CLOCK_LOW;
>  
> -	if (mode->flags & DRM_MODE_FLAG_DBLCLK)
> +        if (mode->flags & DRM_MODE_FLAG_DBLCLK)
>  		return MODE_H_ILLEGAL;
>  
>  	if (mode->clock > max_dotclk)

-- 
Jani Nikula, Intel Open Source Technology Center
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

  parent reply	other threads:[~2016-08-16 11:23 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-08-12 21:00 [PATCH v2 1/2] drm/i915/mst: Validate modes against available link bandwidth Anusha Srivatsa
2016-08-12 21:00 ` [PATCH v2 2/2] drm/mst: A Helper function that returns " Anusha Srivatsa
2016-08-12 21:53 ` [PATCH v2 1/2] drm/i915/mst: Validate modes against " kbuild test robot
2016-08-16 11:19   ` Jani Nikula
2016-08-13  5:45 ` ✗ Ro.CI.BAT: failure for series starting with [v2,1/2] " Patchwork
2016-08-16 11:23 ` Jani Nikula [this message]
2016-08-17 17:42   ` [PATCH v2 1/2] " Srivatsa, Anusha

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=87k2fht0sm.fsf@intel.com \
    --to=jani.nikula@linux.intel.com \
    --cc=anusha.srivatsa@intel.com \
    --cc=dhinakaran.pandiyan@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