From: deepak.s@intel.com
To: intel-gfx@lists.freedesktop.org
Subject: [PATCH] drm/i915: Add boot paramter to control rps boost at boot time.
Date: Mon, 3 Mar 2014 11:36:14 +0530 [thread overview]
Message-ID: <1393826774-32237-1-git-send-email-deepak.s@intel.com> (raw)
From: Deepak S <deepak.s@intel.com>
We are adding a module paramter to control rps boost. By default, we
enable the boost for better performace. Based on the need (perf/power)
we can either enable/disable.
Signed-off-by: Deepak S <deepak.s@intel.com>
---
drivers/gpu/drm/i915/i915_drv.h | 1 +
drivers/gpu/drm/i915/i915_gem.c | 15 ++++++++++++++-
drivers/gpu/drm/i915/i915_params.c | 8 ++++++++
3 files changed, 23 insertions(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/drm/i915/i915_drv.h
index 2baeeef..398b101 100644
--- a/drivers/gpu/drm/i915/i915_drv.h
+++ b/drivers/gpu/drm/i915/i915_drv.h
@@ -1963,6 +1963,7 @@ struct i915_params {
int panel_use_ssc;
int vbt_sdvo_panel_type;
int enable_rc6;
+ int enable_rps_boost;
int enable_fbc;
bool enable_hangcheck;
int enable_ppgtt;
diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c
index a8a069f..1478ea6 100644
--- a/drivers/gpu/drm/i915/i915_gem.c
+++ b/drivers/gpu/drm/i915/i915_gem.c
@@ -990,6 +990,17 @@ static bool can_wait_boost(struct drm_i915_file_private *file_priv)
return !atomic_xchg(&file_priv->rps_wait_boost, true);
}
+static int intel_enable_rps_boost(struct drm_device *dev)
+{
+ /* No RPS Boost before Ironlake */
+ if (INTEL_INFO(dev)->gen < 6)
+ return 0;
+
+ /* Respect the kernel parameter if it is set */
+ return i915.enable_rps_boost;
+
+}
+
/**
* __wait_seqno - wait until execution of seqno has finished
* @ring: the ring expected to report seqno
@@ -1030,7 +1041,9 @@ static int __wait_seqno(struct intel_ring_buffer *ring, u32 seqno,
timeout_expire = timeout ? jiffies + timespec_to_jiffies_timeout(timeout) : 0;
if (dev_priv->info->gen >= 6 && can_wait_boost(file_priv)) {
- gen6_rps_boost(dev_priv);
+ if (intel_enable_rps_boost(ring->dev))
+ gen6_rps_boost(dev_priv);
+
if (file_priv)
mod_delayed_work(dev_priv->wq,
&file_priv->mm.idle_work,
diff --git a/drivers/gpu/drm/i915/i915_params.c b/drivers/gpu/drm/i915/i915_params.c
index c743057..a19bd7d 100644
--- a/drivers/gpu/drm/i915/i915_params.c
+++ b/drivers/gpu/drm/i915/i915_params.c
@@ -47,6 +47,7 @@ struct i915_params i915 __read_mostly = {
.prefault_disable = 0,
.reset = true,
.invert_brightness = 0,
+ .enable_rps_boost = 1,
};
module_param_named(modeset, i915.modeset, int, 0400);
@@ -153,3 +154,10 @@ MODULE_PARM_DESC(invert_brightness,
"report PCI device ID, subsystem vendor and subsystem device ID "
"to dri-devel@lists.freedesktop.org, if your machine needs it. "
"It will then be included in an upcoming module version.");
+
+module_param_named(enable_rps_boost, i915.enable_rps_boost, int, 0600);
+MODULE_PARM_DESC(enable_rps_boost,
+ "Enable/Disable boost RPS frequency (default: true)");
+
+
+
--
1.8.5.2
next reply other threads:[~2014-03-03 6:05 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-03-03 6:06 deepak.s [this message]
2014-03-03 14:00 ` [PATCH] drm/i915: Add boot paramter to control rps boost at boot time Jani Nikula
2014-03-03 14:34 ` Ville Syrjälä
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=1393826774-32237-1-git-send-email-deepak.s@intel.com \
--to=deepak.s@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