All of lore.kernel.org
 help / color / mirror / Atom feed
From: Paulo Zanoni <przanoni@gmail.com>
To: intel-gfx@lists.freedesktop.org
Cc: Takashi Iwai <tiwai@suse.de>,
	Mengdong Lin <mengdong.lin@intel.com>,
	Paulo Zanoni <paulo.r.zanoni@intel.com>
Subject: [PATCH 1/7] drm/i915: don't disable the power well yet
Date: Fri, 22 Mar 2013 14:07:23 -0300	[thread overview]
Message-ID: <1363972043-2602-1-git-send-email-przanoni@gmail.com> (raw)
In-Reply-To: <CAKMK7uEkhkGZ=3K_XWy2pukDqt-sqWWM+OTU9TdK+5b56mVwiw@mail.gmail.com>

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. When we disable it we break the audio driver (because some
of the audio registers are on the power well) and machines with eDP on
port D (because it doesn't use TRANSCODER_EDP).

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.

This fixes problems caused by the following commit:
  commit d6dd9eb1d96d2b7345fe4664066c2b7ed86da898
  Author: Daniel Vetter <daniel.vetter@ffwll.ch>
  Date:   Tue Jan 29 16:35:20 2013 -0200
       drm/i915: dynamic Haswell display power well support

References: http://www.mail-archive.com/intel-gfx@lists.freedesktop.org/msg18788.html
Cc: Takashi Iwai <tiwai@suse.de>
Cc: Mengdong Lin <mengdong.lin@intel.com>
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(+)

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;
-- 
1.7.10.4

  reply	other threads:[~2013-03-22 17:07 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-03-22  9:53 [PATCH 1/3] Revert "drm/i915: dynamic Haswell display power well support" Daniel Vetter
2013-03-22  9:53 ` [PATCH 2/3] Revert "drm/i915: set TRANSCODER_EDP even earlier" Daniel Vetter
2013-03-22 12:30   ` Paulo Zanoni
2013-03-22 13:59     ` Daniel Vetter
2013-03-22 13:43   ` Daniel Vetter
2013-03-22  9:53 ` [PATCH 3/3] drm/i915: Revert backlight cargo-culting Daniel Vetter
2013-03-22 10:00   ` Takashi Iwai
2013-03-22 10:13     ` Daniel Vetter
2013-03-22 10:22       ` Daniel Vetter
2013-03-22 10:42         ` Takashi Iwai
2013-03-22 11:22           ` Daniel Vetter
2013-03-22 11:34             ` Takashi Iwai
2013-03-22 14:01               ` Daniel Vetter
2013-03-22 14:44                 ` [PATCH] Revert "drm/i915: write backlight harder" Daniel Vetter
2013-03-22 15:06                   ` Takashi Iwai
2013-03-23 11:36                     ` Daniel Vetter
2013-03-22 14:45 ` [PATCH 1/7] drm/i915: don't disable the power well yet Paulo Zanoni
2013-03-22 15:22   ` Daniel Vetter
2013-03-22 17:07     ` Paulo Zanoni [this message]
2013-03-23 11:34       ` Daniel Vetter

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=1363972043-2602-1-git-send-email-przanoni@gmail.com \
    --to=przanoni@gmail.com \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=mengdong.lin@intel.com \
    --cc=paulo.r.zanoni@intel.com \
    --cc=tiwai@suse.de \
    /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.