From: Sagar Arun Kamble <sagar.a.kamble@intel.com>
To: intel-gfx@lists.freedesktop.org
Subject: [PATCH 08/10] drm/i915: Create generic function to setup ring frequency table
Date: Wed, 4 Oct 2017 19:37:23 +0530 [thread overview]
Message-ID: <1507126045-24526-9-git-send-email-sagar.a.kamble@intel.com> (raw)
In-Reply-To: <1507126045-24526-1-git-send-email-sagar.a.kamble@intel.com>
Prepared intel_update_ring_freq function to setup ring frequency
for applicable platforms determined by macro - NEEDS_RING_FREQ_UPDATE
Signed-off-by: Sagar Arun Kamble <sagar.a.kamble@intel.com>
Cc: Imre Deak <imre.deak@intel.com>
Cc: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
Cc: Radoslaw Szwichtenberg <radoslaw.szwichtenberg@intel.com>
---
drivers/gpu/drm/i915/intel_pm.c | 19 +++++++++++++++----
1 file changed, 15 insertions(+), 4 deletions(-)
diff --git a/drivers/gpu/drm/i915/intel_pm.c b/drivers/gpu/drm/i915/intel_pm.c
index 1ccc3fb..62aed72 100644
--- a/drivers/gpu/drm/i915/intel_pm.c
+++ b/drivers/gpu/drm/i915/intel_pm.c
@@ -7868,6 +7868,19 @@ static void intel_init_emon(struct drm_i915_private *dev_priv)
dev_priv->ips.corr = (lcfuse & LCFUSE_HIV_MASK);
}
+#define NEEDS_RING_FREQ_UPDATE(i915) \
+ (((INTEL_GEN(i915) >= 9) && \
+ (IS_GEN9_BC(i915) || IS_CANNONLAKE(i915))) || \
+ (IS_BROADWELL(i915)) || \
+ ((INTEL_GEN(i915) >= 6) && \
+ (!IS_CHERRYVIEW(i915) && !IS_VALLEYVIEW(i915))))
+
+static inline void intel_update_ring_freq(struct drm_i915_private *i915)
+{
+ if (NEEDS_RING_FREQ_UPDATE(i915))
+ gen6_update_ring_freq(i915);
+}
+
void intel_init_gt_powersave(struct drm_i915_private *dev_priv)
{
struct intel_rps *rps = &dev_priv->pm.rps;
@@ -8014,21 +8027,19 @@ void intel_enable_gt_powersave(struct drm_i915_private *dev_priv)
} else if (INTEL_GEN(dev_priv) >= 9) {
gen9_enable_rc6(dev_priv);
gen9_enable_rps(dev_priv);
- if (IS_GEN9_BC(dev_priv) || IS_CANNONLAKE(dev_priv))
- gen6_update_ring_freq(dev_priv);
} else if (IS_BROADWELL(dev_priv)) {
gen8_enable_rc6(dev_priv);
gen8_enable_rps(dev_priv);
- gen6_update_ring_freq(dev_priv);
} else if (INTEL_GEN(dev_priv) >= 6) {
gen6_enable_rc6(dev_priv);
gen6_enable_rps(dev_priv);
- gen6_update_ring_freq(dev_priv);
} else if (IS_IRONLAKE_M(dev_priv)) {
ironlake_enable_drps(dev_priv);
intel_init_emon(dev_priv);
}
+ intel_update_ring_freq(dev_priv);
+
WARN_ON(dev_priv->pm.rps.max_freq < dev_priv->pm.rps.min_freq);
WARN_ON(dev_priv->pm.rps.idle_freq > dev_priv->pm.rps.max_freq);
--
1.9.1
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
next prev parent reply other threads:[~2017-10-04 14:04 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-10-04 14:07 [PATCH 00/10] drm/i915: Separate RC6, RPS, Ring Frequency management Sagar Arun Kamble
2017-10-04 14:07 ` [PATCH 01/10] drm/i915: Separate RPS and RC6 handling for gen6+ Sagar Arun Kamble
2017-10-05 17:36 ` Chris Wilson
2017-10-04 14:07 ` [PATCH 02/10] drm/i915: Separate RPS and RC6 handling for BDW Sagar Arun Kamble
2017-10-05 17:39 ` Chris Wilson
2017-10-04 14:07 ` [PATCH 03/10] drm/i915: Separate RPS and RC6 handling for VLV Sagar Arun Kamble
2017-10-05 17:42 ` Chris Wilson
2017-10-04 14:07 ` [PATCH 04/10] drm/i915: Separate RPS and RC6 handling for CHV Sagar Arun Kamble
2017-10-05 17:42 ` Chris Wilson
2017-10-04 14:07 ` [PATCH 05/10] drm/i915: Name i915_runtime_pm structure in dev_priv as "rpm" Sagar Arun Kamble
2017-10-05 17:44 ` Chris Wilson
2017-10-05 17:46 ` Chris Wilson
2017-10-04 14:07 ` [PATCH 06/10] drm/i915: Name structure in dev_priv that contains RPS/RC6 state as "pm" Sagar Arun Kamble
2017-10-05 17:47 ` Chris Wilson
2017-10-04 14:07 ` [PATCH 07/10] drm/i915: Rename intel_enable_rc6 to intel_rc6_enabled Sagar Arun Kamble
2017-10-05 17:49 ` Chris Wilson
2017-10-04 14:07 ` Sagar Arun Kamble [this message]
2017-10-04 17:04 ` [PATCH 08/10] drm/i915: Create generic function to setup ring frequency table Chris Wilson
2017-10-04 17:46 ` Sagar Arun Kamble
2017-10-04 14:07 ` [PATCH 09/10] drm/i915: Create generic functions to control RC6, RPS Sagar Arun Kamble
2017-10-05 17:54 ` Chris Wilson
2017-10-06 11:31 ` Sagar Arun Kamble
2017-10-04 14:07 ` [PATCH 10/10] drm/i915: Introduce separate status variable for RC6 and Ring frequency setup Sagar Arun Kamble
2017-10-04 17:06 ` Chris Wilson
2017-10-04 18:41 ` Sagar Arun Kamble
2017-10-04 15:26 ` ✓ Fi.CI.BAT: success for drm/i915: Separate RC6, RPS, Ring Frequency management Patchwork
2017-10-04 17:07 ` [PATCH 00/10] " Chris Wilson
2017-10-04 17:14 ` ✓ Fi.CI.IGT: success 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=1507126045-24526-9-git-send-email-sagar.a.kamble@intel.com \
--to=sagar.a.kamble@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