Skip to contentSkip to conversation

drm/i915/bxt: Set time interval unit to 0.833us

PATCH In review Sagar Arun Kamble 3 participants 6 messages Sep 18, 2015 – Oct 7, 2015

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

PATCH 1/1 drm/i915/bxt: Set time interval unit to 0.833us

From: Akash Goel <[email protected]>

---
 drivers/gpu/drm/i915/i915_reg.h | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
drivers/gpu/drm/i915/i915_reg.h +4 -1
index 67bf205..6b1998c 100644
@@ -2802,8 +2802,11 @@ enum skl_disp_power_wells {
 
 #define INTERVAL_1_28_US(us)	(((us) * 100) >> 7)
 #define INTERVAL_1_33_US(us)	(((us) * 3)   >> 2)
+#define INTERVAL_0_833_US(us)	(((us) * 6) / 5)
 #define GT_INTERVAL_FROM_US(dev_priv, us) (IS_GEN9(dev_priv) ? \
-				INTERVAL_1_33_US(us) : \
+				(IS_BROXTON(dev_priv) ? \
+				INTERVAL_0_833_US(us) : \
+				INTERVAL_1_33_US(us)) : \
 				INTERVAL_1_28_US(us))
 
 /*
Signature · 6 lines
1.9.1

_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
#1 lore raw
Quoted 14 lines · Sagar Arun Kamble

From: Akash Goel <[email protected]>

---
 drivers/gpu/drm/i915/i915_reg.h | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
drivers/gpu/drm/i915/i915_reg.h +0 -0
index 67bf205..6b1998c 100644

drivers/gpu/drm/i915/i915_reg.h enum skl_disp_power_wells { · line 2810

Quoted 10 lines
drivers/gpu/drm/i915/i915_reg.h +4 -1
@@ -2802,8 +2802,11 @@ enum skl_disp_power_wells {
 
 #define INTERVAL_1_28_US(us)	(((us) * 100) >> 7)
 #define INTERVAL_1_33_US(us)	(((us) * 3)   >> 2)
+#define INTERVAL_0_833_US(us)	(((us) * 6) / 5)
 #define GT_INTERVAL_FROM_US(dev_priv, us) (IS_GEN9(dev_priv) ? \
-				INTERVAL_1_33_US(us) : \
+				(IS_BROXTON(dev_priv) ? \
+				INTERVAL_0_833_US(us) : \
+				INTERVAL_1_33_US(us)) : \
 				INTERVAL_1_28_US(us))

Note that neither of the GEN9 values are mentioned in Bspec, so a request for update should be filed there. I haven't found any other place that would document this either, could you point me to it?

--Imre

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

Reviewed-by on v1 1/1
#2 lore raw
In reply to Sagar Arun Kamble
Quoted 5 lines · Sagar Arun Kamble

From: Akash Goel <[email protected]>

The comment about units in gen6_set_rps_thresholds() is outdated, so you could update that while at it. In any case this looks ok, so:

Quoted 11 lines
---
 drivers/gpu/drm/i915/i915_reg.h | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
drivers/gpu/drm/i915/i915_reg.h +0 -0
index 67bf205..6b1998c 100644
@@ -2802,8 +2802,11 @@ enum skl_disp_power_wells {
 
 #define INTERVAL_1_28_US(us)	(((us) * 100) >> 7)

drivers/gpu/drm/i915/i915_reg.h enum skl_disp_power_wells { · line 2812

Quoted 10 lines
drivers/gpu/drm/i915/i915_reg.h +4 -1
 #define INTERVAL_1_33_US(us)	(((us) * 3)   >> 2)
+#define INTERVAL_0_833_US(us)	(((us) * 6) / 5)
 #define GT_INTERVAL_FROM_US(dev_priv, us) (IS_GEN9(dev_priv) ? \
-				INTERVAL_1_33_US(us) : \
+				(IS_BROXTON(dev_priv) ? \
+				INTERVAL_0_833_US(us) : \
+				INTERVAL_1_33_US(us)) : \
 				INTERVAL_1_28_US(us))
 
 /*

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

#3 lore raw
Quoted 10 lines · Imre Deak
Quoted 5 lines · Sagar Arun Kamble

From: Akash Goel <[email protected]>

The comment about units in gen6_set_rps_thresholds() is outdated, so you could update that while at it. In any case this looks ok, so:

In your previous review you noticed that Bspec is still outdated. Has that been fixed meanwhile?
-Daniel

Quoted 28 lines
Quoted 12 lines
---
 drivers/gpu/drm/i915/i915_reg.h | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
drivers/gpu/drm/i915/i915_reg.h +0 -0
index 67bf205..6b1998c 100644
@@ -2802,8 +2802,11 @@ enum skl_disp_power_wells {
 
 #define INTERVAL_1_28_US(us)	(((us) * 100) >> 7)

drivers/gpu/drm/i915/i915_reg.h enum skl_disp_power_wells { · line 2812

Quoted 10 lines
drivers/gpu/drm/i915/i915_reg.h +4 -1
 #define INTERVAL_1_33_US(us)	(((us) * 3)   >> 2)
+#define INTERVAL_0_833_US(us)	(((us) * 6) / 5)
 #define GT_INTERVAL_FROM_US(dev_priv, us) (IS_GEN9(dev_priv) ? \
-				INTERVAL_1_33_US(us) : \
+				(IS_BROXTON(dev_priv) ? \
+				INTERVAL_0_833_US(us) : \
+				INTERVAL_1_33_US(us)) : \
 				INTERVAL_1_28_US(us))
 
 /*

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

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
#4 lore raw
Quoted 8 lines · Daniel Vetter
Quoted 7 lines · Imre Deak
Quoted 5 lines · Sagar Arun Kamble

From: Akash Goel <[email protected]>

Quoted 6 lines
Quoted 3 lines

The comment about units in gen6_set_rps_thresholds() is outdated, so you could update that while at it. In any case this looks ok, so:

In your previous review you noticed that Bspec is still outdated. Has that been fixed meanwhile?

Yep, Sagar pointed to a page in BSpec where the relevant clocks are defined ("Timestamp bases") and he also filed a change request in Bspec now to update the register description itself accordingly. Should've mentioned this when adding my r-b.

--Imre

Quoted 31 lines

-Daniel

Quoted 28 lines
Quoted 12 lines
---
 drivers/gpu/drm/i915/i915_reg.h | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
drivers/gpu/drm/i915/i915_reg.h +0 -0
index 67bf205..6b1998c 100644
@@ -2802,8 +2802,11 @@ enum skl_disp_power_wells {
 
 #define INTERVAL_1_28_US(us)	(((us) * 100) >> 7)

drivers/gpu/drm/i915/i915_reg.h enum skl_disp_power_wells { · line 2812

Quoted 10 lines
drivers/gpu/drm/i915/i915_reg.h +4 -1
 #define INTERVAL_1_33_US(us)	(((us) * 3)   >> 2)
+#define INTERVAL_0_833_US(us)	(((us) * 6) / 5)
 #define GT_INTERVAL_FROM_US(dev_priv, us) (IS_GEN9(dev_priv) ? \
-				INTERVAL_1_33_US(us) : \
+				(IS_BROXTON(dev_priv) ? \
+				INTERVAL_0_833_US(us) : \
+				INTERVAL_1_33_US(us)) : \
 				INTERVAL_1_28_US(us))
 
 /*

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

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

#5 lore raw
Quoted 13 lines · Imre Deak
Quoted 12 lines · Daniel Vetter
Quoted 10 lines · Imre Deak
Quoted 5 lines · Sagar Arun Kamble

From: Akash Goel <[email protected]>

The comment about units in gen6_set_rps_thresholds() is outdated, so you could update that while at it. In any case this looks ok, so:

Quoted 7 lines
Quoted 2 lines

In your previous review you noticed that Bspec is still outdated. Has that been fixed meanwhile?

Yep, Sagar pointed to a page in BSpec where the relevant clocks are defined ("Timestamp bases") and he also filed a change request in Bspec now to update the register description itself accordingly. Should've mentioned this when adding my r-b.

Awesome. Added a note about this and applied the patch.

Thanks, 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