From: Deepak S <deepak.s@linux.intel.com>
To: "Ville Syrjälä" <ville.syrjala@linux.intel.com>
Cc: daniel.vetter@ffwll.ch, intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH v2 1/2] drm/i915/vlv: Remove wait for for punit to updates freq.
Date: Sat, 09 May 2015 11:00:29 +0530 [thread overview]
Message-ID: <554D9B75.9020303@linux.intel.com> (raw)
In-Reply-To: <20150508163405.GH18908@intel.com>
On Friday 08 May 2015 10:04 PM, Ville Syrjälä wrote:
> On Fri, May 08, 2015 at 08:43:10PM +0530, 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.
>>
>> v2: Do forcewake before setting idle frequency (ville)
>> Update function comments to match the code (Deepak)
>>
>> 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 | 41 +++++++++++------------------------------
>> 1 file changed, 11 insertions(+), 30 deletions(-)
>>
>> diff --git a/drivers/gpu/drm/i915/intel_pm.c b/drivers/gpu/drm/i915/intel_pm.c
>> index a7516ed..3df929a 100644
>> --- a/drivers/gpu/drm/i915/intel_pm.c
>> +++ b/drivers/gpu/drm/i915/intel_pm.c
>> @@ -4043,51 +4043,32 @@ static void valleyview_set_rps(struct drm_device *dev, u8 val)
>> trace_intel_gpu_freq_change(intel_gpu_freq(dev_priv, val));
>> }
>>
>> -/* vlv_set_rps_idle: Set the frequency to Rpn if Gfx clocks are down
>> +/* vlv_set_rps_idle: Set the frequency to idle, if Gfx clocks are down
>> *
>> * * 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
>> - * 4. Clear the Force GFX CLK ON bit so that Gfx can down
>> - * 5. Unmask Turbo interrupts
>> + * 1. Forcewake Media well.
>> + * 2. Request idle freq.
>> + * 3. Release Forcewake of Media well.
>> */
>> static void vlv_set_rps_idle(struct drm_i915_private *dev_priv)
>> {
>> struct drm_device *dev = dev_priv->dev;
>> u32 val = dev_priv->rps.idle_freq;
>>
>> - /* 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, val);
>> return;
>> }
>>
>> - /*
>> - * When we are idle. Drop to min voltage state.
>> - */
>> -
>> if (dev_priv->rps.cur_freq <= val)
>> return;
>>
>> - /* Mask turbo interrupt so that they will not come in between */
>> - I915_WRITE(GEN6_PMINTRMSK,
>> - gen6_sanitize_rps_pm_mask(dev_priv, ~0));
>> -
>> - vlv_force_gfx_clock(dev_priv, true);
>> -
>> - dev_priv->rps.cur_freq = val;
>> -
>> - vlv_punit_write(dev_priv, PUNIT_REG_GPU_FREQ_REQ, val);
>> -
>> - if (wait_for(((vlv_punit_read(dev_priv, PUNIT_REG_GPU_FREQ_STS))
>> - & GENFREQSTATUS) == 0, 100))
>> - DRM_ERROR("timed out waiting for Punit\n");
>> -
>> - gen6_set_rps_thresholds(dev_priv, val);
>> - vlv_force_gfx_clock(dev_priv, false);
>> -
>> - I915_WRITE(GEN6_PMINTRMSK, gen6_rps_pm_mask(dev_priv, val));
>> + /* Wake up the media well, as that takes a lot less
>> + * power than the Render well. */
>> + intel_uncore_forcewake_get(dev_priv, FORCEWAKE_MEDIA);
>> + valleyview_set_rps(dev_priv->dev, val);
>> + intel_uncore_forcewake_get(dev_priv, FORCEWAKE_MEDIA);
> _put
>
> With that fixed this is:
> Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Oops :) Copy paste problem :)
>> }
>>
>> void gen6_rps_busy(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
next prev parent reply other threads:[~2015-05-09 5:33 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-05-08 15:13 [PATCH v2 1/2] drm/i915/vlv: Remove wait for for punit to updates freq deepak.s
2015-05-08 15:13 ` [PATCH v2 2/2] drm/i915/chv: Extend set idle rps wa to chv deepak.s
2015-05-08 16:36 ` Ville Syrjälä
2015-05-09 12:41 ` [PATCH v2] " deepak.s
2015-05-09 10:32 ` [PATCH v2 2/2] " shuang.he
2015-05-08 15:13 ` [PATCH v4] drm/i915/chv: Set min freq to efficient frequency on chv deepak.s
2015-05-08 15:24 ` shuang.he
2015-05-08 16:39 ` Ville Syrjälä
2015-05-09 5:34 ` Deepak S
2015-05-09 12:45 ` deepak.s
2015-05-11 10:23 ` Daniel Vetter
2015-05-11 11:06 ` Ville Syrjälä
2015-05-08 16:34 ` [PATCH v2 1/2] drm/i915/vlv: Remove wait for for punit to updates freq Ville Syrjälä
2015-05-09 5:30 ` Deepak S [this message]
2015-05-09 12:34 ` [PATCH v3] " deepak.s
2015-05-09 19:19 ` shuang.he
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=554D9B75.9020303@linux.intel.com \
--to=deepak.s@linux.intel.com \
--cc=daniel.vetter@ffwll.ch \
--cc=intel-gfx@lists.freedesktop.org \
--cc=ville.syrjala@linux.intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox