From 5953e8f0a11aa844c61479373f4be080e3650696 Mon Sep 17 00:00:00 2001 From: Wen-chien Jesse Sung Date: Wed, 22 Aug 2012 17:07:57 +0800 Subject: [PATCH] Explicitly disable RC6 for certain models Signed-off-by: Wen-chien Jesse Sung --- drivers/gpu/drm/i915/i915_drv.h | 1 + drivers/gpu/drm/i915/intel_display.c | 13 +++++++++++++ drivers/gpu/drm/i915/intel_pm.c | 5 +++++ 3 files changed, 19 insertions(+) diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/drm/i915/i915_drv.h index 627fe35..5332ab8 100644 --- a/drivers/gpu/drm/i915/i915_drv.h +++ b/drivers/gpu/drm/i915/i915_drv.h @@ -349,6 +349,7 @@ enum intel_pch { #define QUIRK_PIPEA_FORCE (1<<0) #define QUIRK_LVDS_SSC_DISABLE (1<<1) #define QUIRK_INVERT_BRIGHTNESS (1<<2) +#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 f615976..5186e6e 100644 --- a/drivers/gpu/drm/i915/intel_display.c +++ b/drivers/gpu/drm/i915/intel_display.c @@ -7098,6 +7098,13 @@ static void quirk_invert_brightness(struct drm_device *dev) DRM_INFO("applying inverted panel brightness quirk\n"); } +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; @@ -7133,6 +7140,12 @@ static struct intel_quirk intel_quirks[] = { /* Acer Aspire 5734Z must invert backlight brightness */ { 0x2a42, 0x1025, 0x0459, quirk_invert_brightness }, + + /* 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) diff --git a/drivers/gpu/drm/i915/intel_pm.c b/drivers/gpu/drm/i915/intel_pm.c index 94aabca..df019e6 100644 --- a/drivers/gpu/drm/i915/intel_pm.c +++ b/drivers/gpu/drm/i915/intel_pm.c @@ -2321,12 +2321,17 @@ static void gen6_disable_rps(struct drm_device *dev) int intel_enable_rc6(const 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 */ -- 1.7.9.5