Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1495940

[PATCH 3/6] drm/i915: Add enable_sagv option

From Lyude <cpaul@redhat.com>
Newsgroups linux.kernel
Subject [PATCH 3/6] drm/i915: Add enable_sagv option
Date 2016-10-05 17:40 +0200
Message-ID <soWsy-2L8-35@gated-at.bofh.it> (permalink)
References <soWsx-2L8-15@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


This option allows us to manually control the SAGV at module load time.
This can be useful in situations such as trying to debug watermark
changes, since enabled SAGV + incorrect watermarks = total GPU
annihilation.

Signed-off-by: Lyude <cpaul@redhat.com>
Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
Cc: Matt Roper <matthew.d.roper@intel.com>
---
 drivers/gpu/drm/i915/i915_params.c   |  5 +++++
 drivers/gpu/drm/i915/i915_params.h   |  1 +
 drivers/gpu/drm/i915/intel_display.c | 16 +++++++++++++---
 3 files changed, 19 insertions(+), 3 deletions(-)

diff --git a/drivers/gpu/drm/i915/i915_params.c b/drivers/gpu/drm/i915/i915_params.c
index 768ad89..f462cd4 100644
--- a/drivers/gpu/drm/i915/i915_params.c
+++ b/drivers/gpu/drm/i915/i915_params.c
@@ -62,6 +62,7 @@ struct i915_params i915 __read_mostly = {
 	.inject_load_failure = 0,
 	.enable_dpcd_backlight = false,
 	.enable_gvt = false,
+	.enable_sagv = -1,
 };
 
 module_param_named(modeset, i915.modeset, int, 0400);
@@ -233,3 +234,7 @@ MODULE_PARM_DESC(enable_dpcd_backlight,
 module_param_named(enable_gvt, i915.enable_gvt, bool, 0400);
 MODULE_PARM_DESC(enable_gvt,
 	"Enable support for Intel GVT-g graphics virtualization host support(default:false)");
+
+module_param_named_unsafe(enable_sagv, i915.enable_sagv, int, 0400);
+MODULE_PARM_DESC(enable_sagv,
+	"Enable the SAGV (gen9+ only)(1=enabled, 0=disabled, -1=driver discretion [default])");
diff --git a/drivers/gpu/drm/i915/i915_params.h b/drivers/gpu/drm/i915/i915_params.h
index 3a0dd78..a7db125 100644
--- a/drivers/gpu/drm/i915/i915_params.h
+++ b/drivers/gpu/drm/i915/i915_params.h
@@ -65,6 +65,7 @@ struct i915_params {
 	bool enable_dp_mst;
 	bool enable_dpcd_backlight;
 	bool enable_gvt;
+	int enable_sagv;
 };
 
 extern struct i915_params i915 __read_mostly;
diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
index a71d05a..dd15ae2 100644
--- a/drivers/gpu/drm/i915/intel_display.c
+++ b/drivers/gpu/drm/i915/intel_display.c
@@ -16904,12 +16904,22 @@ intel_modeset_setup_hw_state(struct drm_device *dev)
 		pll->on = false;
 	}
 
-	if (IS_VALLEYVIEW(dev) || IS_CHERRYVIEW(dev))
+	if (IS_VALLEYVIEW(dev) || IS_CHERRYVIEW(dev)) {
 		vlv_wm_get_hw_state(dev);
-	else if (IS_GEN9(dev))
+	} else if (IS_GEN9(dev)) {
 		skl_wm_get_hw_state(dev);
-	else if (HAS_PCH_SPLIT(dev))
+
+		if (i915.enable_sagv != -1) {
+			if (i915.enable_sagv)
+				intel_enable_sagv(dev_priv);
+			else
+				intel_disable_sagv(dev_priv);
+
+			dev_priv->sagv_status = I915_SAGV_NOT_CONTROLLED;
+		}
+	} else if (HAS_PCH_SPLIT(dev)) {
 		ilk_wm_get_hw_state(dev);
+	}
 
 	for_each_intel_crtc(dev, crtc) {
 		unsigned long put_domains;
-- 
2.7.4

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH 0/6] Start of skl watermark cleanup Lyude <cpaul@redhat.com> - 2016-10-05 17:40 +0200
  [PATCH 2/6] drm/i915/skl: Remove linetime from skl_wm_values Lyude <cpaul@redhat.com> - 2016-10-05 17:40 +0200
    Re: [Intel-gfx] [PATCH 2/6] drm/i915/skl: Remove linetime from  skl_wm_values Paulo Zanoni <paulo.r.zanoni@intel.com> - 2016-10-05 22:30 +0200
  [PATCH 1/6] drm/i915/skl: Move per-pipe ddb allocations into crtc states Lyude <cpaul@redhat.com> - 2016-10-05 17:40 +0200
    Re: [Intel-gfx] [PATCH 1/6] drm/i915/skl: Move per-pipe ddb  allocations into crtc states Paulo Zanoni <paulo.r.zanoni@intel.com> - 2016-10-05 22:30 +0200
  [PATCH 5/6] drm/i915/gen9: Get rid of redundant watermark values Lyude <cpaul@redhat.com> - 2016-10-05 17:40 +0200
    Re: [Intel-gfx] [PATCH 5/6] drm/i915/gen9: Get rid of redundant  watermark values Paulo Zanoni <paulo.r.zanoni@intel.com> - 2016-10-05 23:50 +0200
      Re: [Intel-gfx] [PATCH 5/6] drm/i915/gen9: Get rid of redundant  watermark values Chris Wilson <chris@chris-wilson.co.uk> - 2016-10-06 00:00 +0200
  [PATCH 6/6] drm/i915/gen9: Add ddb changes to atomic debug output Lyude <cpaul@redhat.com> - 2016-10-05 17:40 +0200
  [PATCH 3/6] drm/i915: Add enable_sagv option Lyude <cpaul@redhat.com> - 2016-10-05 17:40 +0200
    Re: [Intel-gfx] [PATCH 3/6] drm/i915: Add enable_sagv option Paulo Zanoni <paulo.r.zanoni@intel.com> - 2016-10-05 21:40 +0200
  [PATCH 4/6] drm/i915/gen9: Make skl_wm_level per-plane Lyude <cpaul@redhat.com> - 2016-10-05 17:40 +0200
    Re: [Intel-gfx] [PATCH 4/6] drm/i915/gen9: Make skl_wm_level  per-plane Paulo Zanoni <paulo.r.zanoni@intel.com> - 2016-10-05 22:40 +0200
      Re: [Intel-gfx] [PATCH 4/6] drm/i915/gen9: Make skl_wm_level  per-plane Maarten Lankhorst <maarten.lankhorst@linux.intel.com> - 2016-10-06 12:40 +0200
  Re: [PATCH 0/6] Start of skl watermark cleanup Maarten Lankhorst <maarten.lankhorst@linux.intel.com> - 2016-10-06 13:30 +0200

csiph-web