* [PATCH] drm/i915: Remove wait for for punit to updates freq.
@ 2015-03-05 4:08 deepak.s
2015-03-05 4:08 ` [PATCH] drm/i915: Update PM interrupts before updating the freq deepak.s
` (3 more replies)
0 siblings, 4 replies; 18+ messages in thread
From: deepak.s @ 2015-03-05 4:08 UTC (permalink / raw)
To: intel-gfx
From: Deepak S <deepak.s@linux.intel.com>
When GPU is idle on VLV, Request freq to punit should be good enough to
get the voltage back to VNN. Also, make sure gfx clock force applies
before requesting the freq fot vlv.
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=75244
suggested-by: Jesse Barnes <jbarnes@virtuousgeek.org>
Signed-off-by: Deepak S <deepak.s@linux.intel.com>
---
drivers/gpu/drm/i915/intel_pm.c | 20 ++++----------------
1 file changed, 4 insertions(+), 16 deletions(-)
diff --git a/drivers/gpu/drm/i915/intel_pm.c b/drivers/gpu/drm/i915/intel_pm.c
index e710b43..2e1ed07 100644
--- a/drivers/gpu/drm/i915/intel_pm.c
+++ b/drivers/gpu/drm/i915/intel_pm.c
@@ -3894,7 +3894,7 @@ static void valleyview_set_rps(struct drm_device *dev, u8 val)
* * If Gfx is Idle, then
* 1. Mask Turbo interrupts
* 2. Bring up Gfx clock
- * 3. Change the freq to Rpn and wait till P-Unit updates freq
+ * 3. Request the freq to Rpn.
* 4. Clear the Force GFX CLK ON bit so that Gfx can down
* 5. Unmask Turbo interrupts
*/
@@ -3902,8 +3902,8 @@ static void vlv_set_rps_idle(struct drm_i915_private *dev_priv)
{
struct drm_device *dev = dev_priv->dev;
- /* CHV and latest VLV don't need to force the gfx clock */
- if (IS_CHERRYVIEW(dev) || dev->pdev->revision >= 0xd) {
+ /* CHV don't need to force the gfx clock */
+ if (IS_CHERRYVIEW(dev)) {
valleyview_set_rps(dev_priv->dev, dev_priv->rps.min_freq_softlimit);
return;
}
@@ -3920,20 +3920,8 @@ static void vlv_set_rps_idle(struct drm_i915_private *dev_priv)
gen6_sanitize_rps_pm_mask(dev_priv, ~0));
vlv_force_gfx_clock(dev_priv, true);
-
- dev_priv->rps.cur_freq = dev_priv->rps.min_freq_softlimit;
-
- vlv_punit_write(dev_priv, PUNIT_REG_GPU_FREQ_REQ,
- dev_priv->rps.min_freq_softlimit);
-
- if (wait_for(((vlv_punit_read(dev_priv, PUNIT_REG_GPU_FREQ_STS))
- & GENFREQSTATUS) == 0, 100))
- DRM_ERROR("timed out waiting for Punit\n");
-
+ valleyview_set_rps(dev_priv->dev, dev_priv->rps.min_freq_softlimit);
vlv_force_gfx_clock(dev_priv, false);
-
- I915_WRITE(GEN6_PMINTRMSK,
- gen6_rps_pm_mask(dev_priv, dev_priv->rps.cur_freq));
}
void gen6_rps_idle(struct drm_i915_private *dev_priv)
--
1.9.1
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply related [flat|nested] 18+ messages in thread
* [PATCH] drm/i915: Update PM interrupts before updating the freq
2015-03-05 4:08 [PATCH] drm/i915: Remove wait for for punit to updates freq deepak.s
@ 2015-03-05 4:08 ` deepak.s
2015-03-05 10:30 ` shuang.he
2015-03-05 7:46 ` [PATCH] drm/i915: Remove wait for for punit to updates freq shuang.he
` (2 subsequent siblings)
3 siblings, 1 reply; 18+ messages in thread
From: deepak.s @ 2015-03-05 4:08 UTC (permalink / raw)
To: intel-gfx
From: Deepak S <deepak.s@linux.intel.com>
We update the GT PM interrupts mask at the end of set rps. We observed even
though we are requesting a RPn or RP0, there is a chance to get a DOWN or UP
interrupts before interrupts mask. These extra interrupts are simply wasting
cpu cycles. In this patch we mask the interrupts for given freq before
requesting new frequency.
Signed-off-by: Deepak S <deepak.s@linux.intel.com>
---
drivers/gpu/drm/i915/intel_pm.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/gpu/drm/i915/intel_pm.c b/drivers/gpu/drm/i915/intel_pm.c
index 2e1ed07..bbfe4f0 100644
--- a/drivers/gpu/drm/i915/intel_pm.c
+++ b/drivers/gpu/drm/i915/intel_pm.c
@@ -3879,12 +3879,12 @@ static void valleyview_set_rps(struct drm_device *dev, u8 val)
if (WARN_ONCE(IS_CHERRYVIEW(dev) && (val & 1),
"Odd GPU freq value\n"))
val &= ~1;
+
+ I915_WRITE(GEN6_PMINTRMSK, gen6_rps_pm_mask(dev_priv, val));
if (val != dev_priv->rps.cur_freq)
vlv_punit_write(dev_priv, PUNIT_REG_GPU_FREQ_REQ, val);
- I915_WRITE(GEN6_PMINTRMSK, gen6_rps_pm_mask(dev_priv, val));
-
dev_priv->rps.cur_freq = val;
trace_intel_gpu_freq_change(intel_gpu_freq(dev_priv, val));
}
--
1.9.1
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply related [flat|nested] 18+ messages in thread
* Re: [PATCH] drm/i915: Remove wait for for punit to updates freq.
2015-03-05 4:08 [PATCH] drm/i915: Remove wait for for punit to updates freq deepak.s
2015-03-05 4:08 ` [PATCH] drm/i915: Update PM interrupts before updating the freq deepak.s
@ 2015-03-05 7:46 ` shuang.he
2015-04-13 11:55 ` Jani Nikula
2015-04-28 18:16 ` Jesse Barnes
3 siblings, 0 replies; 18+ messages in thread
From: shuang.he @ 2015-03-05 7:46 UTC (permalink / raw)
To: shuang.he, ethan.gao, intel-gfx, deepak.s
Tested-By: PRC QA PRTS (Patch Regression Test System Contact: shuang.he@intel.com)
Task id: 5889
-------------------------------------Summary-------------------------------------
Platform Delta drm-intel-nightly Series Applied
PNV -1 280/280 279/280
ILK 308/308 308/308
SNB 328/328 328/328
IVB 379/379 379/379
BYT 294/294 294/294
HSW -1 387/387 386/387
BDW -1 316/316 315/316
-------------------------------------Detailed-------------------------------------
Platform Test drm-intel-nightly Series Applied
*PNV igt_gem_userptr_blits_minor-unsync-interruptible PASS(2) DMESG_WARN(2)
*HSW igt_gem_storedw_loop_bsd PASS(2) DMESG_WARN(1)PASS(1)
*BDW igt_gem_gtt_hog PASS(4) DMESG_WARN(1)PASS(1)
Note: You need to pay more attention to line start with '*'
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [PATCH] drm/i915: Update PM interrupts before updating the freq
2015-03-05 4:08 ` [PATCH] drm/i915: Update PM interrupts before updating the freq deepak.s
@ 2015-03-05 10:30 ` shuang.he
0 siblings, 0 replies; 18+ messages in thread
From: shuang.he @ 2015-03-05 10:30 UTC (permalink / raw)
To: shuang.he, ethan.gao, intel-gfx, deepak.s
Tested-By: PRC QA PRTS (Patch Regression Test System Contact: shuang.he@intel.com)
Task id: 5890
-------------------------------------Summary-------------------------------------
Platform Delta drm-intel-nightly Series Applied
PNV -1 280/280 279/280
ILK -1 308/308 307/308
SNB -18 328/328 310/328
IVB 379/379 379/379
BYT 294/294 294/294
HSW 387/387 387/387
BDW -1 316/316 315/316
-------------------------------------Detailed-------------------------------------
Platform Test drm-intel-nightly Series Applied
PNV igt_gem_userptr_blits_minor-unsync-normal DMESG_WARN(1)PASS(5) DMESG_WARN(1)PASS(1)
*ILK igt_gem_unfence_active_buffers PASS(2) DMESG_WARN(1)PASS(1)
*SNB igt_kms_rotation_crc_primary-rotation NSPT(2)DMESG_WARN(1)PASS(3) DMESG_FAIL(1)NSPT(1)
SNB igt_kms_rotation_crc_sprite-rotation NSPT(2)DMESG_WARN(1)PASS(4) NSPT(2)
SNB igt_pm_rpm_cursor NSPT(2)DMESG_WARN(1)PASS(3) NSPT(2)
SNB igt_pm_rpm_cursor-dpms NSPT(2)DMESG_WARN(1)PASS(3) NSPT(2)
SNB igt_pm_rpm_dpms-mode-unset-non-lpsp NSPT(2)DMESG_WARN(1)PASS(3) NSPT(2)
SNB igt_pm_rpm_dpms-non-lpsp NSPT(2)DMESG_WARN(1)PASS(3) NSPT(2)
SNB igt_pm_rpm_drm-resources-equal NSPT(2)DMESG_WARN(1)PASS(3) NSPT(2)
SNB igt_pm_rpm_fences NSPT(2)DMESG_WARN(1)PASS(3) NSPT(2)
SNB igt_pm_rpm_fences-dpms NSPT(2)DMESG_WARN(1)PASS(3) NSPT(2)
SNB igt_pm_rpm_gem-execbuf NSPT(2)DMESG_WARN(1)PASS(3) NSPT(2)
SNB igt_pm_rpm_gem-mmap-cpu NSPT(2)DMESG_WARN(1)PASS(3) NSPT(2)
SNB igt_pm_rpm_gem-mmap-gtt NSPT(2)DMESG_WARN(1)PASS(3) NSPT(2)
SNB igt_pm_rpm_gem-pread NSPT(2)DMESG_WARN(1)PASS(1) NSPT(2)
SNB igt_pm_rpm_i2c NSPT(2)DMESG_WARN(1)PASS(1) NSPT(2)
SNB igt_pm_rpm_modeset-non-lpsp NSPT(2)DMESG_WARN(1)PASS(1) NSPT(2)
SNB igt_pm_rpm_modeset-non-lpsp-stress-no-wait NSPT(2)DMESG_WARN(1)PASS(1) NSPT(2)
SNB igt_pm_rpm_pci-d3-state NSPT(2)DMESG_WARN(1)PASS(1) NSPT(2)
SNB igt_pm_rpm_rte NSPT(2)DMESG_WARN(1)PASS(1) NSPT(2)
*BDW igt_gem_gtt_hog PASS(6) DMESG_WARN(1)PASS(1)
Note: You need to pay more attention to line start with '*'
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [PATCH] drm/i915: Remove wait for for punit to updates freq.
2015-03-05 4:08 [PATCH] drm/i915: Remove wait for for punit to updates freq deepak.s
2015-03-05 4:08 ` [PATCH] drm/i915: Update PM interrupts before updating the freq deepak.s
2015-03-05 7:46 ` [PATCH] drm/i915: Remove wait for for punit to updates freq shuang.he
@ 2015-04-13 11:55 ` Jani Nikula
2015-04-13 12:10 ` Ville Syrjälä
2015-04-28 18:16 ` Jesse Barnes
3 siblings, 1 reply; 18+ messages in thread
From: Jani Nikula @ 2015-04-13 11:55 UTC (permalink / raw)
To: deepak.s, intel-gfx; +Cc: Syrjala, Ville
On Thu, 05 Mar 2015, deepak.s@linux.intel.com wrote:
> From: Deepak S <deepak.s@linux.intel.com>
>
> When GPU is idle on VLV, Request freq to punit should be good enough to
> get the voltage back to VNN. Also, make sure gfx clock force applies
> before requesting the freq fot vlv.
>
> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=75244
> suggested-by: Jesse Barnes <jbarnes@virtuousgeek.org>
> Signed-off-by: Deepak S <deepak.s@linux.intel.com>
Deepak, these patches seem to have fallen through the cracks. Are they
still valid? Please rebase and repost if they are.
Ville, your opinion also appreciated.
BR,
Jani.
> ---
> drivers/gpu/drm/i915/intel_pm.c | 20 ++++----------------
> 1 file changed, 4 insertions(+), 16 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/intel_pm.c b/drivers/gpu/drm/i915/intel_pm.c
> index e710b43..2e1ed07 100644
> --- a/drivers/gpu/drm/i915/intel_pm.c
> +++ b/drivers/gpu/drm/i915/intel_pm.c
> @@ -3894,7 +3894,7 @@ static void valleyview_set_rps(struct drm_device *dev, u8 val)
> * * If Gfx is Idle, then
> * 1. Mask Turbo interrupts
> * 2. Bring up Gfx clock
> - * 3. Change the freq to Rpn and wait till P-Unit updates freq
> + * 3. Request the freq to Rpn.
> * 4. Clear the Force GFX CLK ON bit so that Gfx can down
> * 5. Unmask Turbo interrupts
> */
> @@ -3902,8 +3902,8 @@ static void vlv_set_rps_idle(struct drm_i915_private *dev_priv)
> {
> struct drm_device *dev = dev_priv->dev;
>
> - /* CHV and latest VLV don't need to force the gfx clock */
> - if (IS_CHERRYVIEW(dev) || dev->pdev->revision >= 0xd) {
> + /* CHV don't need to force the gfx clock */
> + if (IS_CHERRYVIEW(dev)) {
> valleyview_set_rps(dev_priv->dev, dev_priv->rps.min_freq_softlimit);
> return;
> }
> @@ -3920,20 +3920,8 @@ static void vlv_set_rps_idle(struct drm_i915_private *dev_priv)
> gen6_sanitize_rps_pm_mask(dev_priv, ~0));
>
> vlv_force_gfx_clock(dev_priv, true);
> -
> - dev_priv->rps.cur_freq = dev_priv->rps.min_freq_softlimit;
> -
> - vlv_punit_write(dev_priv, PUNIT_REG_GPU_FREQ_REQ,
> - dev_priv->rps.min_freq_softlimit);
> -
> - if (wait_for(((vlv_punit_read(dev_priv, PUNIT_REG_GPU_FREQ_STS))
> - & GENFREQSTATUS) == 0, 100))
> - DRM_ERROR("timed out waiting for Punit\n");
> -
> + valleyview_set_rps(dev_priv->dev, dev_priv->rps.min_freq_softlimit);
> vlv_force_gfx_clock(dev_priv, false);
> -
> - I915_WRITE(GEN6_PMINTRMSK,
> - gen6_rps_pm_mask(dev_priv, dev_priv->rps.cur_freq));
> }
>
> void gen6_rps_idle(struct drm_i915_private *dev_priv)
> --
> 1.9.1
>
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/intel-gfx
--
Jani Nikula, Intel Open Source Technology Center
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [PATCH] drm/i915: Remove wait for for punit to updates freq.
2015-04-13 11:55 ` Jani Nikula
@ 2015-04-13 12:10 ` Ville Syrjälä
2015-04-28 10:43 ` Deepak S
0 siblings, 1 reply; 18+ messages in thread
From: Ville Syrjälä @ 2015-04-13 12:10 UTC (permalink / raw)
To: Jani Nikula; +Cc: intel-gfx, Syrjala, Ville
On Mon, Apr 13, 2015 at 02:55:12PM +0300, Jani Nikula wrote:
> On Thu, 05 Mar 2015, deepak.s@linux.intel.com wrote:
> > From: Deepak S <deepak.s@linux.intel.com>
> >
> > When GPU is idle on VLV, Request freq to punit should be good enough to
> > get the voltage back to VNN. Also, make sure gfx clock force applies
> > before requesting the freq fot vlv.
> >
> > Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=75244
> > suggested-by: Jesse Barnes <jbarnes@virtuousgeek.org>
> > Signed-off-by: Deepak S <deepak.s@linux.intel.com>
>
> Deepak, these patches seem to have fallen through the cracks. Are they
> still valid? Please rebase and repost if they are.
>
> Ville, your opinion also appreciated.
I don't I have any VLVs old enough to hit this, so can't really confirm
one way or the other.
>
> BR,
> Jani.
>
>
>
> > ---
> > drivers/gpu/drm/i915/intel_pm.c | 20 ++++----------------
> > 1 file changed, 4 insertions(+), 16 deletions(-)
> >
> > diff --git a/drivers/gpu/drm/i915/intel_pm.c b/drivers/gpu/drm/i915/intel_pm.c
> > index e710b43..2e1ed07 100644
> > --- a/drivers/gpu/drm/i915/intel_pm.c
> > +++ b/drivers/gpu/drm/i915/intel_pm.c
> > @@ -3894,7 +3894,7 @@ static void valleyview_set_rps(struct drm_device *dev, u8 val)
> > * * If Gfx is Idle, then
> > * 1. Mask Turbo interrupts
> > * 2. Bring up Gfx clock
> > - * 3. Change the freq to Rpn and wait till P-Unit updates freq
> > + * 3. Request the freq to Rpn.
> > * 4. Clear the Force GFX CLK ON bit so that Gfx can down
> > * 5. Unmask Turbo interrupts
> > */
> > @@ -3902,8 +3902,8 @@ static void vlv_set_rps_idle(struct drm_i915_private *dev_priv)
> > {
> > struct drm_device *dev = dev_priv->dev;
> >
> > - /* CHV and latest VLV don't need to force the gfx clock */
> > - if (IS_CHERRYVIEW(dev) || dev->pdev->revision >= 0xd) {
> > + /* CHV don't need to force the gfx clock */
> > + if (IS_CHERRYVIEW(dev)) {
Why was the stepping check removed?
> > valleyview_set_rps(dev_priv->dev, dev_priv->rps.min_freq_softlimit);
> > return;
> > }
> > @@ -3920,20 +3920,8 @@ static void vlv_set_rps_idle(struct drm_i915_private *dev_priv)
> > gen6_sanitize_rps_pm_mask(dev_priv, ~0));
> >
> > vlv_force_gfx_clock(dev_priv, true);
> > -
> > - dev_priv->rps.cur_freq = dev_priv->rps.min_freq_softlimit;
> > -
> > - vlv_punit_write(dev_priv, PUNIT_REG_GPU_FREQ_REQ,
> > - dev_priv->rps.min_freq_softlimit);
> > -
> > - if (wait_for(((vlv_punit_read(dev_priv, PUNIT_REG_GPU_FREQ_STS))
> > - & GENFREQSTATUS) == 0, 100))
> > - DRM_ERROR("timed out waiting for Punit\n");
> > -
> > + valleyview_set_rps(dev_priv->dev, dev_priv->rps.min_freq_softlimit);
> > vlv_force_gfx_clock(dev_priv, false);
> > -
> > - I915_WRITE(GEN6_PMINTRMSK,
> > - gen6_rps_pm_mask(dev_priv, dev_priv->rps.cur_freq));
> > }
> >
> > void gen6_rps_idle(struct drm_i915_private *dev_priv)
> > --
> > 1.9.1
> >
> > _______________________________________________
> > Intel-gfx mailing list
> > Intel-gfx@lists.freedesktop.org
> > http://lists.freedesktop.org/mailman/listinfo/intel-gfx
>
> --
> Jani Nikula, Intel Open Source Technology Center
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/intel-gfx
--
Ville Syrjälä
Intel OTC
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [PATCH] drm/i915: Remove wait for for punit to updates freq.
2015-04-13 12:10 ` Ville Syrjälä
@ 2015-04-28 10:43 ` Deepak S
0 siblings, 0 replies; 18+ messages in thread
From: Deepak S @ 2015-04-28 10:43 UTC (permalink / raw)
To: Ville Syrjälä, Jani Nikula; +Cc: intel-gfx, Syrjala, Ville
On Monday 13 April 2015 05:40 PM, Ville Syrjälä wrote:
> On Mon, Apr 13, 2015 at 02:55:12PM +0300, Jani Nikula wrote:
>> On Thu, 05 Mar 2015, deepak.s@linux.intel.com wrote:
>>> From: Deepak S <deepak.s@linux.intel.com>
>>>
>>> When GPU is idle on VLV, Request freq to punit should be good enough to
>>> get the voltage back to VNN. Also, make sure gfx clock force applies
>>> before requesting the freq fot vlv.
>>>
>>> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=75244
>>> suggested-by: Jesse Barnes <jbarnes@virtuousgeek.org>
>>> Signed-off-by: Deepak S <deepak.s@linux.intel.com>
>> Deepak, these patches seem to have fallen through the cracks. Are they
>> still valid? Please rebase and repost if they are.
>>
>> Ville, your opinion also appreciated.
> I don't I have any VLVs old enough to hit this, so can't really confirm
> one way or the other.
Hi Jesse, Can you please review the patch?
Thanks
Deepak
>> BR,
>> Jani.
>>
>>
>>
>>> ---
>>> drivers/gpu/drm/i915/intel_pm.c | 20 ++++----------------
>>> 1 file changed, 4 insertions(+), 16 deletions(-)
>>>
>>> diff --git a/drivers/gpu/drm/i915/intel_pm.c b/drivers/gpu/drm/i915/intel_pm.c
>>> index e710b43..2e1ed07 100644
>>> --- a/drivers/gpu/drm/i915/intel_pm.c
>>> +++ b/drivers/gpu/drm/i915/intel_pm.c
>>> @@ -3894,7 +3894,7 @@ static void valleyview_set_rps(struct drm_device *dev, u8 val)
>>> * * If Gfx is Idle, then
>>> * 1. Mask Turbo interrupts
>>> * 2. Bring up Gfx clock
>>> - * 3. Change the freq to Rpn and wait till P-Unit updates freq
>>> + * 3. Request the freq to Rpn.
>>> * 4. Clear the Force GFX CLK ON bit so that Gfx can down
>>> * 5. Unmask Turbo interrupts
>>> */
>>> @@ -3902,8 +3902,8 @@ static void vlv_set_rps_idle(struct drm_i915_private *dev_priv)
>>> {
>>> struct drm_device *dev = dev_priv->dev;
>>>
>>> - /* CHV and latest VLV don't need to force the gfx clock */
>>> - if (IS_CHERRYVIEW(dev) || dev->pdev->revision >= 0xd) {
>>> + /* CHV don't need to force the gfx clock */
>>> + if (IS_CHERRYVIEW(dev)) {
> Why was the stepping check removed?
>
>>> valleyview_set_rps(dev_priv->dev, dev_priv->rps.min_freq_softlimit);
>>> return;
>>> }
>>> @@ -3920,20 +3920,8 @@ static void vlv_set_rps_idle(struct drm_i915_private *dev_priv)
>>> gen6_sanitize_rps_pm_mask(dev_priv, ~0));
>>>
>>> vlv_force_gfx_clock(dev_priv, true);
>>> -
>>> - dev_priv->rps.cur_freq = dev_priv->rps.min_freq_softlimit;
>>> -
>>> - vlv_punit_write(dev_priv, PUNIT_REG_GPU_FREQ_REQ,
>>> - dev_priv->rps.min_freq_softlimit);
>>> -
>>> - if (wait_for(((vlv_punit_read(dev_priv, PUNIT_REG_GPU_FREQ_STS))
>>> - & GENFREQSTATUS) == 0, 100))
>>> - DRM_ERROR("timed out waiting for Punit\n");
>>> -
>>> + valleyview_set_rps(dev_priv->dev, dev_priv->rps.min_freq_softlimit);
>>> vlv_force_gfx_clock(dev_priv, false);
>>> -
>>> - I915_WRITE(GEN6_PMINTRMSK,
>>> - gen6_rps_pm_mask(dev_priv, dev_priv->rps.cur_freq));
>>> }
>>>
>>> void gen6_rps_idle(struct drm_i915_private *dev_priv)
>>> --
>>> 1.9.1
>>>
>>> _______________________________________________
>>> Intel-gfx mailing list
>>> Intel-gfx@lists.freedesktop.org
>>> http://lists.freedesktop.org/mailman/listinfo/intel-gfx
>> --
>> Jani Nikula, Intel Open Source Technology Center
>> _______________________________________________
>> Intel-gfx mailing list
>> Intel-gfx@lists.freedesktop.org
>> http://lists.freedesktop.org/mailman/listinfo/intel-gfx
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [PATCH] drm/i915: Remove wait for for punit to updates freq.
2015-03-05 4:08 [PATCH] drm/i915: Remove wait for for punit to updates freq deepak.s
` (2 preceding siblings ...)
2015-04-13 11:55 ` Jani Nikula
@ 2015-04-28 18:16 ` Jesse Barnes
2015-04-28 18:32 ` Ville Syrjälä
2015-04-29 2:37 ` Deepak S
3 siblings, 2 replies; 18+ messages in thread
From: Jesse Barnes @ 2015-04-28 18:16 UTC (permalink / raw)
To: deepak.s, intel-gfx
On 03/04/2015 08:08 PM, deepak.s@linux.intel.com wrote:
> From: Deepak S <deepak.s@linux.intel.com>
>
> When GPU is idle on VLV, Request freq to punit should be good enough to
> get the voltage back to VNN. Also, make sure gfx clock force applies
> before requesting the freq fot vlv.
>
> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=75244
> suggested-by: Jesse Barnes <jbarnes@virtuousgeek.org>
> Signed-off-by: Deepak S <deepak.s@linux.intel.com>
> ---
> drivers/gpu/drm/i915/intel_pm.c | 20 ++++----------------
> 1 file changed, 4 insertions(+), 16 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/intel_pm.c b/drivers/gpu/drm/i915/intel_pm.c
> index e710b43..2e1ed07 100644
> --- a/drivers/gpu/drm/i915/intel_pm.c
> +++ b/drivers/gpu/drm/i915/intel_pm.c
> @@ -3894,7 +3894,7 @@ static void valleyview_set_rps(struct drm_device *dev, u8 val)
> * * If Gfx is Idle, then
> * 1. Mask Turbo interrupts
> * 2. Bring up Gfx clock
> - * 3. Change the freq to Rpn and wait till P-Unit updates freq
> + * 3. Request the freq to Rpn.
> * 4. Clear the Force GFX CLK ON bit so that Gfx can down
> * 5. Unmask Turbo interrupts
> */
> @@ -3902,8 +3902,8 @@ static void vlv_set_rps_idle(struct drm_i915_private *dev_priv)
> {
> struct drm_device *dev = dev_priv->dev;
>
> - /* CHV and latest VLV don't need to force the gfx clock */
> - if (IS_CHERRYVIEW(dev) || dev->pdev->revision >= 0xd) {
> + /* CHV don't need to force the gfx clock */
> + if (IS_CHERRYVIEW(dev)) {
> valleyview_set_rps(dev_priv->dev, dev_priv->rps.min_freq_softlimit);
> return;
> }
> @@ -3920,20 +3920,8 @@ static void vlv_set_rps_idle(struct drm_i915_private *dev_priv)
> gen6_sanitize_rps_pm_mask(dev_priv, ~0));
>
> vlv_force_gfx_clock(dev_priv, true);
> -
> - dev_priv->rps.cur_freq = dev_priv->rps.min_freq_softlimit;
> -
> - vlv_punit_write(dev_priv, PUNIT_REG_GPU_FREQ_REQ,
> - dev_priv->rps.min_freq_softlimit);
> -
> - if (wait_for(((vlv_punit_read(dev_priv, PUNIT_REG_GPU_FREQ_STS))
> - & GENFREQSTATUS) == 0, 100))
> - DRM_ERROR("timed out waiting for Punit\n");
> -
> + valleyview_set_rps(dev_priv->dev, dev_priv->rps.min_freq_softlimit);
> vlv_force_gfx_clock(dev_priv, false);
> -
> - I915_WRITE(GEN6_PMINTRMSK,
> - gen6_rps_pm_mask(dev_priv, dev_priv->rps.cur_freq));
> }
>
> void gen6_rps_idle(struct drm_i915_private *dev_priv)
>
Yeah I think this is fine (may need a rebase though, you can keep my r-b
if you do that in case Jani doesn't want to deal with the merge conflicts).
Reviewed-by: Jesse Barnes <jbarnes@virtuousgeek.org>
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [PATCH] drm/i915: Remove wait for for punit to updates freq.
2015-04-28 18:16 ` Jesse Barnes
@ 2015-04-28 18:32 ` Ville Syrjälä
2015-04-29 2:50 ` Deepak S
2015-04-29 2:37 ` Deepak S
1 sibling, 1 reply; 18+ messages in thread
From: Ville Syrjälä @ 2015-04-28 18:32 UTC (permalink / raw)
To: Jesse Barnes; +Cc: intel-gfx
On Tue, Apr 28, 2015 at 11:16:29AM -0700, Jesse Barnes wrote:
> On 03/04/2015 08:08 PM, deepak.s@linux.intel.com wrote:
> > From: Deepak S <deepak.s@linux.intel.com>
> >
> > When GPU is idle on VLV, Request freq to punit should be good enough to
> > get the voltage back to VNN. Also, make sure gfx clock force applies
> > before requesting the freq fot vlv.
> >
> > Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=75244
> > suggested-by: Jesse Barnes <jbarnes@virtuousgeek.org>
> > Signed-off-by: Deepak S <deepak.s@linux.intel.com>
> > ---
> > drivers/gpu/drm/i915/intel_pm.c | 20 ++++----------------
> > 1 file changed, 4 insertions(+), 16 deletions(-)
> >
> > diff --git a/drivers/gpu/drm/i915/intel_pm.c b/drivers/gpu/drm/i915/intel_pm.c
> > index e710b43..2e1ed07 100644
> > --- a/drivers/gpu/drm/i915/intel_pm.c
> > +++ b/drivers/gpu/drm/i915/intel_pm.c
> > @@ -3894,7 +3894,7 @@ static void valleyview_set_rps(struct drm_device *dev, u8 val)
> > * * If Gfx is Idle, then
> > * 1. Mask Turbo interrupts
> > * 2. Bring up Gfx clock
> > - * 3. Change the freq to Rpn and wait till P-Unit updates freq
> > + * 3. Request the freq to Rpn.
> > * 4. Clear the Force GFX CLK ON bit so that Gfx can down
> > * 5. Unmask Turbo interrupts
> > */
> > @@ -3902,8 +3902,8 @@ static void vlv_set_rps_idle(struct drm_i915_private *dev_priv)
> > {
> > struct drm_device *dev = dev_priv->dev;
> >
> > - /* CHV and latest VLV don't need to force the gfx clock */
> > - if (IS_CHERRYVIEW(dev) || dev->pdev->revision >= 0xd) {
> > + /* CHV don't need to force the gfx clock */
> > + if (IS_CHERRYVIEW(dev)) {
> > valleyview_set_rps(dev_priv->dev, dev_priv->rps.min_freq_softlimit);
> > return;
> > }
> > @@ -3920,20 +3920,8 @@ static void vlv_set_rps_idle(struct drm_i915_private *dev_priv)
> > gen6_sanitize_rps_pm_mask(dev_priv, ~0));
> >
> > vlv_force_gfx_clock(dev_priv, true);
> > -
> > - dev_priv->rps.cur_freq = dev_priv->rps.min_freq_softlimit;
> > -
> > - vlv_punit_write(dev_priv, PUNIT_REG_GPU_FREQ_REQ,
> > - dev_priv->rps.min_freq_softlimit);
> > -
> > - if (wait_for(((vlv_punit_read(dev_priv, PUNIT_REG_GPU_FREQ_STS))
> > - & GENFREQSTATUS) == 0, 100))
> > - DRM_ERROR("timed out waiting for Punit\n");
> > -
> > + valleyview_set_rps(dev_priv->dev, dev_priv->rps.min_freq_softlimit);
> > vlv_force_gfx_clock(dev_priv, false);
> > -
> > - I915_WRITE(GEN6_PMINTRMSK,
> > - gen6_rps_pm_mask(dev_priv, dev_priv->rps.cur_freq));
> > }
> >
> > void gen6_rps_idle(struct drm_i915_private *dev_priv)
> >
>
> Yeah I think this is fine (may need a rebase though, you can keep my r-b
> if you do that in case Jani doesn't want to deal with the merge conflicts).
>
> Reviewed-by: Jesse Barnes <jbarnes@virtuousgeek.org>
The removal of the stepping check is still confusing me even if the
rest would be OK.
--
Ville Syrjälä
Intel OTC
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [PATCH] drm/i915: Remove wait for for punit to updates freq.
2015-04-28 18:16 ` Jesse Barnes
2015-04-28 18:32 ` Ville Syrjälä
@ 2015-04-29 2:37 ` Deepak S
1 sibling, 0 replies; 18+ messages in thread
From: Deepak S @ 2015-04-29 2:37 UTC (permalink / raw)
To: Jesse Barnes, intel-gfx
On Tuesday 28 April 2015 11:46 PM, Jesse Barnes wrote:
>
> Yeah I think this is fine (may need a rebase though, you can keep my r-b
> if you do that in case Jani doesn't want to deal with the merge conflicts).
>
> Reviewed-by: Jesse Barnes <jbarnes@virtuousgeek.org>
Sure Jesse, I will rebase the patch.
Thanks
Deepak
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [PATCH] drm/i915: Remove wait for for punit to updates freq.
2015-04-28 18:32 ` Ville Syrjälä
@ 2015-04-29 2:50 ` Deepak S
2015-04-29 10:26 ` Ville Syrjälä
0 siblings, 1 reply; 18+ messages in thread
From: Deepak S @ 2015-04-29 2:50 UTC (permalink / raw)
To: Ville Syrjälä, Jesse Barnes; +Cc: intel-gfx
On Wednesday 29 April 2015 12:02 AM, Ville Syrjälä wrote:
> On Tue, Apr 28, 2015 at 11:16:29AM -0700, Jesse Barnes wrote:
>> On 03/04/2015 08:08 PM, deepak.s@linux.intel.com wrote:
>>> From: Deepak S <deepak.s@linux.intel.com>
>>>
>>> When GPU is idle on VLV, Request freq to punit should be good enough to
>>> get the voltage back to VNN. Also, make sure gfx clock force applies
>>> before requesting the freq fot vlv.
>>>
>>> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=75244
>>> suggested-by: Jesse Barnes <jbarnes@virtuousgeek.org>
>>> Signed-off-by: Deepak S <deepak.s@linux.intel.com>
>>> ---
>>> drivers/gpu/drm/i915/intel_pm.c | 20 ++++----------------
>>> 1 file changed, 4 insertions(+), 16 deletions(-)
>>>
>>> diff --git a/drivers/gpu/drm/i915/intel_pm.c b/drivers/gpu/drm/i915/intel_pm.c
>>> index e710b43..2e1ed07 100644
>>> --- a/drivers/gpu/drm/i915/intel_pm.c
>>> +++ b/drivers/gpu/drm/i915/intel_pm.c
>>> @@ -3894,7 +3894,7 @@ static void valleyview_set_rps(struct drm_device *dev, u8 val)
>>> * * If Gfx is Idle, then
>>> * 1. Mask Turbo interrupts
>>> * 2. Bring up Gfx clock
>>> - * 3. Change the freq to Rpn and wait till P-Unit updates freq
>>> + * 3. Request the freq to Rpn.
>>> * 4. Clear the Force GFX CLK ON bit so that Gfx can down
>>> * 5. Unmask Turbo interrupts
>>> */
>>> @@ -3902,8 +3902,8 @@ static void vlv_set_rps_idle(struct drm_i915_private *dev_priv)
>>> {
>>> struct drm_device *dev = dev_priv->dev;
>>>
>>> - /* CHV and latest VLV don't need to force the gfx clock */
>>> - if (IS_CHERRYVIEW(dev) || dev->pdev->revision >= 0xd) {
>>> + /* CHV don't need to force the gfx clock */
>>> + if (IS_CHERRYVIEW(dev)) {
>>> valleyview_set_rps(dev_priv->dev, dev_priv->rps.min_freq_softlimit);
>>> return;
>>> }
>>> @@ -3920,20 +3920,8 @@ static void vlv_set_rps_idle(struct drm_i915_private *dev_priv)
>>> gen6_sanitize_rps_pm_mask(dev_priv, ~0));
>>>
>>> vlv_force_gfx_clock(dev_priv, true);
>>> -
>>> - dev_priv->rps.cur_freq = dev_priv->rps.min_freq_softlimit;
>>> -
>>> - vlv_punit_write(dev_priv, PUNIT_REG_GPU_FREQ_REQ,
>>> - dev_priv->rps.min_freq_softlimit);
>>> -
>>> - if (wait_for(((vlv_punit_read(dev_priv, PUNIT_REG_GPU_FREQ_STS))
>>> - & GENFREQSTATUS) == 0, 100))
>>> - DRM_ERROR("timed out waiting for Punit\n");
>>> -
>>> + valleyview_set_rps(dev_priv->dev, dev_priv->rps.min_freq_softlimit);
>>> vlv_force_gfx_clock(dev_priv, false);
>>> -
>>> - I915_WRITE(GEN6_PMINTRMSK,
>>> - gen6_rps_pm_mask(dev_priv, dev_priv->rps.cur_freq));
>>> }
>>>
>>> void gen6_rps_idle(struct drm_i915_private *dev_priv)
>>>
>> Yeah I think this is fine (may need a rebase though, you can keep my r-b
>> if you do that in case Jani doesn't want to deal with the merge conflicts).
>>
>> Reviewed-by: Jesse Barnes <jbarnes@virtuousgeek.org>
> The removal of the stepping check is still confusing me even if the
> rest would be OK.
>
Stepping check was added latest BYT release. On older BYT stepping, We used to wait for punit to grant the freq in GT Idle case, (most of the cases punit is timing out :( )
We now make the gfx clock force apply to all VLV and then request the freq to RPn this should be good enough to get voltage to Vnn.
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [PATCH] drm/i915: Remove wait for for punit to updates freq.
2015-04-29 2:50 ` Deepak S
@ 2015-04-29 10:26 ` Ville Syrjälä
2015-04-30 10:04 ` Deepak S
0 siblings, 1 reply; 18+ messages in thread
From: Ville Syrjälä @ 2015-04-29 10:26 UTC (permalink / raw)
To: Deepak S; +Cc: intel-gfx
On Wed, Apr 29, 2015 at 08:20:20AM +0530, Deepak S wrote:
>
>
> On Wednesday 29 April 2015 12:02 AM, Ville Syrjälä wrote:
> > On Tue, Apr 28, 2015 at 11:16:29AM -0700, Jesse Barnes wrote:
> >> On 03/04/2015 08:08 PM, deepak.s@linux.intel.com wrote:
> >>> From: Deepak S <deepak.s@linux.intel.com>
> >>>
> >>> When GPU is idle on VLV, Request freq to punit should be good enough to
> >>> get the voltage back to VNN. Also, make sure gfx clock force applies
> >>> before requesting the freq fot vlv.
> >>>
> >>> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=75244
> >>> suggested-by: Jesse Barnes <jbarnes@virtuousgeek.org>
> >>> Signed-off-by: Deepak S <deepak.s@linux.intel.com>
> >>> ---
> >>> drivers/gpu/drm/i915/intel_pm.c | 20 ++++----------------
> >>> 1 file changed, 4 insertions(+), 16 deletions(-)
> >>>
> >>> diff --git a/drivers/gpu/drm/i915/intel_pm.c b/drivers/gpu/drm/i915/intel_pm.c
> >>> index e710b43..2e1ed07 100644
> >>> --- a/drivers/gpu/drm/i915/intel_pm.c
> >>> +++ b/drivers/gpu/drm/i915/intel_pm.c
> >>> @@ -3894,7 +3894,7 @@ static void valleyview_set_rps(struct drm_device *dev, u8 val)
> >>> * * If Gfx is Idle, then
> >>> * 1. Mask Turbo interrupts
> >>> * 2. Bring up Gfx clock
> >>> - * 3. Change the freq to Rpn and wait till P-Unit updates freq
> >>> + * 3. Request the freq to Rpn.
> >>> * 4. Clear the Force GFX CLK ON bit so that Gfx can down
> >>> * 5. Unmask Turbo interrupts
> >>> */
> >>> @@ -3902,8 +3902,8 @@ static void vlv_set_rps_idle(struct drm_i915_private *dev_priv)
> >>> {
> >>> struct drm_device *dev = dev_priv->dev;
> >>>
> >>> - /* CHV and latest VLV don't need to force the gfx clock */
> >>> - if (IS_CHERRYVIEW(dev) || dev->pdev->revision >= 0xd) {
> >>> + /* CHV don't need to force the gfx clock */
> >>> + if (IS_CHERRYVIEW(dev)) {
> >>> valleyview_set_rps(dev_priv->dev, dev_priv->rps.min_freq_softlimit);
> >>> return;
> >>> }
> >>> @@ -3920,20 +3920,8 @@ static void vlv_set_rps_idle(struct drm_i915_private *dev_priv)
> >>> gen6_sanitize_rps_pm_mask(dev_priv, ~0));
> >>>
> >>> vlv_force_gfx_clock(dev_priv, true);
> >>> -
> >>> - dev_priv->rps.cur_freq = dev_priv->rps.min_freq_softlimit;
> >>> -
> >>> - vlv_punit_write(dev_priv, PUNIT_REG_GPU_FREQ_REQ,
> >>> - dev_priv->rps.min_freq_softlimit);
> >>> -
> >>> - if (wait_for(((vlv_punit_read(dev_priv, PUNIT_REG_GPU_FREQ_STS))
> >>> - & GENFREQSTATUS) == 0, 100))
> >>> - DRM_ERROR("timed out waiting for Punit\n");
> >>> -
> >>> + valleyview_set_rps(dev_priv->dev, dev_priv->rps.min_freq_softlimit);
> >>> vlv_force_gfx_clock(dev_priv, false);
> >>> -
> >>> - I915_WRITE(GEN6_PMINTRMSK,
> >>> - gen6_rps_pm_mask(dev_priv, dev_priv->rps.cur_freq));
> >>> }
> >>>
> >>> void gen6_rps_idle(struct drm_i915_private *dev_priv)
> >>>
> >> Yeah I think this is fine (may need a rebase though, you can keep my r-b
> >> if you do that in case Jani doesn't want to deal with the merge conflicts).
> >>
> >> Reviewed-by: Jesse Barnes <jbarnes@virtuousgeek.org>
> > The removal of the stepping check is still confusing me even if the
> > rest would be OK.
> >
> Stepping check was added latest BYT release. On older BYT stepping, We used to wait for punit to grant the freq in GT Idle case, (most of the cases punit is timing out :( )
> We now make the gfx clock force apply to all VLV and then request the freq to RPn this should be good enough to get voltage to Vnn.
But we shouldn't need the gfx clock force for the latest VLV
stepping(s), and we certainly didn't do it before. So why do
it now?
--
Ville Syrjälä
Intel OTC
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [PATCH] drm/i915: Remove wait for for punit to updates freq.
2015-04-29 10:26 ` Ville Syrjälä
@ 2015-04-30 10:04 ` Deepak S
2015-05-04 7:59 ` Daniel Vetter
0 siblings, 1 reply; 18+ messages in thread
From: Deepak S @ 2015-04-30 10:04 UTC (permalink / raw)
To: Ville Syrjälä; +Cc: intel-gfx
On Wednesday 29 April 2015 03:56 PM, Ville Syrjälä wrote:
> On Wed, Apr 29, 2015 at 08:20:20AM +0530, Deepak S wrote:
>>
>> On Wednesday 29 April 2015 12:02 AM, Ville Syrjälä wrote:
>>> On Tue, Apr 28, 2015 at 11:16:29AM -0700, Jesse Barnes wrote:
>>>> On 03/04/2015 08:08 PM, deepak.s@linux.intel.com wrote:
>>>>> From: Deepak S <deepak.s@linux.intel.com>
>>>>>
>>>>> When GPU is idle on VLV, Request freq to punit should be good enough to
>>>>> get the voltage back to VNN. Also, make sure gfx clock force applies
>>>>> before requesting the freq fot vlv.
>>>>>
>>>>> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=75244
>>>>> suggested-by: Jesse Barnes <jbarnes@virtuousgeek.org>
>>>>> Signed-off-by: Deepak S <deepak.s@linux.intel.com>
>>>>> ---
>>>>> drivers/gpu/drm/i915/intel_pm.c | 20 ++++----------------
>>>>> 1 file changed, 4 insertions(+), 16 deletions(-)
>>>>>
>>>>> diff --git a/drivers/gpu/drm/i915/intel_pm.c b/drivers/gpu/drm/i915/intel_pm.c
>>>>> index e710b43..2e1ed07 100644
>>>>> --- a/drivers/gpu/drm/i915/intel_pm.c
>>>>> +++ b/drivers/gpu/drm/i915/intel_pm.c
>>>>> @@ -3894,7 +3894,7 @@ static void valleyview_set_rps(struct drm_device *dev, u8 val)
>>>>> * * If Gfx is Idle, then
>>>>> * 1. Mask Turbo interrupts
>>>>> * 2. Bring up Gfx clock
>>>>> - * 3. Change the freq to Rpn and wait till P-Unit updates freq
>>>>> + * 3. Request the freq to Rpn.
>>>>> * 4. Clear the Force GFX CLK ON bit so that Gfx can down
>>>>> * 5. Unmask Turbo interrupts
>>>>> */
>>>>> @@ -3902,8 +3902,8 @@ static void vlv_set_rps_idle(struct drm_i915_private *dev_priv)
>>>>> {
>>>>> struct drm_device *dev = dev_priv->dev;
>>>>>
>>>>> - /* CHV and latest VLV don't need to force the gfx clock */
>>>>> - if (IS_CHERRYVIEW(dev) || dev->pdev->revision >= 0xd) {
>>>>> + /* CHV don't need to force the gfx clock */
>>>>> + if (IS_CHERRYVIEW(dev)) {
>>>>> valleyview_set_rps(dev_priv->dev, dev_priv->rps.min_freq_softlimit);
>>>>> return;
>>>>> }
>>>>> @@ -3920,20 +3920,8 @@ static void vlv_set_rps_idle(struct drm_i915_private *dev_priv)
>>>>> gen6_sanitize_rps_pm_mask(dev_priv, ~0));
>>>>>
>>>>> vlv_force_gfx_clock(dev_priv, true);
>>>>> -
>>>>> - dev_priv->rps.cur_freq = dev_priv->rps.min_freq_softlimit;
>>>>> -
>>>>> - vlv_punit_write(dev_priv, PUNIT_REG_GPU_FREQ_REQ,
>>>>> - dev_priv->rps.min_freq_softlimit);
>>>>> -
>>>>> - if (wait_for(((vlv_punit_read(dev_priv, PUNIT_REG_GPU_FREQ_STS))
>>>>> - & GENFREQSTATUS) == 0, 100))
>>>>> - DRM_ERROR("timed out waiting for Punit\n");
>>>>> -
>>>>> + valleyview_set_rps(dev_priv->dev, dev_priv->rps.min_freq_softlimit);
>>>>> vlv_force_gfx_clock(dev_priv, false);
>>>>> -
>>>>> - I915_WRITE(GEN6_PMINTRMSK,
>>>>> - gen6_rps_pm_mask(dev_priv, dev_priv->rps.cur_freq));
>>>>> }
>>>>>
>>>>> void gen6_rps_idle(struct drm_i915_private *dev_priv)
>>>>>
>>>> Yeah I think this is fine (may need a rebase though, you can keep my r-b
>>>> if you do that in case Jani doesn't want to deal with the merge conflicts).
>>>>
>>>> Reviewed-by: Jesse Barnes <jbarnes@virtuousgeek.org>
>>> The removal of the stepping check is still confusing me even if the
>>> rest would be OK.
>>>
>> Stepping check was added latest BYT release. On older BYT stepping, We used to wait for punit to grant the freq in GT Idle case, (most of the cases punit is timing out :( )
>> We now make the gfx clock force apply to all VLV and then request the freq to RPn this should be good enough to get voltage to Vnn.
> But we shouldn't need the gfx clock force for the latest VLV
> stepping(s), and we certainly didn't do it before. So why do
> it now?
>
Hi Ville, This is keep code common across all the VLV stepping. :)
Thanks
Deepak
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [PATCH] drm/i915: Remove wait for for punit to updates freq.
2015-04-30 10:04 ` Deepak S
@ 2015-05-04 7:59 ` Daniel Vetter
0 siblings, 0 replies; 18+ messages in thread
From: Daniel Vetter @ 2015-05-04 7:59 UTC (permalink / raw)
To: Deepak S; +Cc: intel-gfx
On Thu, Apr 30, 2015 at 03:34:32PM +0530, Deepak S wrote:
>
>
> On Wednesday 29 April 2015 03:56 PM, Ville Syrjälä wrote:
> >On Wed, Apr 29, 2015 at 08:20:20AM +0530, Deepak S wrote:
> >>
> >>On Wednesday 29 April 2015 12:02 AM, Ville Syrjälä wrote:
> >>>On Tue, Apr 28, 2015 at 11:16:29AM -0700, Jesse Barnes wrote:
> >>>>On 03/04/2015 08:08 PM, deepak.s@linux.intel.com wrote:
> >>>>>From: Deepak S <deepak.s@linux.intel.com>
> >>>>>
> >>>>>When GPU is idle on VLV, Request freq to punit should be good enough to
> >>>>>get the voltage back to VNN. Also, make sure gfx clock force applies
> >>>>>before requesting the freq fot vlv.
> >>>>>
> >>>>>Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=75244
> >>>>>suggested-by: Jesse Barnes <jbarnes@virtuousgeek.org>
> >>>>>Signed-off-by: Deepak S <deepak.s@linux.intel.com>
> >>>>>---
> >>>>> drivers/gpu/drm/i915/intel_pm.c | 20 ++++----------------
> >>>>> 1 file changed, 4 insertions(+), 16 deletions(-)
> >>>>>
> >>>>>diff --git a/drivers/gpu/drm/i915/intel_pm.c b/drivers/gpu/drm/i915/intel_pm.c
> >>>>>index e710b43..2e1ed07 100644
> >>>>>--- a/drivers/gpu/drm/i915/intel_pm.c
> >>>>>+++ b/drivers/gpu/drm/i915/intel_pm.c
> >>>>>@@ -3894,7 +3894,7 @@ static void valleyview_set_rps(struct drm_device *dev, u8 val)
> >>>>> * * If Gfx is Idle, then
> >>>>> * 1. Mask Turbo interrupts
> >>>>> * 2. Bring up Gfx clock
> >>>>>- * 3. Change the freq to Rpn and wait till P-Unit updates freq
> >>>>>+ * 3. Request the freq to Rpn.
> >>>>> * 4. Clear the Force GFX CLK ON bit so that Gfx can down
> >>>>> * 5. Unmask Turbo interrupts
> >>>>> */
> >>>>>@@ -3902,8 +3902,8 @@ static void vlv_set_rps_idle(struct drm_i915_private *dev_priv)
> >>>>> {
> >>>>> struct drm_device *dev = dev_priv->dev;
> >>>>>- /* CHV and latest VLV don't need to force the gfx clock */
> >>>>>- if (IS_CHERRYVIEW(dev) || dev->pdev->revision >= 0xd) {
> >>>>>+ /* CHV don't need to force the gfx clock */
> >>>>>+ if (IS_CHERRYVIEW(dev)) {
> >>>>> valleyview_set_rps(dev_priv->dev, dev_priv->rps.min_freq_softlimit);
> >>>>> return;
> >>>>> }
> >>>>>@@ -3920,20 +3920,8 @@ static void vlv_set_rps_idle(struct drm_i915_private *dev_priv)
> >>>>> gen6_sanitize_rps_pm_mask(dev_priv, ~0));
> >>>>> vlv_force_gfx_clock(dev_priv, true);
> >>>>>-
> >>>>>- dev_priv->rps.cur_freq = dev_priv->rps.min_freq_softlimit;
> >>>>>-
> >>>>>- vlv_punit_write(dev_priv, PUNIT_REG_GPU_FREQ_REQ,
> >>>>>- dev_priv->rps.min_freq_softlimit);
> >>>>>-
> >>>>>- if (wait_for(((vlv_punit_read(dev_priv, PUNIT_REG_GPU_FREQ_STS))
> >>>>>- & GENFREQSTATUS) == 0, 100))
> >>>>>- DRM_ERROR("timed out waiting for Punit\n");
> >>>>>-
> >>>>>+ valleyview_set_rps(dev_priv->dev, dev_priv->rps.min_freq_softlimit);
> >>>>> vlv_force_gfx_clock(dev_priv, false);
> >>>>>-
> >>>>>- I915_WRITE(GEN6_PMINTRMSK,
> >>>>>- gen6_rps_pm_mask(dev_priv, dev_priv->rps.cur_freq));
> >>>>> }
> >>>>> void gen6_rps_idle(struct drm_i915_private *dev_priv)
> >>>>>
> >>>>Yeah I think this is fine (may need a rebase though, you can keep my r-b
> >>>>if you do that in case Jani doesn't want to deal with the merge conflicts).
> >>>>
> >>>>Reviewed-by: Jesse Barnes <jbarnes@virtuousgeek.org>
> >>>The removal of the stepping check is still confusing me even if the
> >>>rest would be OK.
> >>>
> >>Stepping check was added latest BYT release. On older BYT stepping, We used to wait for punit to grant the freq in GT Idle case, (most of the cases punit is timing out :( )
> >>We now make the gfx clock force apply to all VLV and then request the freq to RPn this should be good enough to get voltage to Vnn.
> >But we shouldn't need the gfx clock force for the latest VLV
> >stepping(s), and we certainly didn't do it before. So why do
> >it now?
> >
> Hi Ville, This is keep code common across all the VLV stepping. :)
Makes sense (at least to me) but please add this explanation to the commit
message when resending so it won't get lost.
-Daniel
--
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 18+ messages in thread
* [PATCH] drm/i915: Update PM interrupts before updating the freq
@ 2015-07-10 13:01 Praveen Paneri
2015-07-11 13:41 ` shuang.he
2015-07-11 16:46 ` Chris Wilson
0 siblings, 2 replies; 18+ messages in thread
From: Praveen Paneri @ 2015-07-10 13:01 UTC (permalink / raw)
To: intel-gfx; +Cc: Deepak S, Praveen Paneri
From: Deepak S <deepak.s@intel.com>
Currently we update the freq before masking the interrupts, which can
allow new interrupts to occur before the frequency has changed. These
extra interrupts might waste some cpu cycles. This patch corrects
this by masking interrupts prior to updating the frequency.
Signed-off-by: Deepak S <deepak.s@intel.com>
Signed-off-by: Praveen Paneri <praveen.paneri@intel.com>
---
drivers/gpu/drm/i915/intel_pm.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/gpu/drm/i915/intel_pm.c b/drivers/gpu/drm/i915/intel_pm.c
index 4e24d2b..1082123 100644
--- a/drivers/gpu/drm/i915/intel_pm.c
+++ b/drivers/gpu/drm/i915/intel_pm.c
@@ -4482,14 +4482,14 @@ static void valleyview_set_rps(struct drm_device *dev, u8 val)
"Odd GPU freq value\n"))
val &= ~1;
+ I915_WRITE(GEN6_PMINTRMSK, gen6_rps_pm_mask(dev_priv, val));
+
if (val != dev_priv->rps.cur_freq) {
vlv_punit_write(dev_priv, PUNIT_REG_GPU_FREQ_REQ, val);
if (!IS_CHERRYVIEW(dev_priv))
gen6_set_rps_thresholds(dev_priv, val);
}
- I915_WRITE(GEN6_PMINTRMSK, gen6_rps_pm_mask(dev_priv, val));
-
dev_priv->rps.cur_freq = val;
trace_intel_gpu_freq_change(intel_gpu_freq(dev_priv, val));
}
--
1.9.1
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply related [flat|nested] 18+ messages in thread
* Re: [PATCH] drm/i915: Update PM interrupts before updating the freq
2015-07-10 13:01 [PATCH] drm/i915: Update PM interrupts before updating the freq Praveen Paneri
@ 2015-07-11 13:41 ` shuang.he
2015-07-11 16:46 ` Chris Wilson
1 sibling, 0 replies; 18+ messages in thread
From: shuang.he @ 2015-07-11 13:41 UTC (permalink / raw)
To: shuang.he, julianx.dumez, christophe.sureau, lei.a.liu, intel-gfx,
praveen.paneri
Tested-By: Intel Graphics QA PRTS (Patch Regression Test System Contact: shuang.he@intel.com)
Task id: 6773
-------------------------------------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
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [PATCH] drm/i915: Update PM interrupts before updating the freq
2015-07-10 13:01 [PATCH] drm/i915: Update PM interrupts before updating the freq Praveen Paneri
2015-07-11 13:41 ` shuang.he
@ 2015-07-11 16:46 ` Chris Wilson
2015-07-13 9:28 ` Daniel Vetter
1 sibling, 1 reply; 18+ messages in thread
From: Chris Wilson @ 2015-07-11 16:46 UTC (permalink / raw)
To: Praveen Paneri; +Cc: Deepak S, intel-gfx
On Fri, Jul 10, 2015 at 06:31:40PM +0530, Praveen Paneri wrote:
> From: Deepak S <deepak.s@intel.com>
>
> Currently we update the freq before masking the interrupts, which can
> allow new interrupts to occur before the frequency has changed. These
> extra interrupts might waste some cpu cycles. This patch corrects
> this by masking interrupts prior to updating the frequency.
Well it won't waste CPU cycles as the interrupt is also masked by the
threshold limits, but there should be no harm at all in reordering the
patch so, and it does make a certain amount of sense.
> Signed-off-by: Deepak S <deepak.s@intel.com>
> Signed-off-by: Praveen Paneri <praveen.paneri@intel.com>
Quibbling over the language in the changelog aside,
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
-Chris
--
Chris Wilson, Intel Open Source Technology Centre
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [PATCH] drm/i915: Update PM interrupts before updating the freq
2015-07-11 16:46 ` Chris Wilson
@ 2015-07-13 9:28 ` Daniel Vetter
0 siblings, 0 replies; 18+ messages in thread
From: Daniel Vetter @ 2015-07-13 9:28 UTC (permalink / raw)
To: Chris Wilson, Praveen Paneri, intel-gfx, Deepak S
On Sat, Jul 11, 2015 at 05:46:37PM +0100, Chris Wilson wrote:
> On Fri, Jul 10, 2015 at 06:31:40PM +0530, Praveen Paneri wrote:
> > From: Deepak S <deepak.s@intel.com>
> >
> > Currently we update the freq before masking the interrupts, which can
> > allow new interrupts to occur before the frequency has changed. These
> > extra interrupts might waste some cpu cycles. This patch corrects
> > this by masking interrupts prior to updating the frequency.
>
> Well it won't waste CPU cycles as the interrupt is also masked by the
> threshold limits, but there should be no harm at all in reordering the
> patch so, and it does make a certain amount of sense.
Added and ...
>
> > Signed-off-by: Deepak S <deepak.s@intel.com>
> > Signed-off-by: Praveen Paneri <praveen.paneri@intel.com>
>
> Quibbling over the language in the changelog aside,
> Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
queued for -next, thanks for the patch.
-Daniel
--
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 18+ messages in thread
end of thread, other threads:[~2015-07-13 9:25 UTC | newest]
Thread overview: 18+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-03-05 4:08 [PATCH] drm/i915: Remove wait for for punit to updates freq deepak.s
2015-03-05 4:08 ` [PATCH] drm/i915: Update PM interrupts before updating the freq deepak.s
2015-03-05 10:30 ` shuang.he
2015-03-05 7:46 ` [PATCH] drm/i915: Remove wait for for punit to updates freq shuang.he
2015-04-13 11:55 ` Jani Nikula
2015-04-13 12:10 ` Ville Syrjälä
2015-04-28 10:43 ` Deepak S
2015-04-28 18:16 ` Jesse Barnes
2015-04-28 18:32 ` Ville Syrjälä
2015-04-29 2:50 ` Deepak S
2015-04-29 10:26 ` Ville Syrjälä
2015-04-30 10:04 ` Deepak S
2015-05-04 7:59 ` Daniel Vetter
2015-04-29 2:37 ` Deepak S
-- strict thread matches above, loose matches on Subject: below --
2015-07-10 13:01 [PATCH] drm/i915: Update PM interrupts before updating the freq Praveen Paneri
2015-07-11 13:41 ` shuang.he
2015-07-11 16:46 ` Chris Wilson
2015-07-13 9:28 ` Daniel Vetter
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox