Skip to contentSkip to conversation

drm/i915: Adjust BXT HDMI port clock limits

PATCH Applied [email protected] 7 participants 12 messages Jul 6, 2015 – Jul 14, 2015

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 drm/i915: Adjust BXT HDMI port clock limits

From: Ville Syrjälä <[email protected]>

Since
commit e62925567c7926e78bc8ca976cde5c28ea265a49
Author: Vandana Kannan <[email protected]>
Date: Wed Jul 1 17:02:57 2015 +0530

drm/i915/bxt: BUNs related to port PLL

BXT DPLL can now generate frequencies in the 216-223 MHz range. Adjust the HDMI port clock checks to account for the reduced range of invalid frequencies.

Cc Vandana Kannan <[email protected]>
Cc Imre Deak <[email protected]>
---
 drivers/gpu/drm/i915/intel_hdmi.c | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)
drivers/gpu/drm/i915/intel_hdmi.c +6 -3
index c7e912b..70bad5b 100644
@@ -1174,9 +1174,12 @@ hdmi_port_clock_valid(struct intel_hdmi *hdmi,
 	if (clock > hdmi_port_clock_limit(hdmi, respect_dvi_limit))
 		return MODE_CLOCK_HIGH;
 
-	/* CHV/BXT DPLL can't generate 216-240 MHz */
-	if ((IS_CHERRYVIEW(dev) || IS_BROXTON(dev)) &&
-	    clock > 216000 && clock < 240000)
+	/* BXT DPLL can't generate 223-240 MHz */
+	if (IS_BROXTON(dev) && clock > 223333 && clock < 240000)
+		return MODE_CLOCK_RANGE;
+
+	/* CHV DPLL can't generate 216-240 MHz */
+	if (IS_CHERRYVIEW(dev) && clock > 216000 && clock < 240000)
 		return MODE_CLOCK_RANGE;
 
 	return MODE_OK;
Signature · 6 lines
2.3.6

_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
#1 lore raw
Quoted 25 lines · On 7/6/2015 5:14 PM, [email protected] wrote:

From: Ville Syrjälä <[email protected]>

Since
commit e62925567c7926e78bc8ca976cde5c28ea265a49
Author: Vandana Kannan <[email protected]>
Date: Wed Jul 1 17:02:57 2015 +0530

drm/i915/bxt: BUNs related to port PLL

BXT DPLL can now generate frequencies in the 216-223 MHz range. Adjust the HDMI port clock checks to account for the reduced range of invalid frequencies.

Cc Vandana Kannan <[email protected]>
Cc Imre Deak <[email protected]>
---
  drivers/gpu/drm/i915/intel_hdmi.c | 9 ++++++---
  1 file changed, 6 insertions(+), 3 deletions(-)
drivers/gpu/drm/i915/intel_hdmi.c +0 -0
index c7e912b..70bad5b 100644

drivers/gpu/drm/i915/intel_hdmi.c hdmi_port_clock_valid(struct intel_hdmi *hdmi, · line 1180

Quoted 10 lines
drivers/gpu/drm/i915/intel_hdmi.c +4 -3
@@ -1174,9 +1174,12 @@ hdmi_port_clock_valid(struct intel_hdmi *hdmi,
  	if (clock > hdmi_port_clock_limit(hdmi, respect_dvi_limit))
  		return MODE_CLOCK_HIGH;
 
-	/* CHV/BXT DPLL can't generate 216-240 MHz */
-	if ((IS_CHERRYVIEW(dev) || IS_BROXTON(dev)) &&
-	    clock > 216000 && clock < 240000)
+	/* BXT DPLL can't generate 223-240 MHz */
+	if (IS_BROXTON(dev) && clock > 223333 && clock < 240000)
+		return MODE_CLOCK_RANGE;
+

BSpec needs an update based on this ?
It shows
"
HDMI/DVI link rates: 0.2 to 3.0 GHz Non-SSC*

*2.17 - 2.4 GHz not supported
"

- Vandana

drivers/gpu/drm/i915/intel_hdmi.c hdmi_port_clock_valid(struct intel_hdmi *hdmi, · line 1185

Quoted 6 lines
drivers/gpu/drm/i915/intel_hdmi.c +2 -0
+	/* CHV DPLL can't generate 216-240 MHz */
+	if (IS_CHERRYVIEW(dev) && clock > 216000 && clock < 240000)
  		return MODE_CLOCK_RANGE;
 
  	return MODE_OK;

_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx

#2 lore raw
Quoted 42 lines · Vandana
Quoted 25 lines · On 7/6/2015 5:14 PM, [email protected] wrote:

From: Ville Syrjälä <[email protected]>

Since
commit e62925567c7926e78bc8ca976cde5c28ea265a49
Author: Vandana Kannan <[email protected]>
Date: Wed Jul 1 17:02:57 2015 +0530

drm/i915/bxt: BUNs related to port PLL

BXT DPLL can now generate frequencies in the 216-223 MHz range. Adjust the HDMI port clock checks to account for the reduced range of invalid frequencies.

Cc Vandana Kannan <[email protected]>
Cc Imre Deak <[email protected]>
---
  drivers/gpu/drm/i915/intel_hdmi.c | 9 ++++++---
  1 file changed, 6 insertions(+), 3 deletions(-)
drivers/gpu/drm/i915/intel_hdmi.c +0 -0
index c7e912b..70bad5b 100644

drivers/gpu/drm/i915/intel_hdmi.c hdmi_port_clock_valid(struct intel_hdmi *hdmi, · line 1180

Quoted 10 lines
drivers/gpu/drm/i915/intel_hdmi.c +4 -3
@@ -1174,9 +1174,12 @@ hdmi_port_clock_valid(struct intel_hdmi *hdmi,
  	if (clock > hdmi_port_clock_limit(hdmi, respect_dvi_limit))
  		return MODE_CLOCK_HIGH;
 
-	/* CHV/BXT DPLL can't generate 216-240 MHz */
-	if ((IS_CHERRYVIEW(dev) || IS_BROXTON(dev)) &&
-	    clock > 216000 && clock < 240000)
+	/* BXT DPLL can't generate 223-240 MHz */
+	if (IS_BROXTON(dev) && clock > 223333 && clock < 240000)
+		return MODE_CLOCK_RANGE;
+

BSpec needs an update based on this ?
It shows
"
HDMI/DVI link rates: 0.2 to 3.0 GHz Non-SSC*

Quoted 2 lines

*2.17 - 2.4 GHz not supported
"

Yes, this needs updating. Could you file a change request for it?

--Imre

Quoted 8 lines

- Vandana

drivers/gpu/drm/i915/intel_hdmi.c hdmi_port_clock_valid(struct intel_hdmi *hdmi, · line 1185

Quoted 6 lines
drivers/gpu/drm/i915/intel_hdmi.c +2 -0
+	/* CHV DPLL can't generate 216-240 MHz */
+	if (IS_CHERRYVIEW(dev) && clock > 216000 && clock < 240000)
  		return MODE_CLOCK_RANGE;
 
  	return MODE_OK;

_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx

Reviewed-by on v1 1/1
#3 lore raw
In reply to [email protected]
Quoted 9 lines · On ma, 2015-07-06 at 14:44 +0300, [email protected] wrote:

From: Ville Syrjälä <[email protected]>

Since
commit e62925567c7926e78bc8ca976cde5c28ea265a49
Author: Vandana Kannan <[email protected]>
Date: Wed Jul 1 17:02:57 2015 +0530

drm/i915/bxt: BUNs related to port PLL

Quoted 7 lines

BXT DPLL can now generate frequencies in the 216-223 MHz range. Adjust the HDMI port clock checks to account for the reduced range of invalid frequencies.

Cc Vandana Kannan <[email protected]>
Cc Imre Deak <[email protected]>

Ville wrote a tool for CHV that calculates the valid frequencies based on the algorithm in the kernel. With the help of that I verified that this matches the list of target frequencies bxt_find_best_dpll() will accept, so:

Quoted 14 lines
---
 drivers/gpu/drm/i915/intel_hdmi.c | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)
drivers/gpu/drm/i915/intel_hdmi.c +0 -2
index c7e912b..70bad5b 100644
@@ -1174,9 +1174,12 @@ hdmi_port_clock_valid(struct intel_hdmi *hdmi,
 	if (clock > hdmi_port_clock_limit(hdmi, respect_dvi_limit))
 		return MODE_CLOCK_HIGH;
 
-	/* CHV/BXT DPLL can't generate 216-240 MHz */
-	if ((IS_CHERRYVIEW(dev) || IS_BROXTON(dev)) &&

drivers/gpu/drm/i915/intel_hdmi.c hdmi_port_clock_valid(struct intel_hdmi *hdmi, · line 1185

Quoted 10 lines
drivers/gpu/drm/i915/intel_hdmi.c +6 -1
-	    clock > 216000 && clock < 240000)
+	/* BXT DPLL can't generate 223-240 MHz */
+	if (IS_BROXTON(dev) && clock > 223333 && clock < 240000)
+		return MODE_CLOCK_RANGE;
+
+	/* CHV DPLL can't generate 216-240 MHz */
+	if (IS_CHERRYVIEW(dev) && clock > 216000 && clock < 240000)
 		return MODE_CLOCK_RANGE;
 
 	return MODE_OK;

_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx

#4 lore raw
Quoted 14 lines · Imre Deak
Quoted 13 lines · On ma, 2015-07-06 at 14:44 +0300, [email protected] wrote:

From: Ville Syrjälä <[email protected]>

Since
commit e62925567c7926e78bc8ca976cde5c28ea265a49
Author: Vandana Kannan <[email protected]>
Date: Wed Jul 1 17:02:57 2015 +0530

drm/i915/bxt: BUNs related to port PLL

BXT DPLL can now generate frequencies in the 216-223 MHz range. Adjust the HDMI port clock checks to account for the reduced range of invalid frequencies.

Quoted 8 lines
Quoted 3 lines
Cc Vandana Kannan <[email protected]>
Cc Imre Deak <[email protected]>

Ville wrote a tool for CHV that calculates the valid frequencies based on the algorithm in the kernel. With the help of that I verified that this matches the list of target frequencies bxt_find_best_dpll() will accept, so:

Could we have that tool in i-g-t?

Signature · 5 lines
Damien
_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
#5 lore raw
Quoted 19 lines · Damien Lespiau
Quoted 18 lines · Imre Deak
Quoted 16 lines · On ma, 2015-07-06 at 14:44 +0300, [email protected] wrote:

From: Ville Syrjälä <[email protected]>

Since
commit e62925567c7926e78bc8ca976cde5c28ea265a49
Author: Vandana Kannan <[email protected]>
Date: Wed Jul 1 17:02:57 2015 +0530

drm/i915/bxt: BUNs related to port PLL

BXT DPLL can now generate frequencies in the 216-223 MHz range. Adjust the HDMI port clock checks to account for the reduced range of invalid frequencies.

Cc Vandana Kannan <[email protected]>
Cc Imre Deak <[email protected]>
Quoted 6 lines
Quoted 4 lines

Ville wrote a tool for CHV that calculates the valid frequencies based on the algorithm in the kernel. With the help of that I verified that this matches the list of target frequencies bxt_find_best_dpll() will accept, so:

Could we have that tool in i-g-t?

We could lift all the .find_dpll routines from the kernel into i-g-t. The only real concern is that we'll forget to update the i-g-t copies when changing the kernel. But I guess it would still be easier to just update them slightly when noticing that rather than having to lift them from the kernel all over again.

Signature · 6 lines
Ville Syrjälä
Intel OTC
_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
#6 lore raw
Quoted 25 lines · Ville Syrjälä
Quoted 24 lines · Damien Lespiau
Quoted 22 lines · Imre Deak
Quoted 9 lines · On ma, 2015-07-06 at 14:44 +0300, [email protected] wrote:

From: Ville Syrjälä <[email protected]>

Since
commit e62925567c7926e78bc8ca976cde5c28ea265a49
Author: Vandana Kannan <[email protected]>
Date: Wed Jul 1 17:02:57 2015 +0530

drm/i915/bxt: BUNs related to port PLL

Quoted 7 lines

BXT DPLL can now generate frequencies in the 216-223 MHz range. Adjust the HDMI port clock checks to account for the reduced range of invalid frequencies.

Cc Vandana Kannan <[email protected]>
Cc Imre Deak <[email protected]>

Ville wrote a tool for CHV that calculates the valid frequencies based on the algorithm in the kernel. With the help of that I verified that this matches the list of target frequencies bxt_find_best_dpll() will accept, so:

Quoted 7 lines
Quoted 1 line

Could we have that tool in i-g-t?

We could lift all the .find_dpll routines from the kernel into i-g-t. The only real concern is that we'll forget to update the i-g-t copies when changing the kernel. But I guess it would still be easier to just update them slightly when noticing that rather than having to lift them from the kernel all over again.

Right, while not ideal, I think having something in i-g-t, even if it diverges slightly (but then we can remind the patch author to update the i-g-t tool during review) is still better than not having that code around at all.

Signature · 5 lines
Damien
_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
#7 lore raw
Quoted 34 lines · Damien Lespiau
Quoted 25 lines · Ville Syrjälä
Quoted 24 lines · Damien Lespiau
Quoted 22 lines · Imre Deak
Quoted 9 lines · On ma, 2015-07-06 at 14:44 +0300, [email protected] wrote:

From: Ville Syrjälä <[email protected]>

Since
commit e62925567c7926e78bc8ca976cde5c28ea265a49
Author: Vandana Kannan <[email protected]>
Date: Wed Jul 1 17:02:57 2015 +0530

drm/i915/bxt: BUNs related to port PLL

Quoted 7 lines

BXT DPLL can now generate frequencies in the 216-223 MHz range. Adjust the HDMI port clock checks to account for the reduced range of invalid frequencies.

Cc Vandana Kannan <[email protected]>
Cc Imre Deak <[email protected]>

Ville wrote a tool for CHV that calculates the valid frequencies based on the algorithm in the kernel. With the help of that I verified that this matches the list of target frequencies bxt_find_best_dpll() will accept, so:

Quoted 7 lines
Quoted 1 line

Could we have that tool in i-g-t?

We could lift all the .find_dpll routines from the kernel into i-g-t. The only real concern is that we'll forget to update the i-g-t copies when changing the kernel. But I guess it would still be easier to just update them slightly when noticing that rather than having to lift them from the kernel all over again.

Quoted 4 lines

Right, while not ideal, I think having something in i-g-t, even if it diverges slightly (but then we can remind the patch author to update the i-g-t tool during review) is still better than not having that code around at all.

Another way to check this would be to inject EDIDs with hand-rolled timings that increment in small steps. Then we can try modesets on all the unfiltered ones vs. just manually adding it with addmode. If any mode gets filtered inconsistently in the mode list parsing compared to modeset code that would be a bug.

Unfortunately the hdmi injection stuff isn't ready yet. I'll create a jira for this idea.
-Daniel

Signature · 7 lines
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
#8 lore raw
Quoted 46 lines · Daniel Vetter
Quoted 34 lines · Damien Lespiau
Quoted 25 lines · Ville Syrjälä
Quoted 24 lines · Damien Lespiau
Quoted 22 lines · Imre Deak
Quoted 9 lines · On ma, 2015-07-06 at 14:44 +0300, [email protected] wrote:

From: Ville Syrjälä <[email protected]>

Since
commit e62925567c7926e78bc8ca976cde5c28ea265a49
Author: Vandana Kannan <[email protected]>
Date: Wed Jul 1 17:02:57 2015 +0530

drm/i915/bxt: BUNs related to port PLL

Quoted 7 lines

BXT DPLL can now generate frequencies in the 216-223 MHz range. Adjust the HDMI port clock checks to account for the reduced range of invalid frequencies.

Cc Vandana Kannan <[email protected]>
Cc Imre Deak <[email protected]>

Ville wrote a tool for CHV that calculates the valid frequencies based on the algorithm in the kernel. With the help of that I verified that this matches the list of target frequencies bxt_find_best_dpll() will accept, so:

Quoted 7 lines
Quoted 1 line

Could we have that tool in i-g-t?

We could lift all the .find_dpll routines from the kernel into i-g-t. The only real concern is that we'll forget to update the i-g-t copies when changing the kernel. But I guess it would still be easier to just update them slightly when noticing that rather than having to lift them from the kernel all over again.

Quoted 4 lines

Right, while not ideal, I think having something in i-g-t, even if it diverges slightly (but then we can remind the patch author to update the i-g-t tool during review) is still better than not having that code around at all.

Another way to check this would be to inject EDIDs with hand-rolled timings that increment in small steps. Then we can try modesets on all the unfiltered ones vs. just manually adding it with addmode. If any mode gets filtered inconsistently in the mode list parsing compared to modeset code that would be a bug.

Quoted 3 lines

Unfortunately the hdmi injection stuff isn't ready yet. I'll create a jira for this idea.
-Daniel

if you have dr. HDMI device you can set custom EDID in slots 6 and 7 - works great for this type of exercise with no additional necessary to try out.

Jim

_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx

#9 lore raw
Quoted 47 lines · Jim
Quoted 46 lines · Daniel Vetter
Quoted 34 lines · Damien Lespiau
Quoted 25 lines · Ville Syrjälä
Quoted 24 lines · Damien Lespiau
Quoted 22 lines · Imre Deak
Quoted 9 lines · On ma, 2015-07-06 at 14:44 +0300, [email protected] wrote:

From: Ville Syrjälä <[email protected]>

Since
commit e62925567c7926e78bc8ca976cde5c28ea265a49
Author: Vandana Kannan <[email protected]>
Date: Wed Jul 1 17:02:57 2015 +0530

drm/i915/bxt: BUNs related to port PLL

Quoted 7 lines

BXT DPLL can now generate frequencies in the 216-223 MHz range. Adjust the HDMI port clock checks to account for the reduced range of invalid frequencies.

Cc Vandana Kannan <[email protected]>
Cc Imre Deak <[email protected]>

Ville wrote a tool for CHV that calculates the valid frequencies based on the algorithm in the kernel. With the help of that I verified that this matches the list of target frequencies bxt_find_best_dpll() will accept, so:

Quoted 7 lines
Quoted 1 line

Could we have that tool in i-g-t?

We could lift all the .find_dpll routines from the kernel into i-g-t. The only real concern is that we'll forget to update the i-g-t copies when changing the kernel. But I guess it would still be easier to just update them slightly when noticing that rather than having to lift them from the kernel all over again.

Quoted 4 lines

Right, while not ideal, I think having something in i-g-t, even if it diverges slightly (but then we can remind the patch author to update the i-g-t tool during review) is still better than not having that code around at all.

Another way to check this would be to inject EDIDs with hand-rolled timings that increment in small steps. Then we can try modesets on all the unfiltered ones vs. just manually adding it with addmode. If any mode gets filtered inconsistently in the mode list parsing compared to modeset code that would be a bug.

Quoted 7 lines
Quoted 3 lines

Unfortunately the hdmi injection stuff isn't ready yet. I'll create a jira for this idea.
-Daniel

if you have dr. HDMI device you can set custom EDID in slots 6 and 7 - works great for this type of exercise with no additional necessary to try out.

The idea is to be able to run the testsuite with bare-bones machines and no need to send each developer a special piece of hw for each type of output. I know that there are tons of hw solutions for these testing problems, they don't seem to scale well enough.
-Daniel

Signature · 7 lines
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
#10 lore raw
In reply to Imre Deak
Quoted 18 lines · Imre Deak
Quoted 9 lines · On ma, 2015-07-06 at 14:44 +0300, [email protected] wrote:

From: Ville Syrjälä <[email protected]>

Since
commit e62925567c7926e78bc8ca976cde5c28ea265a49
Author: Vandana Kannan <[email protected]>
Date: Wed Jul 1 17:02:57 2015 +0530

drm/i915/bxt: BUNs related to port PLL

Quoted 7 lines

BXT DPLL can now generate frequencies in the 216-223 MHz range. Adjust the HDMI port clock checks to account for the reduced range of invalid frequencies.

Cc Vandana Kannan <[email protected]>
Cc Imre Deak <[email protected]>
Quoted 5 lines

Ville wrote a tool for CHV that calculates the valid frequencies based on the algorithm in the kernel. With the help of that I verified that this matches the list of target frequencies bxt_find_best_dpll() will accept, so:

Queued for -next, thanks for the patch.
-Daniel

Signature · 7 lines
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
Tested-by on v1 1/1
#11 lore raw
In reply to [email protected]

Task id: 6726 -------------------------------------Summary-------------------------------------
Platform Delta drm-intel-nightly Series Applied
ILK 303/303 303/303
SNB +3 309/316 312/316

IVB                                  343/343              343/343
BYT                                  285/285              285/285
HSW              +13                 367/381              380/381
-------------------------------------Detailed-------------------------------------
Platform  Test                                drm-intel-nightly          Series Applied
*SNB  igt@kms_mmio_vs_cs_flip@setcrtc_vs_cs_flip      DMESG_WARN(1)      PASS(1)
*SNB  igt@kms_mmio_vs_cs_flip@setplane_vs_cs_flip      DMESG_WARN(1)      PASS(1)
*SNB  igt@pm_rpm@cursor      DMESG_WARN(1)      PASS(1)
*SNB  igt@pm_rpm@cursor-dpms      DMESG_FAIL(1)      FAIL(1)
*HSW  igt@kms_mmio_vs_cs_flip@setplane_vs_cs_flip      DMESG_WARN(1)      PASS(1)
*HSW  igt@pm_lpsp@non-edp      DMESG_WARN(1)      PASS(1)
*HSW  igt@pm_rpm@debugfs-read      DMESG_WARN(1)      PASS(1)
*HSW  igt@pm_rpm@gem-idle      DMESG_WARN(1)      PASS(1)
*HSW  igt@pm_rpm@gem-mmap-gtt      DMESG_WARN(1)      PASS(1)
*HSW  igt@pm_rpm@gem-pread      DMESG_WARN(1)      PASS(1)
*HSW  igt@pm_rpm@i2c      DMESG_WARN(1)      PASS(1)
*HSW  igt@pm_rpm@modeset-non-lpsp      DMESG_WARN(1)      PASS(1)
*HSW  igt@pm_rpm@modeset-non-lpsp-stress-no-wait      DMESG_WARN(1)      PASS(1)
*HSW  igt@pm_rpm@pci-d3-state      DMESG_WARN(1)      PASS(1)
*HSW  igt@pm_rpm@reg-read-ioctl      DMESG_WARN(1)      PASS(1)
*HSW  igt@pm_rpm@rte      DMESG_WARN(1)      PASS(1)
*HSW  igt@pm_rpm@sysfs-read      DMESG_WARN(1)      PASS(1)

Note: You need to pay more attention to line start with '*'
_______________________________________________
Intel-gfx mailing list [email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx