From patchwork Thu Jan 7 16:19:20 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Timo Aaltonen X-Patchwork-Id: 564355 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 B3FAB1402C9; Fri, 8 Jan 2016 03:19:34 +1100 (AEDT) Received: from localhost ([127.0.0.1] helo=huckleberry.canonical.com) by huckleberry.canonical.com with esmtp (Exim 4.76) (envelope-from ) id 1aHDHe-00051U-Ab; Thu, 07 Jan 2016 16:19:30 +0000 Received: from youngberry.canonical.com ([91.189.89.112]) by huckleberry.canonical.com with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.76) (envelope-from ) id 1aHDHW-00050K-9g for kernel-team@lists.ubuntu.com; Thu, 07 Jan 2016 16:19:22 +0000 Received: from mobile-user-c1d2e2-211.dhcp.inet.fi ([193.210.226.211] helo=eldon.tyrell) by youngberry.canonical.com with esmtpsa (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.76) (envelope-from ) id 1aHDHV-0005u5-TF for kernel-team@lists.ubuntu.com; Thu, 07 Jan 2016 16:19:22 +0000 From: Timo Aaltonen To: kernel-team@lists.ubuntu.com Subject: [PATCH] UBUNTU: SAUCE: i915_bpo: drm/i915/skl: disable display side power well support for now Date: Thu, 7 Jan 2016 18:19:20 +0200 Message-Id: <1452183560-28181-2-git-send-email-tjaalton@ubuntu.com> X-Mailer: git-send-email 2.5.0 In-Reply-To: <1452183560-28181-1-git-send-email-tjaalton@ubuntu.com> References: <1452183560-28181-1-git-send-email-tjaalton@ubuntu.com> MIME-Version: 1.0 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: , Errors-To: kernel-team-bounces@lists.ubuntu.com Sender: kernel-team-bounces@lists.ubuntu.com From: Imre Deak BugLink: http://bugs.launchpad.net/bugs/1526220 The display power well support on this platform is in a somewhat broken state atm, so disable it by default. This in effect will get rid of incorrect assert WARNs about the CSR/DMC firmware not being loaded during power well toggling. It also removes a problem during driver loading where a register is accessed while its backing power well is down, resulting in another WARN. Until we come up with the root cause of the second problem and the proper fix for both issues, keep all display side power wells on. Also clarify a bit the option description. Reported-by: Dave Airlie Reference: http://mid.gmane.org/CAPM=9tyjBQjSBTKa49cRr6SYkpNW7Pq-fUFznZZ8Y1snvvk7mA@mail.gmail.com Signed-off-by: Imre Deak Reviewed-by: Ville Syrjälä Link: http://patchwork.freedesktop.org/patch/msgid/1446757451-2777-1-git-send-email-imre.deak@intel.com Signed-off-by: Jani Nikula (cherry picked from commit 1b0e3a049efe471c399674fd954500ce97438d30) Signed-off-by: Timo Aaltonen --- ubuntu/i915/i915_params.c | 5 +++-- ubuntu/i915/intel_runtime_pm.c | 18 ++++++++++++++++++ 2 files changed, 21 insertions(+), 2 deletions(-) diff --git a/ubuntu/i915/i915_params.c b/ubuntu/i915/i915_params.c index 8ac5a1b..d73cea2 100644 --- a/ubuntu/i915/i915_params.c +++ b/ubuntu/i915/i915_params.c @@ -39,7 +39,7 @@ struct i915_params i915 __read_mostly = { .enable_ppgtt = -1, .enable_psr = 0, .preliminary_hw_support = IS_ENABLED(CONFIG_DRM_I915_PRELIMINARY_HW_SUPPORT), - .disable_power_well = 1, + .disable_power_well = -1, .enable_ips = 1, .fastboot = 0, .prefault_disable = 0, @@ -132,7 +132,8 @@ MODULE_PARM_DESC(preliminary_hw_support, 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: true)"); + "Disable display power wells when possible " + "(-1=auto [default], 0=power wells always on, 1=power wells disabled when possible)"); module_param_named(enable_ips, i915.enable_ips, int, 0600); MODULE_PARM_DESC(enable_ips, "Enable IPS (default: true)"); diff --git a/ubuntu/i915/intel_runtime_pm.c b/ubuntu/i915/intel_runtime_pm.c index d78b8a9..6ba5c2e0 100644 --- a/ubuntu/i915/intel_runtime_pm.c +++ b/ubuntu/i915/intel_runtime_pm.c @@ -1531,6 +1531,21 @@ static struct i915_power_well bxt_power_wells[] = { } }; +static int +sanitize_disable_power_well_option(const struct drm_i915_private *dev_priv, + int disable_power_well) +{ + if (disable_power_well >= 0) + return !!disable_power_well; + + if (IS_SKYLAKE(dev_priv)) { + DRM_DEBUG_KMS("Disabling display power well support\n"); + return 0; + } + + return 1; +} + #define set_power_wells(power_domains, __power_wells) ({ \ (power_domains)->power_wells = (__power_wells); \ (power_domains)->power_well_count = ARRAY_SIZE(__power_wells); \ @@ -1547,6 +1562,9 @@ int intel_power_domains_init(struct drm_i915_private *dev_priv) { struct i915_power_domains *power_domains = &dev_priv->power_domains; + i915.disable_power_well = sanitize_disable_power_well_option(dev_priv, + i915.disable_power_well); + mutex_init(&power_domains->lock); /*