public inbox for intel-gfx@lists.freedesktop.org
 help / color / mirror / Atom feed
From: Mika Kuoppala <mika.kuoppala@linux.intel.com>
To: Damien Lespiau <damien.lespiau@intel.com>,
	intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH 1/4] drm/i915/skl: add turbo support
Date: Mon, 19 Jan 2015 12:02:32 +0200	[thread overview]
Message-ID: <87bnlvay13.fsf@gaia.fi.intel.com> (raw)
In-Reply-To: <1421431648-22904-2-git-send-email-damien.lespiau@intel.com>

Damien Lespiau <damien.lespiau@intel.com> writes:

> From: Jesse Barnes <jbarnes@virtuousgeek.org>
>
> Per latest PM programming guide.
>
> v2: the wrong flavour of the function updating the ring frequency was
>     called, leading to dead locks (Tvrtko)
>
> v3: Add GEN6_RP_MEDIA_IS_GFX to RP_CONTROL (Imre, done by Damien)
>
> Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
> Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>

Reviewed-by: Mika Kuoppala <mika.kuoppala@intel.com>

> ---
>  drivers/gpu/drm/i915/intel_pm.c | 30 ++++++++++++++++++++++++++++++
>  1 file changed, 30 insertions(+)
>
> diff --git a/drivers/gpu/drm/i915/intel_pm.c b/drivers/gpu/drm/i915/intel_pm.c
> index 03fc7f2..3a0aec0 100644
> --- a/drivers/gpu/drm/i915/intel_pm.c
> +++ b/drivers/gpu/drm/i915/intel_pm.c
> @@ -4025,9 +4025,37 @@ static void gen6_init_rps_frequencies(struct drm_device *dev)
>  	}
>  }
>  
> +/* See the Gen9_GT_PM_Programming_Guide doc for the below */
>  static void gen9_enable_rps(struct drm_device *dev)
>  {
>  	struct drm_i915_private *dev_priv = dev->dev_private;
> +
> +	gen6_gt_force_wake_get(dev_priv, FORCEWAKE_ALL);
> +
> +	I915_WRITE(GEN6_RPNSWREQ, 0xc800000);
> +	I915_WRITE(GEN6_RC_VIDEO_FREQ, 0xc800000);
> +
> +	I915_WRITE(GEN6_RP_DOWN_TIMEOUT, 0xf4240);
> +	I915_WRITE(GEN6_RP_INTERRUPT_LIMITS, 0x12060000);
> +	I915_WRITE(GEN6_RP_UP_THRESHOLD, 0xe808);
> +	I915_WRITE(GEN6_RP_DOWN_THRESHOLD, 0x3bd08);
> +	I915_WRITE(GEN6_RP_UP_EI, 0x101d0);
> +	I915_WRITE(GEN6_RP_DOWN_EI, 0x55730);
> +	I915_WRITE(GEN6_RP_IDLE_HYSTERSIS, 0xa);
> +	I915_WRITE(GEN6_PMINTRMSK, 0x6);
> +	I915_WRITE(GEN6_RP_CONTROL, GEN6_RP_MEDIA_TURBO |
> +		   GEN6_RP_MEDIA_HW_MODE | GEN6_RP_MEDIA_IS_GFX |
> +		   GEN6_RP_ENABLE | GEN6_RP_UP_BUSY_AVG |
> +		   GEN6_RP_DOWN_IDLE_AVG);
> +
> +	gen6_enable_rps_interrupts(dev);
> +
> +	gen6_gt_force_wake_put(dev_priv, FORCEWAKE_ALL);
> +}
> +
> +static void gen9_enable_rc6(struct drm_device *dev)
> +{
> +	struct drm_i915_private *dev_priv = dev->dev_private;
>  	struct intel_engine_cs *ring;
>  	uint32_t rc6_mask = 0;
>  	int unused;
> @@ -5527,7 +5555,9 @@ static void intel_gen6_powersave_work(struct work_struct *work)
>  	} else if (IS_VALLEYVIEW(dev)) {
>  		valleyview_enable_rps(dev);
>  	} else if (INTEL_INFO(dev)->gen >= 9) {
> +		gen9_enable_rc6(dev);
>  		gen9_enable_rps(dev);
> +		__gen6_update_ring_freq(dev);
>  	} else if (IS_BROADWELL(dev)) {
>  		gen8_enable_rps(dev);
>  		__gen6_update_ring_freq(dev);
> -- 
> 1.8.3.1
>
> _______________________________________________
> 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

  reply	other threads:[~2015-01-19 10:02 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-01-16 18:07 [PATCH 0/4] SKL turbo part 1 Damien Lespiau
2015-01-16 18:07 ` [PATCH 1/4] drm/i915/skl: add turbo support Damien Lespiau
2015-01-19 10:02   ` Mika Kuoppala [this message]
2015-01-16 18:07 ` [PATCH 2/4] drm/i915/skl: Retrieve the frequency limits Damien Lespiau
2015-01-20 10:14   ` Daniel Vetter
2015-01-20 11:45     ` Damien Lespiau
2015-01-16 18:07 ` [PATCH 3/4] drm/i915/skl: Gen9 coarse power gating Damien Lespiau
2015-01-19 15:39   ` Damien Lespiau
2015-01-16 18:07 ` [PATCH 4/4] drm/i915/skl: Updated the RC6/Forcewake related debugfs interface for Gen9 Damien Lespiau
2015-01-17 10:59   ` shuang.he
2015-01-19 15:50   ` Damien Lespiau
2016-06-27 14:40   ` [PATCH v3] drm/i915/gen9: Update i915_drpc_info debugfs for coarse pg & forcewake info akash.goel
2016-08-01 17:48     ` Kamble, Sagar A
2016-08-02 14:09       ` Daniel Vetter
2016-08-04 18:31         ` David Weinehall
2016-08-05  8:24           ` Jani Nikula
2016-08-08 11:10             ` David Weinehall
2016-06-27 14:52 ` ✗ Ro.CI.BAT: warning for " Patchwork

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=87bnlvay13.fsf@gaia.fi.intel.com \
    --to=mika.kuoppala@linux.intel.com \
    --cc=damien.lespiau@intel.com \
    --cc=intel-gfx@lists.freedesktop.org \
    /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