From: Deepak S <deepak.s@linux.intel.com>
To: Chris Wilson <chris@chris-wilson.co.uk>, intel-gfx@lists.freedesktop.org
Cc: Daniel Vetter <daniel.vetter@ffwll.ch>,
Rodrigo Vivi <rodrigo.vivi@intel.com>
Subject: Re: [PATCH v2 4/7] drm/i915: Agressive downclocking on Baytrail
Date: Wed, 18 Mar 2015 16:45:08 +0530 [thread overview]
Message-ID: <55095E3C.1010500@linux.intel.com> (raw)
In-Reply-To: <1426672107-3076-5-git-send-email-chris@chris-wilson.co.uk>
On Wednesday 18 March 2015 03:18 PM, Chris Wilson wrote:
> Reuse the same reclocking strategy for Baytail as on its bigger brethren,
> Sandybridge and Ivybridge. In particular, this makes the device quicker
> to reclock (both up and down) though the tendency now is to downclock
> more aggressively to compensate for the RPS boosts.
>
> v2: Rebase
>
> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
> Cc: Deepak S <deepak.s@linux.intel.com>
> Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
> Cc: Rodrigo Vivi <rodrigo.vivi@intel.com>
> Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
> ---
> drivers/gpu/drm/i915/i915_drv.h | 3 +++
> drivers/gpu/drm/i915/i915_irq.c | 4 ++--
> drivers/gpu/drm/i915/i915_reg.h | 2 --
> drivers/gpu/drm/i915/intel_pm.c | 7 ++++++-
> 4 files changed, 11 insertions(+), 5 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/drm/i915/i915_drv.h
> index b156bc30c9c9..afb552c1a4f8 100644
> --- a/drivers/gpu/drm/i915/i915_drv.h
> +++ b/drivers/gpu/drm/i915/i915_drv.h
> @@ -1031,6 +1031,9 @@ struct intel_gen6_power_mgmt {
> u8 rp0_freq; /* Non-overclocked max frequency. */
> u32 cz_freq;
>
> + u8 up_threshold; /* Current %busy required to uplock */
> + u8 down_threshold; /* Current %busy required to downclock */
> +
> int last_adj;
> enum { LOW_POWER, BETWEEN, HIGH_POWER } power;
>
> diff --git a/drivers/gpu/drm/i915/i915_irq.c b/drivers/gpu/drm/i915/i915_irq.c
> index 6d8340d5a111..58af8e239971 100644
> --- a/drivers/gpu/drm/i915/i915_irq.c
> +++ b/drivers/gpu/drm/i915/i915_irq.c
> @@ -1050,7 +1050,7 @@ static u32 vlv_wa_c0_ei(struct drm_i915_private *dev_priv, u32 pm_iir)
> if (pm_iir & GEN6_PM_RP_DOWN_EI_EXPIRED) {
> if (!vlv_c0_above(dev_priv,
> &dev_priv->rps.down_ei, &now,
> - VLV_RP_DOWN_EI_THRESHOLD))
> + dev_priv->rps.down_threshold))
> events |= GEN6_PM_RP_DOWN_THRESHOLD;
> dev_priv->rps.down_ei = now;
> }
> @@ -1058,7 +1058,7 @@ static u32 vlv_wa_c0_ei(struct drm_i915_private *dev_priv, u32 pm_iir)
> if (pm_iir & GEN6_PM_RP_UP_EI_EXPIRED) {
> if (vlv_c0_above(dev_priv,
> &dev_priv->rps.up_ei, &now,
> - VLV_RP_UP_EI_THRESHOLD))
> + dev_priv->rps.up_threshold))
> events |= GEN6_PM_RP_UP_THRESHOLD;
> dev_priv->rps.up_ei = now;
> }
> diff --git a/drivers/gpu/drm/i915/i915_reg.h b/drivers/gpu/drm/i915/i915_reg.h
> index 5b84ee686f99..c94c06b21052 100644
> --- a/drivers/gpu/drm/i915/i915_reg.h
> +++ b/drivers/gpu/drm/i915/i915_reg.h
> @@ -671,8 +671,6 @@ enum skl_disp_power_wells {
> #define FB_FMAX_VMIN_FREQ_LO_MASK 0xf8000000
>
> #define VLV_CZ_CLOCK_TO_MILLI_SEC 100000
> -#define VLV_RP_UP_EI_THRESHOLD 90
> -#define VLV_RP_DOWN_EI_THRESHOLD 70
>
> /* vlv2 north clock has */
> #define CCK_FUSE_REG 0x8
> diff --git a/drivers/gpu/drm/i915/intel_pm.c b/drivers/gpu/drm/i915/intel_pm.c
> index e18f0fd22cf2..8b16bb3ae09f 100644
> --- a/drivers/gpu/drm/i915/intel_pm.c
> +++ b/drivers/gpu/drm/i915/intel_pm.c
> @@ -3914,6 +3914,8 @@ static void gen6_set_rps_thresholds(struct drm_i915_private *dev_priv, u8 val)
> GEN6_RP_DOWN_IDLE_AVG);
>
> dev_priv->rps.power = new_power;
> + dev_priv->rps.up_threshold = threshold_up;
> + dev_priv->rps.down_threshold = threshold_down;
> dev_priv->rps.last_adj = 0;
> }
>
> @@ -3985,8 +3987,10 @@ static void valleyview_set_rps(struct drm_device *dev, u8 val)
> "Odd GPU freq value\n"))
> val &= ~1;
>
> - if (val != dev_priv->rps.cur_freq)
> + if (val != dev_priv->rps.cur_freq) {
> vlv_punit_write(dev_priv, PUNIT_REG_GPU_FREQ_REQ, val);
> + gen6_set_rps_thresholds(dev_priv, val);
I think gen6_set_rps_thresholds should be under baytrail specific with platform check?
> + }
>
> I915_WRITE(GEN6_PMINTRMSK, gen6_rps_pm_mask(dev_priv, val));
>
> @@ -4035,6 +4039,7 @@ static void vlv_set_rps_idle(struct drm_i915_private *dev_priv)
> & 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));
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
next prev parent reply other threads:[~2015-03-18 11:18 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-03-18 9:48 RPS tuning for VLV and pageflips Chris Wilson
2015-03-18 9:48 ` [PATCH v2 1/7] drm/i915: Relax RPS contraints to allows setting minfreq on idle Chris Wilson
2015-03-18 11:12 ` Deepak S
2015-03-18 9:48 ` [PATCH v2 2/7] drm/i915: Improved w/a for rps on Baytrail Chris Wilson
2015-03-18 9:48 ` [PATCH v2 3/7] drm/i915: Use down ei for manual Baytrail RPS calculations Chris Wilson
2015-03-18 13:53 ` Daniel Vetter
2015-03-18 9:48 ` [PATCH v2 4/7] drm/i915: Agressive downclocking on Baytrail Chris Wilson
2015-03-18 11:15 ` Deepak S [this message]
2015-03-18 11:23 ` Chris Wilson
2015-03-18 11:27 ` Deepak S
2015-03-18 9:48 ` [PATCH v2 5/7] drm/i915: Fix computation of last_adjustment for RPS autotuning Chris Wilson
2015-03-18 9:48 ` [PATCH v2 6/7] drm/i915: Add i915_gem_request_unreference__unlocked Chris Wilson
2015-03-18 9:48 ` [PATCH v2 7/7] drm/i915: Boost GPU frequency if we detect outstanding pageflips Chris Wilson
2015-03-18 11:16 ` Deepak S
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=55095E3C.1010500@linux.intel.com \
--to=deepak.s@linux.intel.com \
--cc=chris@chris-wilson.co.uk \
--cc=daniel.vetter@ffwll.ch \
--cc=intel-gfx@lists.freedesktop.org \
--cc=rodrigo.vivi@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