public inbox for intel-gfx@lists.freedesktop.org
 help / color / mirror / Atom feed
* [PATCH v2 1/2] drm/i915/mst: Validate modes against available link bandwidth
@ 2016-08-12 21:00 Anusha Srivatsa
  2016-08-12 21:00 ` [PATCH v2 2/2] drm/mst: A Helper function that returns " Anusha Srivatsa
                   ` (3 more replies)
  0 siblings, 4 replies; 7+ messages in thread
From: Anusha Srivatsa @ 2016-08-12 21:00 UTC (permalink / raw)
  To: intel-gfx; +Cc: dhinakaran.pandiyan

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.

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)
-- 
2.7.4

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

^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [PATCH v2 2/2] drm/mst: A Helper function that returns available link bandwidth
  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 ` Anusha Srivatsa
  2016-08-12 21:53 ` [PATCH v2 1/2] drm/i915/mst: Validate modes against " kbuild test robot
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 7+ messages in thread
From: Anusha Srivatsa @ 2016-08-12 21:00 UTC (permalink / raw)
  To: intel-gfx; +Cc: Anusha Srivatsa, dhinakaran.pandiyan, dri-devel

Add a function that returns the available link bandwidth for
MST port so that we can accurately determine whether a new
mode is valid for the link or not.

v2: Put the Signed-off to the end of commit message

Cc: dri-devel@lists.freedesktop.org
Cc: dhinakaran.pandiyan@intel.com

Signed-off-by: Anusha Srivatsa <anusha.srivatsa@intel.com>
---
 drivers/gpu/drm/drm_dp_mst_topology.c | 12 ++++++++++++
 include/drm/drm_dp_mst_helper.h       |  1 +
 2 files changed, 13 insertions(+)

diff --git a/drivers/gpu/drm/drm_dp_mst_topology.c b/drivers/gpu/drm/drm_dp_mst_topology.c
index 04e4571..7a239f6 100644
--- a/drivers/gpu/drm/drm_dp_mst_topology.c
+++ b/drivers/gpu/drm/drm_dp_mst_topology.c
@@ -43,6 +43,8 @@ static bool dump_dp_payload_table(struct drm_dp_mst_topology_mgr *mgr,
 				  char *buf);
 static int test_calc_pbn_mode(void);
 
+int drm_dp_mst_get_avail_pbn(struct drm_dp_mst_topology_mgr *mgr, struct drm_dp_mst_port *port);
+
 static void drm_dp_put_port(struct drm_dp_mst_port *port);
 
 static int drm_dp_dpcd_write_payload(struct drm_dp_mst_topology_mgr *mgr,
@@ -2730,6 +2732,16 @@ static int test_calc_pbn_mode(void)
 	return 0;
 }
 
+int drm_dp_mst_get_avail_pbn(struct drm_dp_mst_topology_mgr *mgr, struct drm_dp_mst_port *port)
+{
+        port = drm_dp_get_validated_port_ref(mgr,port);
+        if (port)
+                return port->available_pbn;
+
+        return -EINVAL;
+}
+EXPORT_SYMBOL(drm_dp_mst_get_avail_pbn);
+
 /* we want to kick the TX after we've ack the up/down IRQs. */
 static void drm_dp_mst_kick_tx(struct drm_dp_mst_topology_mgr *mgr)
 {
diff --git a/include/drm/drm_dp_mst_helper.h b/include/drm/drm_dp_mst_helper.h
index 0032076..74dc4ab 100644
--- a/include/drm/drm_dp_mst_helper.h
+++ b/include/drm/drm_dp_mst_helper.h
@@ -576,6 +576,7 @@ struct edid *drm_dp_mst_get_edid(struct drm_connector *connector, struct drm_dp_
 
 int drm_dp_calc_pbn_mode(int clock, int bpp);
 
+int drm_dp_mst_get_avail_pbn(struct drm_dp_mst_topology_mgr *mgr, struct drm_dp_mst_port *port);
 
 bool drm_dp_mst_allocate_vcpi(struct drm_dp_mst_topology_mgr *mgr, struct drm_dp_mst_port *port, int pbn, int *slots);
 
-- 
2.7.4

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply related	[flat|nested] 7+ messages in thread

* Re: [PATCH v2 1/2] drm/i915/mst: Validate modes against available link bandwidth
  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 ` 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 ` [PATCH v2 1/2] " Jani Nikula
  3 siblings, 1 reply; 7+ messages in thread
From: kbuild test robot @ 2016-08-12 21:53 UTC (permalink / raw)
  To: Anusha Srivatsa; +Cc: intel-gfx, kbuild-all, dhinakaran.pandiyan

[-- Attachment #1: Type: text/plain, Size: 2022 bytes --]

Hi Anusha,

[auto build test ERROR on drm/drm-next]
[also build test ERROR on v4.8-rc1 next-20160812]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]

url:    https://github.com/0day-ci/linux/commits/Anusha-Srivatsa/drm-i915-mst-Validate-modes-against-available-link-bandwidth/20160813-050818
base:   git://people.freedesktop.org/~airlied/linux.git drm-next
config: i386-randconfig-x014-201632 (attached as .config)
compiler: gcc-6 (Debian 6.1.1-9) 6.1.1 20160705
reproduce:
        # save the attached .config to linux build tree
        make ARCH=i386 

Note: the linux-review/Anusha-Srivatsa/drm-i915-mst-Validate-modes-against-available-link-bandwidth/20160813-050818 HEAD 413b1bb45dc2c58540a17c5ca642b6aee2c97405 builds fine.
      It only hurts bisectibility.

All errors (new ones prefixed by >>):

   drivers/gpu/drm/i915/intel_dp_mst.c: In function 'intel_dp_mst_mode_valid':
>> drivers/gpu/drm/i915/intel_dp_mst.c:363:14: error: implicit declaration of function 'drm_dp_mst_get_avail_pbn' [-Werror=implicit-function-declaration]
     avail_pbn = drm_dp_mst_get_avail_pbn(mgr, port);
                 ^~~~~~~~~~~~~~~~~~~~~~~~
   cc1: some warnings being treated as errors

vim +/drm_dp_mst_get_avail_pbn +363 drivers/gpu/drm/i915/intel_dp_mst.c

   357		struct intel_connector *intel_connector = to_intel_connector(connector);
   358		struct intel_dp *intel_dp = intel_connector->mst_port;
   359		struct drm_dp_mst_topology_mgr *mgr = &intel_dp->mst_mgr;
   360		struct drm_dp_mst_port *port = (struct drm_dp_mst_port *) (intel_connector->port);
   361		int max_dotclk = to_i915(connector->dev)->max_dotclk_freq;
   362	
 > 363		avail_pbn = drm_dp_mst_get_avail_pbn(mgr, port);
   364		req_pbn = drm_dp_calc_pbn_mode(mode->clock, 24);
   365		if (req_pbn > avail_pbn)
   366			return MODE_H_ILLEGAL;

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation

[-- Attachment #2: .config.gz --]
[-- Type: application/octet-stream, Size: 26787 bytes --]

[-- Attachment #3: Type: text/plain, Size: 160 bytes --]

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

^ permalink raw reply	[flat|nested] 7+ messages in thread

* ✗ Ro.CI.BAT: failure for series starting with [v2,1/2] drm/i915/mst: Validate modes against available link bandwidth
  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-13  5:45 ` Patchwork
  2016-08-16 11:23 ` [PATCH v2 1/2] " Jani Nikula
  3 siblings, 0 replies; 7+ messages in thread
From: Patchwork @ 2016-08-13  5:45 UTC (permalink / raw)
  To: Anusha Srivatsa; +Cc: intel-gfx

== Series Details ==

Series: series starting with [v2,1/2] drm/i915/mst: Validate modes against available link bandwidth
URL   : https://patchwork.freedesktop.org/series/11039/
State : failure

== Summary ==

Series 11039v1 Series without cover letter
http://patchwork.freedesktop.org/api/1.0/series/11039/revisions/1/mbox

Test kms_cursor_legacy:
        Subgroup basic-flip-vs-cursor-varying-size:
                fail       -> PASS       (ro-byt-n2820)
                pass       -> FAIL       (ro-bdw-i5-5250u)
                pass       -> DMESG-FAIL (fi-skl-i7-6700k)
Test kms_pipe_crc_basic:
        Subgroup suspend-read-crc-pipe-a:
                dmesg-warn -> PASS       (ro-bdw-i7-5600u)
        Subgroup suspend-read-crc-pipe-b:
                pass       -> DMESG-WARN (ro-bdw-i7-5600u)
                skip       -> DMESG-WARN (ro-bdw-i5-5250u)
        Subgroup suspend-read-crc-pipe-c:
                pass       -> DMESG-WARN (ro-bdw-i7-5600u)

fi-hsw-i7-4770k  total:244  pass:222  dwarn:0   dfail:0   fail:0   skip:22 
fi-kbl-qkkr      total:244  pass:186  dwarn:29  dfail:0   fail:3   skip:26 
fi-skl-i7-6700k  total:244  pass:208  dwarn:4   dfail:2   fail:2   skip:28 
fi-snb-i7-2600   total:244  pass:202  dwarn:0   dfail:0   fail:0   skip:42 
ro-bdw-i5-5250u  total:240  pass:219  dwarn:3   dfail:0   fail:1   skip:17 
ro-bdw-i7-5600u  total:240  pass:205  dwarn:2   dfail:0   fail:1   skip:32 
ro-bsw-n3050     total:240  pass:194  dwarn:0   dfail:0   fail:4   skip:42 
ro-byt-n2820     total:240  pass:198  dwarn:0   dfail:0   fail:2   skip:40 
ro-hsw-i3-4010u  total:240  pass:214  dwarn:0   dfail:0   fail:0   skip:26 
ro-hsw-i7-4770r  total:240  pass:185  dwarn:0   dfail:0   fail:0   skip:55 
ro-ilk1-i5-650   total:235  pass:173  dwarn:0   dfail:0   fail:2   skip:60 
ro-ivb-i7-3770   total:240  pass:205  dwarn:0   dfail:0   fail:0   skip:35 
ro-ivb2-i7-3770  total:240  pass:209  dwarn:0   dfail:0   fail:0   skip:31 
ro-skl3-i5-6260u total:240  pass:222  dwarn:0   dfail:0   fail:4   skip:14 

Results at /archive/results/CI_IGT_test/RO_Patchwork_1858/

3612906 drm-intel-nightly: 2016y-08m-12d-15h-08m-02s UTC integration manifest
200cbdb drm/mst: A Helper function that returns available link bandwidth
813da48 drm/i915/mst: Validate modes against available link bandwidth

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

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH v2 1/2] drm/i915/mst: Validate modes against available link bandwidth
  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
  0 siblings, 0 replies; 7+ messages in thread
From: Jani Nikula @ 2016-08-16 11:19 UTC (permalink / raw)
  To: kbuild test robot, Anusha Srivatsa
  Cc: intel-gfx, kbuild-all, dhinakaran.pandiyan

On Sat, 13 Aug 2016, kbuild test robot <lkp@intel.com> wrote:
> Hi Anusha,
>
> [auto build test ERROR on drm/drm-next]
> [also build test ERROR on v4.8-rc1 next-20160812]
> [if your patch is applied to the wrong git tree, please drop us a note to help improve the system]
>
> url:    https://github.com/0day-ci/linux/commits/Anusha-Srivatsa/drm-i915-mst-Validate-modes-against-available-link-bandwidth/20160813-050818
> base:   git://people.freedesktop.org/~airlied/linux.git drm-next
> config: i386-randconfig-x014-201632 (attached as .config)
> compiler: gcc-6 (Debian 6.1.1-9) 6.1.1 20160705
> reproduce:
>         # save the attached .config to linux build tree
>         make ARCH=i386 
>
> Note: the linux-review/Anusha-Srivatsa/drm-i915-mst-Validate-modes-against-available-link-bandwidth/20160813-050818 HEAD 413b1bb45dc2c58540a17c5ca642b6aee2c97405 builds fine.
>       It only hurts bisectibility.

The patches are in the wrong order.

BR,
Jani.

>
> All errors (new ones prefixed by >>):
>
>    drivers/gpu/drm/i915/intel_dp_mst.c: In function 'intel_dp_mst_mode_valid':
>>> drivers/gpu/drm/i915/intel_dp_mst.c:363:14: error: implicit declaration of function 'drm_dp_mst_get_avail_pbn' [-Werror=implicit-function-declaration]
>      avail_pbn = drm_dp_mst_get_avail_pbn(mgr, port);
>                  ^~~~~~~~~~~~~~~~~~~~~~~~
>    cc1: some warnings being treated as errors
>
> vim +/drm_dp_mst_get_avail_pbn +363 drivers/gpu/drm/i915/intel_dp_mst.c
>
>    357		struct intel_connector *intel_connector = to_intel_connector(connector);
>    358		struct intel_dp *intel_dp = intel_connector->mst_port;
>    359		struct drm_dp_mst_topology_mgr *mgr = &intel_dp->mst_mgr;
>    360		struct drm_dp_mst_port *port = (struct drm_dp_mst_port *) (intel_connector->port);
>    361		int max_dotclk = to_i915(connector->dev)->max_dotclk_freq;
>    362	
>  > 363		avail_pbn = drm_dp_mst_get_avail_pbn(mgr, port);
>    364		req_pbn = drm_dp_calc_pbn_mode(mode->clock, 24);
>    365		if (req_pbn > avail_pbn)
>    366			return MODE_H_ILLEGAL;
>
> ---
> 0-DAY kernel test infrastructure                Open Source Technology Center
> https://lists.01.org/pipermail/kbuild-all                   Intel Corporation
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/intel-gfx

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

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH v2 1/2] drm/i915/mst: Validate modes against available link bandwidth
  2016-08-12 21:00 [PATCH v2 1/2] drm/i915/mst: Validate modes against available link bandwidth Anusha Srivatsa
                   ` (2 preceding siblings ...)
  2016-08-13  5:45 ` ✗ Ro.CI.BAT: failure for series starting with [v2,1/2] " Patchwork
@ 2016-08-16 11:23 ` Jani Nikula
  2016-08-17 17:42   ` Srivatsa, Anusha
  3 siblings, 1 reply; 7+ messages in thread
From: Jani Nikula @ 2016-08-16 11:23 UTC (permalink / raw)
  To: Anusha Srivatsa, intel-gfx; +Cc: dhinakaran.pandiyan

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

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH v2 1/2] drm/i915/mst: Validate modes against available link bandwidth
  2016-08-16 11:23 ` [PATCH v2 1/2] " Jani Nikula
@ 2016-08-17 17:42   ` Srivatsa, Anusha
  0 siblings, 0 replies; 7+ messages in thread
From: Srivatsa, Anusha @ 2016-08-17 17:42 UTC (permalink / raw)
  To: Jani Nikula, intel-gfx@lists.freedesktop.org; +Cc: Pandiyan, Dhinakaran



-----Original Message-----
From: Jani Nikula [mailto:jani.nikula@linux.intel.com] 
Sent: Tuesday, August 16, 2016 4:24 AM
To: Srivatsa, Anusha <anusha.srivatsa@intel.com>; intel-gfx@lists.freedesktop.org
Cc: Pandiyan, Dhinakaran <dhinakaran.pandiyan@intel.com>
Subject: Re: [Intel-gfx] [PATCH v2 1/2] drm/i915/mst: Validate modes against available link bandwidth

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.

The link training is done once for the link and not everytime we add a new sink device. In MST mode, as and when a new sink device is added, the total link bandwidth reduces and hence we need to compare with the available bandwidth rather than the total link bandwidth.

-Anusha

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

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2016-08-17 17:42 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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 ` [PATCH v2 1/2] " Jani Nikula
2016-08-17 17:42   ` Srivatsa, Anusha

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox