From patchwork Tue Nov 19 19:58:34 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kamal Mostafa X-Patchwork-Id: 292566 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from huckleberry.canonical.com (huckleberry.canonical.com [91.189.94.19]) by ozlabs.org (Postfix) with ESMTP id 58AF32C011F for ; Wed, 20 Nov 2013 06:59:08 +1100 (EST) Received: from localhost ([127.0.0.1] helo=huckleberry.canonical.com) by huckleberry.canonical.com with esmtp (Exim 4.76) (envelope-from ) id 1VirRu-0005WS-TE; Tue, 19 Nov 2013 19:59:02 +0000 Received: from youngberry.canonical.com ([91.189.89.112]) by huckleberry.canonical.com with esmtp (Exim 4.76) (envelope-from ) id 1VirRi-0005T9-6C for kernel-team@lists.ubuntu.com; Tue, 19 Nov 2013 19:58:50 +0000 Received: from c-67-160-231-162.hsd1.ca.comcast.net ([67.160.231.162] helo=fourier) by youngberry.canonical.com with esmtpsa (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1VirRg-000784-PO; Tue, 19 Nov 2013 19:58:48 +0000 Received: from kamal by fourier with local (Exim 4.80) (envelope-from ) id 1VirRe-0007NE-RQ; Tue, 19 Nov 2013 11:58:46 -0800 From: Kamal Mostafa To: kernel-team@lists.ubuntu.com Subject: [SRU][saucy][patch] UBUNTU: SAUCE: (no-up) drm/i915: i915.disable_pch_pwm overrides PCH_PWM_ENABLE quirk Date: Tue, 19 Nov 2013 11:58:34 -0800 Message-Id: <1384891114-28295-5-git-send-email-kamal@canonical.com> X-Mailer: git-send-email 1.8.1.2 In-Reply-To: <1384891114-28295-1-git-send-email-kamal@canonical.com> References: <1384891114-28295-1-git-send-email-kamal@canonical.com> Cc: Kamal Mostafa X-BeenThere: kernel-team@lists.ubuntu.com X-Mailman-Version: 2.1.14 Precedence: list List-Id: Kernel team discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: kernel-team-bounces@lists.ubuntu.com Sender: kernel-team-bounces@lists.ubuntu.com BugLink: https://bugzilla.kernel.org/show_bug.cgi?id=47941 BugLink: https://bugs.launchpad.net/bugs/1163720 Some BIOS configurations of Dell XPS13 are adversely affected by e85843b ("drm/i915: quirk no PCH_PWM_ENABLE for Dell XPS13 backlight") so provide a boot param to inhibit the quirk, or force it on. i915.disable_pch_pwm can be set to -1: auto (default; allows the disabling of pch_pwm by dmi quirk table match) 0: inhibits the disabling of pch_pwm (overrides dmi quirk table match) 1: forces the disabling of pch_pwm Signed-off-by: Kamal Mostafa --- drivers/gpu/drm/i915/i915_drv.c | 4 ++++ drivers/gpu/drm/i915/i915_drv.h | 1 + drivers/gpu/drm/i915/intel_display.c | 11 ++++++++--- 3 files changed, 13 insertions(+), 3 deletions(-) diff --git a/drivers/gpu/drm/i915/i915_drv.c b/drivers/gpu/drm/i915/i915_drv.c index 45b3c03..4f329a6 100644 --- a/drivers/gpu/drm/i915/i915_drv.c +++ b/drivers/gpu/drm/i915/i915_drv.c @@ -132,6 +132,10 @@ int i915_enable_ips __read_mostly = 1; module_param_named(enable_ips, i915_enable_ips, int, 0600); MODULE_PARM_DESC(enable_ips, "Enable IPS (default: true)"); +int i915_disable_pch_pwm __read_mostly = -1; +module_param_named(disable_pch_pwm, i915_disable_pch_pwm, int, 0600); +MODULE_PARM_DESC(disable_pch_pwm, "disable PCH_PWM (default: -1 (auto))"); + 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 2f09e80..8414fdc 100644 --- a/drivers/gpu/drm/i915/i915_drv.h +++ b/drivers/gpu/drm/i915/i915_drv.h @@ -1550,6 +1550,7 @@ 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_enable_ips __read_mostly; +extern int i915_disable_pch_pwm __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_display.c b/drivers/gpu/drm/i915/intel_display.c index 90a7c17..ad54c50 100644 --- a/drivers/gpu/drm/i915/intel_display.c +++ b/drivers/gpu/drm/i915/intel_display.c @@ -9414,9 +9414,8 @@ static void quirk_invert_brightness(struct drm_device *dev) */ static void quirk_no_pcm_pwm_enable(struct drm_device *dev) { - struct drm_i915_private *dev_priv = dev->dev_private; - dev_priv->quirks |= QUIRK_NO_PCH_PWM_ENABLE; - DRM_INFO("applying no-PCH_PWM_ENABLE quirk\n"); + if (i915_disable_pch_pwm < 0) + i915_disable_pch_pwm = 1; } struct intel_quirk { @@ -9514,6 +9513,12 @@ static void intel_init_quirks(struct drm_device *dev) if (dmi_check_system(*intel_dmi_quirks[i].dmi_id_list) != 0) intel_dmi_quirks[i].hook(dev); } + + if (i915_disable_pch_pwm == 1) { + struct drm_i915_private *dev_priv = dev->dev_private; + dev_priv->quirks |= QUIRK_NO_PCH_PWM_ENABLE; + DRM_INFO("applying no-PCH_PWM_ENABLE quirk\n"); + } } /* Disable the VGA plane that we never use */