All of lore.kernel.org
 help / color / mirror / Atom feed
From: Stuart Summers <stuart.summers@intel.com>
To: intel-gfx@lists.freedesktop.org
Subject: [PATCH 1/2] drm/i915: Re-add enable_rc6 modparam
Date: Tue, 14 May 2019 09:46:52 -0700	[thread overview]
Message-ID: <20190514164653.935-1-stuart.summers@intel.com> (raw)

To allow easier debug of platforms which do not fully support
power-saving render C-state 6, add back the module parameter
to allow RC6 flows to be disabled. Instead of directly affecting
the RC6 states via a bitmask as done previously, use this module
parameter to clear the has_rc6 field for these platforms.

Acked-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
Suggested-by: Vinay Belgaumkar <vinay.belgaumkar@intel.com>
Signed-off-by: Stuart Summers <stuart.summers@intel.com>
---
 drivers/gpu/drm/i915/i915_params.c | 3 +++
 drivers/gpu/drm/i915/i915_params.h | 3 ++-
 drivers/gpu/drm/i915/intel_pm.c    | 3 +++
 3 files changed, 8 insertions(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/i915/i915_params.c b/drivers/gpu/drm/i915/i915_params.c
index b5be0abbba35..e31406c6821d 100644
--- a/drivers/gpu/drm/i915/i915_params.c
+++ b/drivers/gpu/drm/i915/i915_params.c
@@ -169,6 +169,9 @@ i915_param_named_unsafe(inject_load_failure, uint, 0400,
 i915_param_named(enable_dpcd_backlight, bool, 0600,
 	"Enable support for DPCD backlight control (default:false)");
 
+i915_param_named_unsafe(enable_rc6, bool, 0400,
+	"Enable power-saving render C-state 6. (default: true)");
+
 #if IS_ENABLED(CONFIG_DRM_I915_GVT)
 i915_param_named(enable_gvt, bool, 0400,
 	"Enable support for Intel GVT-g graphics virtualization host support(default:false)");
diff --git a/drivers/gpu/drm/i915/i915_params.h b/drivers/gpu/drm/i915/i915_params.h
index 3f14e9881a0d..28bf4005a610 100644
--- a/drivers/gpu/drm/i915/i915_params.h
+++ b/drivers/gpu/drm/i915/i915_params.h
@@ -76,7 +76,8 @@ struct drm_printer;
 	param(bool, nuclear_pageflip, false) \
 	param(bool, enable_dp_mst, true) \
 	param(bool, enable_dpcd_backlight, false) \
-	param(bool, enable_gvt, false)
+	param(bool, enable_gvt, false) \
+	param(bool, enable_rc6, true)
 
 #define MEMBER(T, member, ...) T member;
 struct i915_params {
diff --git a/drivers/gpu/drm/i915/intel_pm.c b/drivers/gpu/drm/i915/intel_pm.c
index decdd79c3805..6b514dd033cb 100644
--- a/drivers/gpu/drm/i915/intel_pm.c
+++ b/drivers/gpu/drm/i915/intel_pm.c
@@ -7020,6 +7020,9 @@ static bool sanitize_rc6(struct drm_i915_private *i915)
 {
 	struct intel_device_info *info = mkwrite_device_info(i915);
 
+	if (!i915_modparams.enable_rc6)
+		info->has_rc6 = 0;
+
 	/* Powersaving is controlled by the host when inside a VM */
 	if (intel_vgpu_active(i915)) {
 		info->has_rc6 = 0;
-- 
2.21.0.5.gaeb582a983

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

             reply	other threads:[~2019-05-14 16:46 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-05-14 16:46 Stuart Summers [this message]
2019-05-14 16:46 ` [PATCH 2/2] drm/i915: Extend reset modparam to domain resets Stuart Summers
2019-05-14 16:54   ` Chris Wilson
2019-05-14 17:03     ` Summers, Stuart
2019-05-14 16:53 ` [PATCH 1/2] drm/i915: Re-add enable_rc6 modparam Chris Wilson
2019-05-14 18:32   ` Summers, Stuart
2019-05-15  0:06     ` Rodrigo Vivi
2019-05-15  5:43       ` Tvrtko Ursulin
2019-05-15 14:16         ` Summers, Stuart
2019-05-16  9:59       ` Jani Nikula
2019-05-16 14:10         ` Summers, Stuart
2019-05-16 15:42           ` Jani Nikula
2019-05-16 15:49             ` Summers, Stuart
2019-05-17 16:17               ` Rodrigo Vivi
2019-05-17 16:34                 ` Ville Syrjälä
2019-05-17 16:44                   ` Rodrigo Vivi
2019-05-17 17:02                     ` Ville Syrjälä
2019-05-21 19:17                 ` Summers, Stuart
2019-05-14 17:07 ` ✗ Fi.CI.CHECKPATCH: warning for series starting with [1/2] " Patchwork
2019-05-14 17:29 ` ✓ Fi.CI.BAT: success " Patchwork
2019-05-15  0:23 ` ✗ Fi.CI.IGT: failure " 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=20190514164653.935-1-stuart.summers@intel.com \
    --to=stuart.summers@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.