Patchwork [RFC,Precise,1/1] UBUNTU: SAUCE: drm/i915: Explicitly disable RC6 for certain models

login
register
mail settings
Submitter Jesse Sung
Date Sept. 25, 2012, 10:23 a.m.
Message ID <721fbd79a469cc188a58b164b01919bb19d93d3e.1348567438.git.jesse.sung@canonical.com>
Download mbox | patch
Permalink /patch/186756/
State New
Headers show

Comments

Jesse Sung - Sept. 25, 2012, 10:23 a.m.
From: Wen-chien Jesse Sung <jesse.sung@canonical.com>

BugLink: https://launchpad.net/bugs/1002170
BugLink: https://launchpad.net/bugs/1008867

Enabling RC6 may cause system hang on Lenovo S510 after idle for
a while. It also makes Asus ET2012E sometimes fail to resume from
suspend. Explicitly disable RC6 on these models.

Signed-off-by: Wen-chien Jesse Sung <jesse.sung@canonical.com>
---
 drivers/gpu/drm/i915/i915_drv.h      |    1 +
 drivers/gpu/drm/i915/intel_display.c |   18 ++++++++++++++++++
 2 files changed, 19 insertions(+)
Tim Gardner - Sept. 25, 2012, 12:26 p.m.

Seth Forshee - Sept. 25, 2012, 12:37 p.m.

Patch

diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/drm/i915/i915_drv.h
index c364358..f50e55b 100644
--- a/drivers/gpu/drm/i915/i915_drv.h
+++ b/drivers/gpu/drm/i915/i915_drv.h
@@ -274,6 +274,7 @@  enum intel_pch {
 
 #define QUIRK_PIPEA_FORCE (1<<0)
 #define QUIRK_LVDS_SSC_DISABLE (1<<1)
+#define QUIRK_RC6_DISABLE (1<<3)
 
 struct intel_fbdev;
 struct intel_fbc_work;
diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
index 0bb09a0..b9e9bd6 100644
--- a/drivers/gpu/drm/i915/intel_display.c
+++ b/drivers/gpu/drm/i915/intel_display.c
@@ -7983,12 +7983,17 @@  void intel_init_emon(struct drm_device *dev)
 
 static bool intel_enable_rc6(struct drm_device *dev)
 {
+	struct drm_i915_private *dev_priv = dev->dev_private;
+
 	/*
 	 * Respect the kernel parameter if it is set
 	 */
 	if (i915_enable_rc6 >= 0)
 		return i915_enable_rc6;
 
+	if (dev_priv->quirks & QUIRK_RC6_DISABLE)
+		return 0;
+
 	/*
 	 * Disable RC6 on Ironlake
 	 */
@@ -8795,6 +8800,13 @@  static void quirk_ssc_force_disable(struct drm_device *dev)
 	dev_priv->quirks |= QUIRK_LVDS_SSC_DISABLE;
 }
 
+static void quirk_rc6_force_disable(struct drm_device *dev)
+{
+	struct drm_i915_private *dev_priv = dev->dev_private;
+	dev_priv->quirks |= QUIRK_RC6_DISABLE;
+	DRM_INFO("applying RC6 disable quirk\n");
+}
+
 struct intel_quirk {
 	int device;
 	int subsystem_vendor;
@@ -8827,6 +8839,12 @@  struct intel_quirk intel_quirks[] = {
 
 	/* Sony Vaio Y cannot use SSC on LVDS */
 	{ 0x0046, 0x104d, 0x9076, quirk_ssc_force_disable },
+
+	/* Asus ET2012E may fail to resume from S3 if RC6 is enabled */
+	{ 0x0102, 0x1043, 0x844d, quirk_rc6_force_disable },
+
+	/* Lenovo ThinkCentre S510 may hang after idle for a long time */
+	{ 0x0102, 0x17aa, 0x307b, quirk_rc6_force_disable },
 };
 
 static void intel_init_quirks(struct drm_device *dev)