diff mbox

[1/7] drm/i915: don't disable the power well yet

Message ID 1363963521-6784-1-git-send-email-przanoni@gmail.com (mailing list archive)
State New, archived
Headers show

Commit Message

Paulo Zanoni March 22, 2013, 2:45 p.m. UTC
From: Paulo Zanoni <paulo.r.zanoni@intel.com>

We're still not 100% ready to disable the power well, so don't disable
it for now.

Also, instead of just reverting the code, add a Kernel option to let
us disable it if we want. This will allow us to keep developing and
testing the feature while it's not enabled.

Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
---
 drivers/gpu/drm/i915/i915_drv.c |    5 +++++
 drivers/gpu/drm/i915/i915_drv.h |    1 +
 drivers/gpu/drm/i915/intel_pm.c |    3 +++
 3 files changed, 9 insertions(+)

Comments

Daniel Vetter March 22, 2013, 3:22 p.m. UTC | #1
On Fri, Mar 22, 2013 at 3:45 PM, Paulo Zanoni <przanoni@gmail.com> wrote:
> From: Paulo Zanoni <paulo.r.zanoni@intel.com>
>
> We're still not 100% ready to disable the power well, so don't disable
> it for now.
>
> Also, instead of just reverting the code, add a Kernel option to let
> us disable it if we want. This will allow us to keep developing and
> testing the feature while it's not enabled.
>
> Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>

Can you please pimp the commit message with the usual links to the
regression report + sha1 of the commit which introduced the
regression? I've just stumbled over a commit in the backlight mess
which didn't link to the lkml discussion (nor mentioned it) and it was
a pain the fish out details from my memory ;-) Also please cc: Takashi
and our own Intel audio guys, plus please mention what exactly blew up
(e.g. audio driver doesn't expect that registers get reset to 0 and
Takashi's machine has eDP on port D, which we did not consider).

Thanks, Daniel
diff mbox

Patch

diff --git a/drivers/gpu/drm/i915/i915_drv.c b/drivers/gpu/drm/i915/i915_drv.c
index 6c4b13c..0614aff 100644
--- a/drivers/gpu/drm/i915/i915_drv.c
+++ b/drivers/gpu/drm/i915/i915_drv.c
@@ -123,6 +123,11 @@  module_param_named(preliminary_hw_support, i915_preliminary_hw_support, int, 060
 MODULE_PARM_DESC(preliminary_hw_support,
 		"Enable preliminary hardware support. (default: false)");
 
+int i915_disable_power_well __read_mostly = 0;
+module_param_named(disable_power_well, i915_disable_power_well, int, 0600);
+MODULE_PARM_DESC(disable_power_well,
+		 "Disable the power well when possible (default: false)");
+
 static struct drm_driver driver;
 extern int intel_agp_enabled;
 
diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/drm/i915/i915_drv.h
index 1657d873..625cccf 100644
--- a/drivers/gpu/drm/i915/i915_drv.h
+++ b/drivers/gpu/drm/i915/i915_drv.h
@@ -1398,6 +1398,7 @@  extern int i915_enable_fbc __read_mostly;
 extern bool i915_enable_hangcheck __read_mostly;
 extern int i915_enable_ppgtt __read_mostly;
 extern unsigned int i915_preliminary_hw_support __read_mostly;
+extern int i915_disable_power_well __read_mostly;
 
 extern int i915_suspend(struct drm_device *dev, pm_message_t state);
 extern int i915_resume(struct drm_device *dev);
diff --git a/drivers/gpu/drm/i915/intel_pm.c b/drivers/gpu/drm/i915/intel_pm.c
index ce3db2c..2de6da6 100644
--- a/drivers/gpu/drm/i915/intel_pm.c
+++ b/drivers/gpu/drm/i915/intel_pm.c
@@ -4095,6 +4095,9 @@  void intel_set_power_well(struct drm_device *dev, bool enable)
 	if (!HAS_POWER_WELL(dev))
 		return;
 
+	if (!i915_disable_power_well && !enable)
+		return;
+
 	tmp = I915_READ(HSW_PWR_WELL_DRIVER);
 	is_enabled = tmp & HSW_PWR_WELL_STATE;
 	enable_requested = tmp & HSW_PWR_WELL_ENABLE;