drm/i915/skl: Retrieve the Rpe value from Pcode
Subsystems (2)
PATCH 1/2 drm/i915/skl: Retrieve the Rpe value from Pcode
From: Akash Goel <[email protected]>
Read the efficient frequency (aka RPe) value through the the mailbox command (0x1A) from the pcode, as done on Haswell and Broadwell. The turbo minimum frequency softlimit is not revised as per the efficient frequency value.
Issue: VIZ-5143
--- drivers/gpu/drm/i915/intel_pm.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-)
drivers/gpu/drm/i915/intel_pm.c +6 -2
@@ -4274,16 +4274,20 @@ static void gen6_init_rps_frequencies(struct drm_device *dev) dev_priv->rps.max_freq = dev_priv->rps.rp0_freq; dev_priv->rps.efficient_freq = dev_priv->rps.rp1_freq; -if (IS_HASWELL (dev) ||IS_BROADWELL (dev)) { +if (IS_HASWELL (dev) ||IS_BROADWELL (dev) ||IS_SKYLAKE (dev)) { ret =sandybridge_pcode_read (dev_priv,HSW_PCODE_DYNAMIC_DUTY_CYCLE_CONTROL , &ddcc_status); -if (0 == ret) +if (0 == ret) { dev_priv->rps.efficient_freq =clamp_t (u8, ((ddcc_status >>8 ) &0xff ), dev_priv->rps.min_freq, dev_priv->rps.max_freq); + + dev_priv->rps.efficient_freq *= + (IS_SKYLAKE (dev) ?GEN9_FREQ_SCALER :1 ); + } } dev_priv->rps.idle_freq = dev_priv->rps.min_freq;
Signature · 6 lines
1.9.2 _______________________________________________ Intel-gfx mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/intel-gfx
PATCH 2/2 drm/i915/skl: Ring frequency table programming changes
From: Akash Goel <[email protected]>
Ring frequency table programming changes for SKL. No need for a floor on ring frequency, as the issue of performance impact with ring running below DDR frequency, is believed to be fixed on SKL
Issue: VIZ-5144
--- drivers/gpu/drm/i915/intel_pm.c | 26 +++++++++++++++++++++----- 1 file changed, 21 insertions(+), 5 deletions(-)
drivers/gpu/drm/i915/intel_pm.c +21 -5
@@ -4582,6 +4582,7 @@ static void __gen6_update_ring_freq(struct drm_device *dev)int min_freq =15 ;unsigned int gpu_freq;unsigned int max_ia_freq, min_ring_freq; +unsigned int max_gpu_freq, min_gpu_freq;int scaling_factor =180 ;struct cpufreq_policy *policy;
@@ -4606,17 +4607,31 @@ static void __gen6_update_ring_freq(struct drm_device *dev)/* convert DDR frequency from units of 266.6MHz to bandwidth */ min_ring_freq =mult_frac (min_ring_freq,8 ,3 ); +if (IS_SKYLAKE (dev)) { +/* Convert GT frequency to 50 HZ units */ + min_gpu_freq = dev_priv->rps.min_freq /GEN9_FREQ_SCALER ; + max_gpu_freq = dev_priv->rps.max_freq /GEN9_FREQ_SCALER ; + }else { + min_gpu_freq = dev_priv->rps.min_freq; + max_gpu_freq = dev_priv->rps.max_freq; + } +/* * For each potential GPU frequency, load a ring frequency we'd like * to use for memory access. We do this by specifying the IA frequency * the PCU should use as a reference to determine the ring frequency. */ -for (gpu_freq = dev_priv->rps.max_freq; gpu_freq >= dev_priv->rps.min_freq; - gpu_freq--) { -int diff = dev_priv->rps.max_freq - gpu_freq; +for (gpu_freq = max_gpu_freq; gpu_freq >= min_gpu_freq; gpu_freq--) { +int diff = max_gpu_freq - gpu_freq;unsigned int ia_freq =0 , ring_freq =0 ; -if (INTEL_INFO (dev)->gen >=8 ) { +if (IS_SKYLAKE (dev)) { +/* +* ring_freq = 2 * GT. ring_freq is in 100MHz units +* No floor required for ring frequency on SKL. +*/ + ring_freq = gpu_freq; + }else if (INTEL_INFO (dev)->gen >=8 ) {/* max(2 * GT, DDR). NB: GT is 50MHz units */ ring_freq =max (min_ring_freq, gpu_freq); }else if (IS_HASWELL (dev)) {
@@ -5770,7 +5785,8 @@ static void intel_gen6_powersave_work(struct work_struct *work) }else if (INTEL_INFO (dev)->gen >=9 ) {gen9_enable_rc6 (dev);gen9_enable_rps (dev); -__gen6_update_ring_freq (dev); +if (IS_SKYLAKE (dev)) +__gen6_update_ring_freq (dev); }else if (IS_BROADWELL (dev)) {gen8_enable_rps (dev);__gen6_update_ring_freq (dev);
Signature · 6 lines
1.9.2 _______________________________________________ Intel-gfx mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: [PATCH 2/2] drm/i915/skl: Ring frequency table programming changes
Task id: 6320 -------------------------------------Summary-------------------------------------
Platform Delta drm-intel-nightly Series Applied
PNV 276/276 276/276
ILK -1 302/302 301/302
SNB 316/316 316/316 IVB 342/342 342/342 BYT 286/286 286/286 BDW 318/318 318/318
-------------------------------------Detailed-------------------------------------
Platform Test drm-intel-nightly Series Applied
*ILK igt@kms_flip@flip-vs-dpms-interruptible PASS(2) DMESG_WARN(1)PASS(1)
(dmesg patch applied)drm:intel_pch_fifo_underrun_irq_handler[i915]]*ERROR*PCH_transcoder_A_FIFO_underrun@PCH transcoder A FIFO underrun
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
PATCH 3/3 drm/i915/skl: Updated the i915_ring_freq_table debugfs function
In reply to [email protected]From: Akash Goel <[email protected]>
Updated the i915_ring_freq_table debugfs function to allow read of ring frequency table through Punit interface, for SKL also.
--- drivers/gpu/drm/i915/i915_debugfs.c | 21 ++++++++++++++++----- 1 file changed, 16 insertions(+), 5 deletions(-)
drivers/gpu/drm/i915/i915_debugfs.c +16 -5
@@ -1769,8 +1769,9 @@ static int i915_ring_freq_table(struct seq_file *m, void *unused)struct drm_i915_private *dev_priv = dev->dev_private;int ret =0 ;int gpu_freq, ia_freq; +unsigned int max_gpu_freq, min_gpu_freq; -if (!(IS_GEN6 (dev) ||IS_GEN7 (dev))) { +if (!(IS_GEN6 (dev) ||IS_GEN7 (dev) ||IS_SKYLAKE (dev))) {seq_puts (m,"unsupported on this chipset\n" );return 0 ; }
@@ -1783,17 +1784,27 @@ static int i915_ring_freq_table(struct seq_file *m, void *unused)if (ret) goto out; +if (IS_SKYLAKE (dev)) { +/* Convert GT frequency to 50 HZ units */ + min_gpu_freq = + dev_priv->rps.min_freq_softlimit /GEN9_FREQ_SCALER ; + max_gpu_freq = + dev_priv->rps.max_freq_softlimit /GEN9_FREQ_SCALER ; + }else { + min_gpu_freq = dev_priv->rps.min_freq_softlimit; + max_gpu_freq = dev_priv->rps.max_freq_softlimit; + } +seq_puts (m,"GPU freq (MHz)\tEffective CPU freq (MHz)\tEffective Ring freq (MHz)\n" ); -for (gpu_freq = dev_priv->rps.min_freq_softlimit; - gpu_freq <= dev_priv->rps.max_freq_softlimit; - gpu_freq++) { +for (gpu_freq = min_gpu_freq; gpu_freq <= max_gpu_freq; gpu_freq++) { ia_freq = gpu_freq;sandybridge_pcode_read (dev_priv,GEN6_PCODE_READ_MIN_FREQ_TABLE , &ia_freq);seq_printf (m,"%d\t\t%d\t\t\t\t%d\n" , -intel_gpu_freq (dev_priv, gpu_freq), +intel_gpu_freq (dev_priv, (gpu_freq * + (IS_SKYLAKE (dev) ?GEN9_FREQ_SCALER :1 ))), ((ia_freq >>0 ) &0xff ) *100 , ((ia_freq >>8 ) &0xff ) *100 ); }
Signature · 6 lines
1.9.2 _______________________________________________ Intel-gfx mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: [PATCH 3/3] drm/i915/skl: Updated the i915_ring_freq_table debugfs function
Quoted 15 lines · On Tue, May 12, 2015 at 12:49 AM, <[email protected]> wrote:
From: Akash Goel <[email protected]>
Updated the
i915_ring_freq_tabledebugfs function to allow read of ring frequency table through Punit interface, for SKL also.Signed-off-by Akash Goel <[email protected]>--- drivers/gpu/drm/i915/i915_debugfs.c | 21 ++++++++++++++++----- 1 file changed, 16 insertions(+), 5 deletions(-)drivers/gpu/drm/i915/i915_debugfs.c +0
-0
drivers/gpu/drm/i915/i915_debugfs.c static int i915_ring_freq_table(struct seq_file *m, void *unused) · line 1774
Quoted 7 lines
drivers/gpu/drm/i915/i915_debugfs.c +2
-1@@ -1769,8 +1769,9 @@ static int i915_ring_freq_table(struct seq_file *m, void *unused)struct drm_i915_private *dev_priv = dev->dev_private;int ret =0 ;int gpu_freq, ia_freq; +unsigned int max_gpu_freq, min_gpu_freq; -if (!(IS_GEN6 (dev) ||IS_GEN7 (dev))) { +if (!(IS_GEN6 (dev) ||IS_GEN7 (dev) ||IS_SKYLAKE (dev))) {
Why HSW and BDW aren't here and SKL is back?
Again, I'm without doc for this, sorry...
Quoted 22 lines
drivers/gpu/drm/i915/i915_debugfs.c +11
-2seq_puts (m,"unsupported on this chipset\n" );return 0 ; }@@ -1783,17 +1784,27 @@ static int i915_ring_freq_table(struct seq_file *m, void *unused)if (ret) goto out; +if (IS_SKYLAKE (dev)) { +/* Convert GT frequency to 50 HZ units */ + min_gpu_freq = + dev_priv->rps.min_freq_softlimit /GEN9_FREQ_SCALER ; + max_gpu_freq = + dev_priv->rps.max_freq_softlimit /GEN9_FREQ_SCALER ; + }else { + min_gpu_freq = dev_priv->rps.min_freq_softlimit; + max_gpu_freq = dev_priv->rps.max_freq_softlimit; + } +seq_puts (m,"GPU freq (MHz)\tEffective CPU freq (MHz)\tEffective Ring freq (MHz)\n" ); - for (gpu_freq = dev_priv->rps.min_freq_softlimit; - gpu_freq <= dev_priv->rps.max_freq_softlimit;
drivers/gpu/drm/i915/i915_debugfs.c static int i915_ring_freq_table(struct seq_file *m, void *unused) · line 1807
Quoted 10 lines
drivers/gpu/drm/i915/i915_debugfs.c +3
-2- gpu_freq++) { +for (gpu_freq = min_gpu_freq; gpu_freq <= max_gpu_freq; gpu_freq++) { ia_freq = gpu_freq;sandybridge_pcode_read (dev_priv,GEN6_PCODE_READ_MIN_FREQ_TABLE , &ia_freq); seq_printf(m, "%d\t\t%d\t\t\t\t%d\n", - intel_gpu_freq(dev_priv, gpu_freq), + intel_gpu_freq(dev_priv, (gpu_freq * + (IS_SKYLAKE(dev) ? GEN9_FREQ_SCALER : 1))),
here the scaler conversion made sense to me...
Quoted 10 lines
drivers/gpu/drm/i915/i915_debugfs.c +0
-1((ia_freq >>0 ) &0xff ) *100 , ((ia_freq >> 8) & 0xff) * 100); } --1.9.2
_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
Signature · 6 lines
Rodrigo Vivi Blog: http://blog.vivi.eng.br _______________________________________________ Intel-gfx mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: [PATCH 3/3] drm/i915/skl: Updated the i915_ring_freq_table debugfs function
Quoted 21 lines · Rodrigo Vivi
Quoted 20 lines · On Tue, May 12, 2015 at 12:49 AM, <[email protected]> wrote:
From: Akash Goel <[email protected]>
Updated the
i915_ring_freq_tabledebugfs function to allow read of ring frequency table through Punit interface, for SKL also.Signed-off-by Akash Goel <[email protected]>--- drivers/gpu/drm/i915/i915_debugfs.c | 21 ++++++++++++++++----- 1 file changed, 16 insertions(+), 5 deletions(-)drivers/gpu/drm/i915/i915_debugfs.c +1
-0@@ -1769,8 +1769,9 @@ static int i915_ring_freq_table(struct seq_file *m, void *unused)struct drm_i915_private *dev_priv = dev->dev_private;int ret =0 ;int gpu_freq, ia_freq; +unsigned int max_gpu_freq, min_gpu_freq;
Quoted 5 lines
drivers/gpu/drm/i915/i915_debugfs.c static int i915_ring_freq_table(struct seq_file *m, void *unused) · line 1774
Quoted 2 lines
drivers/gpu/drm/i915/i915_debugfs.c +1
-1-if (!(IS_GEN6 (dev) ||IS_GEN7 (dev))) { +if (!(IS_GEN6 (dev) ||IS_GEN7 (dev) ||IS_SKYLAKE (dev))) {Why HSW and BDW aren't here and SKL is back?
Again, I'm without doc for this, sorry...
Sorry not sure that why HSW/BDW aren't used here. For them also this interface should work.
Quoted 21 lines
Quoted 21 lines
drivers/gpu/drm/i915/i915_debugfs.c +11
-0seq_puts (m,"unsupported on this chipset\n" );return 0 ; }@@ -1783,17 +1784,27 @@ static int i915_ring_freq_table(struct seq_file *m, void *unused)if (ret) goto out; +if (IS_SKYLAKE (dev)) { +/* Convert GT frequency to 50 HZ units */ + min_gpu_freq = + dev_priv->rps.min_freq_softlimit /GEN9_FREQ_SCALER ; + max_gpu_freq = + dev_priv->rps.max_freq_softlimit /GEN9_FREQ_SCALER ; + }else { + min_gpu_freq = dev_priv->rps.min_freq_softlimit; + max_gpu_freq = dev_priv->rps.max_freq_softlimit; + } +seq_puts (m,"GPU freq (MHz)\tEffective CPU freq (MHz)\tEffective Ring freq (MHz)\n" );
Quoted 28 lines
drivers/gpu/drm/i915/i915_debugfs.c static int i915_ring_freq_table(struct seq_file *m, void *unused) · line 1807
Quoted 12 lines
drivers/gpu/drm/i915/i915_debugfs.c +3
-4-for (gpu_freq = dev_priv->rps.min_freq_softlimit; - gpu_freq <= dev_priv->rps.max_freq_softlimit; - gpu_freq++) { +for (gpu_freq = min_gpu_freq; gpu_freq <= max_gpu_freq; gpu_freq++) { ia_freq = gpu_freq;sandybridge_pcode_read (dev_priv,GEN6_PCODE_READ_MIN_FREQ_TABLE , &ia_freq); seq_printf(m, "%d\t\t%d\t\t\t\t%d\n", - intel_gpu_freq(dev_priv, gpu_freq), + intel_gpu_freq(dev_priv, (gpu_freq * + (IS_SKYLAKE(dev) ? GEN9_FREQ_SCALER : 1))),here the scaler conversion made sense to me...
Quoted 10 lines
drivers/gpu/drm/i915/i915_debugfs.c +0
-1((ia_freq >>0 ) &0xff ) *100 , ((ia_freq >> 8) & 0xff) * 100); } --1.9.2
_______________________________________________
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
Re: [PATCH 3/3] drm/i915/skl: Updated the i915_ring_freq_table debugfs function
Quoted 22 lines · Akash Goel
Quoted 21 lines · Rodrigo Vivi
Quoted 20 lines · On Tue, May 12, 2015 at 12:49 AM, <[email protected]> wrote:
From: Akash Goel <[email protected]>
Updated the
i915_ring_freq_tabledebugfs function to allow read of ring frequency table through Punit interface, for SKL also.Signed-off-by Akash Goel <[email protected]>--- drivers/gpu/drm/i915/i915_debugfs.c | 21 ++++++++++++++++----- 1 file changed, 16 insertions(+), 5 deletions(-)drivers/gpu/drm/i915/i915_debugfs.c +1
-0@@ -1769,8 +1769,9 @@ static int i915_ring_freq_table(struct seq_file *m, void *unused)struct drm_i915_private *dev_priv = dev->dev_private;int ret =0 ;int gpu_freq, ia_freq; +unsigned int max_gpu_freq, min_gpu_freq;
Quoted 8 lines
Quoted 5 lines
drivers/gpu/drm/i915/i915_debugfs.c static int i915_ring_freq_table(struct seq_file *m, void *unused) · line 1774
Quoted 2 lines
drivers/gpu/drm/i915/i915_debugfs.c +1
-1-if (!(IS_GEN6 (dev) ||IS_GEN7 (dev))) { +if (!(IS_GEN6 (dev) ||IS_GEN7 (dev) ||IS_SKYLAKE (dev))) {Why HSW and BDW aren't here and SKL is back?
Again, I'm without doc for this, sorry...Sorry not sure that why HSW/BDW aren't used here. For them also this interface should work.
HSW is included in the GEN7 check. But so is VLV and that one should be rejected. BDW is genuinely misising. Can you fix it all up while you're poking at it?
Quoted 56 lines
Quoted 22 lines
Quoted 22 lines
drivers/gpu/drm/i915/i915_debugfs.c +11
-0seq_puts (m,"unsupported on this chipset\n" );return 0 ; }@@ -1783,17 +1784,27 @@ static int i915_ring_freq_table(struct seq_file *m, void *unused)if (ret) goto out; +if (IS_SKYLAKE (dev)) { +/* Convert GT frequency to 50 HZ units */ + min_gpu_freq = + dev_priv->rps.min_freq_softlimit /GEN9_FREQ_SCALER ; + max_gpu_freq = + dev_priv->rps.max_freq_softlimit /GEN9_FREQ_SCALER ; + }else { + min_gpu_freq = dev_priv->rps.min_freq_softlimit; + max_gpu_freq = dev_priv->rps.max_freq_softlimit; + } +seq_puts (m,"GPU freq (MHz)\tEffective CPU freq (MHz)\tEffective Ring freq (MHz)\n" );Quoted 28 lines
drivers/gpu/drm/i915/i915_debugfs.c static int i915_ring_freq_table(struct seq_file *m, void *unused) · line 1807
Quoted 12 lines
drivers/gpu/drm/i915/i915_debugfs.c +3
-4-for (gpu_freq = dev_priv->rps.min_freq_softlimit; - gpu_freq <= dev_priv->rps.max_freq_softlimit; - gpu_freq++) { +for (gpu_freq = min_gpu_freq; gpu_freq <= max_gpu_freq; gpu_freq++) { ia_freq = gpu_freq;sandybridge_pcode_read (dev_priv,GEN6_PCODE_READ_MIN_FREQ_TABLE , &ia_freq); seq_printf(m, "%d\t\t%d\t\t\t\t%d\n", - intel_gpu_freq(dev_priv, gpu_freq), + intel_gpu_freq(dev_priv, (gpu_freq * + (IS_SKYLAKE(dev) ? GEN9_FREQ_SCALER : 1))),here the scaler conversion made sense to me...
Quoted 10 lines
drivers/gpu/drm/i915/i915_debugfs.c +0
-1((ia_freq >>0 ) &0xff ) *100 , ((ia_freq >> 8) & 0xff) * 100); } --1.9.2
_______________________________________________
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
Signature · 6 lines
Ville Syrjälä Intel OTC _______________________________________________ Intel-gfx mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: [PATCH 2/2] drm/i915/skl: Ring frequency table programming changes
In reply to [email protected]Quoted 25 lines · On Tue, May 5, 2015 at 4:30 AM, <[email protected]> wrote:
From: Akash Goel <[email protected]>
Ring frequency table programming changes for SKL. No need for a floor on ring frequency, as the issue of performance impact with ring running below DDR frequency, is believed to be fixed on SKL
Issue: VIZ-5144
Signed-off-by Akash Goel <[email protected]>--- drivers/gpu/drm/i915/intel_pm.c | 26 +++++++++++++++++++++----- 1 file changed, 21 insertions(+), 5 deletions(-)drivers/gpu/drm/i915/intel_pm.c +1
-0@@ -4582,6 +4582,7 @@ static void __gen6_update_ring_freq(struct drm_device *dev)int min_freq =15 ;unsigned int gpu_freq;unsigned int max_ia_freq, min_ring_freq; +unsigned int max_gpu_freq, min_gpu_freq;int scaling_factor =180 ;struct cpufreq_policy *policy;
drivers/gpu/drm/i915/intel_pm.c static void __gen6_update_ring_freq(struct drm_device *dev) · line 4613
Quoted 7 lines
drivers/gpu/drm/i915/intel_pm.c +4
-0@@ -4606,17 +4607,31 @@ static void __gen6_update_ring_freq(struct drm_device *dev)/* convert DDR frequency from units of 266.6MHz to bandwidth */ min_ring_freq =mult_frac (min_ring_freq,8 ,3 ); +if (IS_SKYLAKE (dev)) { +/* Convert GT frequency to 50 HZ units */ + min_gpu_freq = dev_priv->rps.min_freq /GEN9_FREQ_SCALER ; + max_gpu_freq = dev_priv->rps.max_freq /GEN9_FREQ_SCALER ;
I got even more confused here with the scale differences... Doesn't look so consistent..
Quoted 14 lines
drivers/gpu/drm/i915/intel_pm.c +6
-3+ }else { + min_gpu_freq = dev_priv->rps.min_freq; + max_gpu_freq = dev_priv->rps.max_freq; + } +/* * For each potential GPU frequency, load a ring frequency we'd like * to use for memory access. We do this by specifying the IA frequency * the PCU should use as a reference to determine the ring frequency. */ -for (gpu_freq = dev_priv->rps.max_freq; gpu_freq >= dev_priv->rps.min_freq; - gpu_freq--) { -int diff = dev_priv->rps.max_freq - gpu_freq; +for (gpu_freq = max_gpu_freq; gpu_freq >= min_gpu_freq; gpu_freq--) {
drivers/gpu/drm/i915/intel_pm.c static void __gen6_update_ring_freq(struct drm_device *dev) · line 4633
Quoted 10 lines
drivers/gpu/drm/i915/intel_pm.c +7
-1+int diff = max_gpu_freq - gpu_freq;unsigned int ia_freq =0 , ring_freq =0 ; -if (INTEL_INFO (dev)->gen >=8 ) { +if (IS_SKYLAKE (dev)) { +/* +* ring_freq = 2 * GT. ring_freq is in 100MHz units +* No floor required for ring frequency on SKL. +*/ + ring_freq = gpu_freq;
Aren't we using the 16.6 now? Shouldn't it be converted anyway?
drivers/gpu/drm/i915/intel_pm.c static void intel_gen6_powersave_work(struct work_struct *work) · line 5788
Quoted 10 lines
drivers/gpu/drm/i915/intel_pm.c +2
-1+ }else if (INTEL_INFO (dev)->gen >=8 ) {/* max(2 * GT, DDR). NB: GT is 50MHz units */ ring_freq =max (min_ring_freq, gpu_freq); }else if (IS_HASWELL (dev)) {@@ -5770,7 +5785,8 @@ static void intel_gen6_powersave_work(struct work_struct *work) }else if (INTEL_INFO (dev)->gen >=9 ) {gen9_enable_rc6 (dev);gen9_enable_rps (dev); -__gen6_update_ring_freq (dev); +if (IS_SKYLAKE (dev))
why this if here?
If it is a bxt restriction shouldn't it be in a separated patch?
Quoted 11 lines
drivers/gpu/drm/i915/intel_pm.c +1
-1+__gen6_update_ring_freq (dev); }else if (IS_BROADWELL (dev)) {gen8_enable_rps (dev);__gen6_update_ring_freq (dev); --1.9.2
_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
Signature · 6 lines
Rodrigo Vivi Blog: http://blog.vivi.eng.br _______________________________________________ Intel-gfx mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: [PATCH 2/2] drm/i915/skl: Ring frequency table programming changes
Quoted 29 lines · Rodrigo Vivi
Quoted 28 lines · On Tue, May 5, 2015 at 4:30 AM, <[email protected]> wrote:
From: Akash Goel <[email protected]>
Ring frequency table programming changes for SKL. No need for a floor on ring frequency, as the issue of performance impact with ring running below DDR frequency, is believed to be fixed on SKL
Issue: VIZ-5144
Signed-off-by Akash Goel <[email protected]>--- drivers/gpu/drm/i915/intel_pm.c | 26 +++++++++++++++++++++----- 1 file changed, 21 insertions(+), 5 deletions(-)drivers/gpu/drm/i915/intel_pm.c +1
-0@@ -4582,6 +4582,7 @@ static void __gen6_update_ring_freq(struct drm_device *dev)int min_freq =15 ;unsigned int gpu_freq;unsigned int max_ia_freq, min_ring_freq; +unsigned int max_gpu_freq, min_gpu_freq;int scaling_factor =180 ;struct cpufreq_policy *policy;@@ -4606,17 +4607,31 @@ static void __gen6_update_ring_freq(struct drm_device *dev)/* convert DDR frequency from units of 266.6MHz to bandwidth */ min_ring_freq =mult_frac (min_ring_freq,8 ,3 );
Quoted 7 lines
drivers/gpu/drm/i915/intel_pm.c static void __gen6_update_ring_freq(struct drm_device *dev) · line 4613
Quoted 4 lines
drivers/gpu/drm/i915/intel_pm.c +4
-0+if (IS_SKYLAKE (dev)) { +/* Convert GT frequency to 50 HZ units */ + min_gpu_freq = dev_priv->rps.min_freq /GEN9_FREQ_SCALER ; + max_gpu_freq = dev_priv->rps.max_freq /GEN9_FREQ_SCALER ;I got even more confused here with the scale differences... Doesn't look so consistent..
For Ring frequency table programming, as an input GT frequency has to be specified in units of 50 MHZ only. For SKL natural hardware unit is 16.667 MHZ and Driver is internally storing in the same unit only, hence an extra conversion required here.
Quoted 40 lines
Quoted 15 lines
drivers/gpu/drm/i915/intel_pm.c +6
-3+ }else { + min_gpu_freq = dev_priv->rps.min_freq; + max_gpu_freq = dev_priv->rps.max_freq; + } +/* * For each potential GPU frequency, load a ring frequency we'd like * to use for memory access. We do this by specifying the IA frequency * the PCU should use as a reference to determine the ring frequency. */ -for (gpu_freq = dev_priv->rps.max_freq; gpu_freq >= dev_priv->rps.min_freq; - gpu_freq--) { -int diff = dev_priv->rps.max_freq - gpu_freq; +for (gpu_freq = max_gpu_freq; gpu_freq >= min_gpu_freq; gpu_freq--) {drivers/gpu/drm/i915/intel_pm.c static void __gen6_update_ring_freq(struct drm_device *dev) · line 4633
Quoted 10 lines
drivers/gpu/drm/i915/intel_pm.c +7
-1+int diff = max_gpu_freq - gpu_freq;unsigned int ia_freq =0 , ring_freq =0 ; -if (INTEL_INFO (dev)->gen >=8 ) { +if (IS_SKYLAKE (dev)) { +/* +* ring_freq = 2 * GT. ring_freq is in 100MHz units +* No floor required for ring frequency on SKL. +*/ + ring_freq = gpu_freq;Aren't we using the 16.6 now? Shouldn't it be converted anyway?
drivers/gpu/drm/i915/intel_pm.c static void intel_gen6_powersave_work(struct work_struct *work) · line 5788
Quoted 10 lines
drivers/gpu/drm/i915/intel_pm.c +2
-1+ }else if (INTEL_INFO (dev)->gen >=8 ) {/* max(2 * GT, DDR). NB: GT is 50MHz units */ ring_freq =max (min_ring_freq, gpu_freq); }else if (IS_HASWELL (dev)) {@@ -5770,7 +5785,8 @@ static void intel_gen6_powersave_work(struct work_struct *work) }else if (INTEL_INFO (dev)->gen >=9 ) {gen9_enable_rc6 (dev);gen9_enable_rps (dev); -__gen6_update_ring_freq (dev); +if (IS_SKYLAKE (dev))why this if here?
Quoted 1 line
If it is a bxt restriction shouldn't it be in a separated patch?
Yes for BXT, its not supported. Would move it to separate patch.
Quoted 8 lines
Quoted 8 lines
drivers/gpu/drm/i915/intel_pm.c +1
-1+__gen6_update_ring_freq (dev); }else if (IS_BROADWELL (dev)) {gen8_enable_rps (dev);__gen6_update_ring_freq (dev); --1.9.2
Quoted 7 lines
Quoted 4 lines
_______________________________________________
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
Quoted 18 lines · On Tue, May 5, 2015 at 4:30 AM, <[email protected]> wrote:
From: Akash Goel <[email protected]>
Read the efficient frequency (aka RPe) value through the the mailbox command (
0x1A) from the pcode, as done on Haswell and Broadwell. The turbo minimum frequency softlimit is not revised as per the efficient frequency value.Issue: VIZ-5143
Signed-off-by Akash Goel <[email protected]>--- drivers/gpu/drm/i915/intel_pm.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-)drivers/gpu/drm/i915/intel_pm.c +0
-0
drivers/gpu/drm/i915/intel_pm.c static void gen6_init_rps_frequencies(struct drm_device *dev) · line 4277
Quoted 5 lines
drivers/gpu/drm/i915/intel_pm.c +1
-1@@ -4274,16 +4274,20 @@ static void gen6_init_rps_frequencies(struct drm_device *dev) dev_priv->rps.max_freq = dev_priv->rps.rp0_freq; dev_priv->rps.efficient_freq = dev_priv->rps.rp1_freq; -if (IS_HASWELL (dev) ||IS_BROADWELL (dev)) { +if (IS_HASWELL (dev) ||IS_BROADWELL (dev) ||IS_SKYLAKE (dev)) {
Could you please give me a pointer in the spec to this? Couldn't find on new one.
drivers/gpu/drm/i915/intel_pm.c static void gen6_init_rps_frequencies(struct drm_device *dev) · line 4289
Quoted 13 lines
drivers/gpu/drm/i915/intel_pm.c +4
-1ret =sandybridge_pcode_read (dev_priv,HSW_PCODE_DYNAMIC_DUTY_CYCLE_CONTROL , &ddcc_status); -if (0 == ret) +if (0 == ret) { dev_priv->rps.efficient_freq =clamp_t (u8, ((ddcc_status >>8 ) &0xff ), dev_priv->rps.min_freq, dev_priv->rps.max_freq); + + dev_priv->rps.efficient_freq *= + (IS_SKYLAKE (dev) ?GEN9_FREQ_SCALER :1 );
I thought you were managing everything on 50MHz and converting to 16.6 only when writing. So this here seems to me that will compare to values in different bases..
Quoted 11 lines
drivers/gpu/drm/i915/intel_pm.c +1
-1+ } } dev_priv->rps.idle_freq = dev_priv->rps.min_freq; --1.9.2
_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
Signature · 6 lines
Rodrigo Vivi Blog: http://blog.vivi.eng.br _______________________________________________ Intel-gfx mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/intel-gfx
Quoted 21 lines · Rodrigo Vivi
Quoted 20 lines · On Tue, May 5, 2015 at 4:30 AM, <[email protected]> wrote:
From: Akash Goel <[email protected]>
Read the efficient frequency (aka RPe) value through the the mailbox command (
0x1A) from the pcode, as done on Haswell and Broadwell. The turbo minimum frequency softlimit is not revised as per the efficient frequency value.Issue: VIZ-5143
Signed-off-by Akash Goel <[email protected]>--- drivers/gpu/drm/i915/intel_pm.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-)drivers/gpu/drm/i915/intel_pm.c +0
-0@@ -4274,16 +4274,20 @@ static void gen6_init_rps_frequencies(struct drm_device *dev) dev_priv->rps.max_freq = dev_priv->rps.rp0_freq;
Quoted 6 lines
drivers/gpu/drm/i915/intel_pm.c static void gen6_init_rps_frequencies(struct drm_device *dev) · line 4277
Quoted 3 lines
drivers/gpu/drm/i915/intel_pm.c +1
-1dev_priv->rps.efficient_freq = dev_priv->rps.rp1_freq; -if (IS_HASWELL (dev) ||IS_BROADWELL (dev)) { +if (IS_HASWELL (dev) ||IS_BROADWELL (dev) ||IS_SKYLAKE (dev)) {Could you please give me a pointer in the spec to this? Couldn't find on new one.
Actually got this piece of info from fellow VPG engineers. Sorry I myself don't have the access to the Punit spec.
Quoted 14 lines
drivers/gpu/drm/i915/intel_pm.c static void gen6_init_rps_frequencies(struct drm_device *dev) · line 4289
Quoted 13 lines
drivers/gpu/drm/i915/intel_pm.c +4
-1ret =sandybridge_pcode_read (dev_priv,HSW_PCODE_DYNAMIC_DUTY_CYCLE_CONTROL , &ddcc_status); -if (0 == ret) +if (0 == ret) { dev_priv->rps.efficient_freq =clamp_t (u8, ((ddcc_status >>8 ) &0xff ), dev_priv->rps.min_freq, dev_priv->rps.max_freq); + + dev_priv->rps.efficient_freq *= + (IS_SKYLAKE (dev) ?GEN9_FREQ_SCALER :1 );
Quoted 3 lines
I thought you were managing everything on 50MHz and converting to 16.6 only when writing. So this here seems to me that will compare to values in different bases..
The frequency values are being internally maintained in their natural hardware units only (and functions intel_gpu_freq & intel_freq_opcode help in the conversion).
For SKL, although unit is 16.667 MHz, but there are few exceptions like RP_STATE register, which still reports frequency in 50 MHZ units, so an extra conversion is required there to internally store the values in 16.667 MHZ. The Ring frequency table programming is another instance where update has to be done as per 50 MHZ unit.
Best regards
Akash
Quoted 4 lines
Quoted 4 lines
drivers/gpu/drm/i915/intel_pm.c +1
-0+ } }
Quoted 11 lines
Quoted 8 lines
drivers/gpu/drm/i915/intel_pm.c +0
-1dev_priv->rps.idle_freq = dev_priv->rps.min_freq; --1.9.2
_______________________________________________
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