[Intel-gfx] [PATCH 1/2] drm/i915: Re-add enable_rc6 modparam

Stuart Summers stuart.summers at intel.com
Tue May 14 16:46:52 UTC 2019


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 at intel.com>
Suggested-by: Vinay Belgaumkar <vinay.belgaumkar at intel.com>
Signed-off-by: Stuart Summers <stuart.summers at 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



More information about the Intel-gfx mailing list