From patchwork Fri Feb 22 15:52:48 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?b?VmlsbGUgU3lyasOkbMOk?= X-Patchwork-Id: 10826473 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id D087F17E9 for ; Fri, 22 Feb 2019 15:52:57 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id BE82732953 for ; Fri, 22 Feb 2019 15:52:57 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id B2B0732956; Fri, 22 Feb 2019 15:52:57 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 4C2B532953 for ; Fri, 22 Feb 2019 15:52:57 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 9962C8970E; Fri, 22 Feb 2019 15:52:56 +0000 (UTC) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by gabe.freedesktop.org (Postfix) with ESMTPS id 6E5D98970E for ; Fri, 22 Feb 2019 15:52:55 +0000 (UTC) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga008.jf.intel.com ([10.7.209.65]) by orsmga101.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 22 Feb 2019 07:52:55 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.58,400,1544515200"; d="scan'208";a="120007709" Received: from stinkbox.fi.intel.com (HELO stinkbox) ([10.237.72.174]) by orsmga008.jf.intel.com with SMTP; 22 Feb 2019 07:52:52 -0800 Received: by stinkbox (sSMTP sendmail emulation); Fri, 22 Feb 2019 17:52:51 +0200 From: Ville Syrjala To: intel-gfx@lists.freedesktop.org Date: Fri, 22 Feb 2019 17:52:48 +0200 Message-Id: <20190222155251.16730-1-ville.syrjala@linux.intel.com> X-Mailer: git-send-email 2.19.2 MIME-Version: 1.0 Subject: [Intel-gfx] [PATCH 1/4] drm/i915: Disable LP1+ watermarks on Lenovo Thinkpad T431s X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Andrea , stable@vger.kernel.org Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" X-Virus-Scanned: ClamAV using ClamSMTP From: Ville Syrjälä Lenovo Thinkpad T431s (ivb) apparently can't handle LP1+ watermarks being enabled. It underruns severly enough that the screen is unusable. The latency values and watemarks look as expected. And sadly updating the BIOS to the latest version (BIOS GHET41WW (1.26 ) 11/21/2018) did not help. One glimmer of hope I had was the VBT. It seems to have some sort of flag for "self refresh = yes/no", but when I looked at a bunch of VBTs I had lying around most of them had that field set to "no". So if we used that we'd end up disabling LP1+ on most machines. That seems a bit harsh since we know LP1+ works just fine on most machines. Since I have no better ideas let's just disable LP1+ watermarks on this particular machine via a quirk. Cc: stable@vger.kernel.org Cc: Andrea Reported-by: Andrea Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=109477 Fixes: a46a7350b1e8 ("drm/i915: Fix ilk+ watermarks when disabling pipes") Signed-off-by: Ville Syrjälä Reviewed-by: Jani Nikula --- drivers/gpu/drm/i915/intel_pm.c | 51 +++++++++++++++++++++++++-------- 1 file changed, 39 insertions(+), 12 deletions(-) diff --git a/drivers/gpu/drm/i915/intel_pm.c b/drivers/gpu/drm/i915/intel_pm.c index 4c0e43caa5cd..75dceac19950 100644 --- a/drivers/gpu/drm/i915/intel_pm.c +++ b/drivers/gpu/drm/i915/intel_pm.c @@ -3015,6 +3015,29 @@ static void snb_wm_latency_quirk(struct drm_i915_private *dev_priv) intel_print_wm_latency(dev_priv, "Cursor", dev_priv->wm.cur_latency); } +static void ilk_wm_disable_quirk(struct drm_i915_private *dev_priv, + int level) +{ + int max_level = ilk_wm_max_level(dev_priv); + + if (dev_priv->wm.pri_latency[level] == 0 && + dev_priv->wm.spr_latency[level] == 0 && + dev_priv->wm.cur_latency[level] == 0) + return; + + DRM_DEBUG_KMS("LP%d+ watermarks disabled by quirk\n", level); + + for (; level <= max_level; level++) { + dev_priv->wm.pri_latency[level] = 0; + dev_priv->wm.spr_latency[level] = 0; + dev_priv->wm.cur_latency[level] = 0; + } + + intel_print_wm_latency(dev_priv, "Primary", dev_priv->wm.pri_latency); + intel_print_wm_latency(dev_priv, "Sprite", dev_priv->wm.spr_latency); + intel_print_wm_latency(dev_priv, "Cursor", dev_priv->wm.cur_latency); +} + static void snb_wm_lp3_irq_quirk(struct drm_i915_private *dev_priv) { /* @@ -3028,23 +3051,18 @@ static void snb_wm_lp3_irq_quirk(struct drm_i915_private *dev_priv) * interrupts only. To play it safe we disable LP3 * watermarks entirely. */ - if (dev_priv->wm.pri_latency[3] == 0 && - dev_priv->wm.spr_latency[3] == 0 && - dev_priv->wm.cur_latency[3] == 0) - return; - - dev_priv->wm.pri_latency[3] = 0; - dev_priv->wm.spr_latency[3] = 0; - dev_priv->wm.cur_latency[3] = 0; + ilk_wm_disable_quirk(dev_priv, 3); +} - DRM_DEBUG_KMS("LP3 watermarks disabled due to potential for lost interrupts\n"); - intel_print_wm_latency(dev_priv, "Primary", dev_priv->wm.pri_latency); - intel_print_wm_latency(dev_priv, "Sprite", dev_priv->wm.spr_latency); - intel_print_wm_latency(dev_priv, "Cursor", dev_priv->wm.cur_latency); +static void ilk_wm_disable_lp1_quirk(struct drm_i915_private *dev_priv) +{ + ilk_wm_disable_quirk(dev_priv, 1); } static void ilk_setup_wm_latency(struct drm_i915_private *dev_priv) { + struct pci_dev *pdev = dev_priv->drm.pdev; + intel_read_wm_latency(dev_priv, dev_priv->wm.pri_latency); memcpy(dev_priv->wm.spr_latency, dev_priv->wm.pri_latency, @@ -3063,6 +3081,15 @@ static void ilk_setup_wm_latency(struct drm_i915_private *dev_priv) snb_wm_latency_quirk(dev_priv); snb_wm_lp3_irq_quirk(dev_priv); } + + /* + * Lenovo Thinkpad T431s (ivb) + * Massive underruns. + */ + if (pdev->device == 0x0166 && + pdev->subsystem_vendor == 0x17aa && + pdev->subsystem_device == 0x2208) + ilk_wm_disable_lp1_quirk(dev_priv); } static void skl_setup_wm_latency(struct drm_i915_private *dev_priv) From patchwork Fri Feb 22 15:52:49 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?b?VmlsbGUgU3lyasOkbMOk?= X-Patchwork-Id: 10826475 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id E1E4917E9 for ; Fri, 22 Feb 2019 15:53:00 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id CFCBF32953 for ; Fri, 22 Feb 2019 15:53:00 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id C3E6732956; Fri, 22 Feb 2019 15:53:00 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 6DB6132953 for ; Fri, 22 Feb 2019 15:53:00 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id C3EEF89711; Fri, 22 Feb 2019 15:52:59 +0000 (UTC) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by gabe.freedesktop.org (Postfix) with ESMTPS id 5A7C189711 for ; Fri, 22 Feb 2019 15:52:58 +0000 (UTC) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga007.jf.intel.com ([10.7.209.58]) by fmsmga102.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 22 Feb 2019 07:52:58 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.58,400,1544515200"; d="scan'208";a="117016196" Received: from stinkbox.fi.intel.com (HELO stinkbox) ([10.237.72.174]) by orsmga007.jf.intel.com with SMTP; 22 Feb 2019 07:52:56 -0800 Received: by stinkbox (sSMTP sendmail emulation); Fri, 22 Feb 2019 17:52:55 +0200 From: Ville Syrjala To: intel-gfx@lists.freedesktop.org Date: Fri, 22 Feb 2019 17:52:49 +0200 Message-Id: <20190222155251.16730-2-ville.syrjala@linux.intel.com> X-Mailer: git-send-email 2.19.2 In-Reply-To: <20190222155251.16730-1-ville.syrjala@linux.intel.com> References: <20190222155251.16730-1-ville.syrjala@linux.intel.com> MIME-Version: 1.0 Subject: [Intel-gfx] [PATCH 2/4] drm/i915: Generalize pci quirks X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" X-Virus-Scanned: ClamAV using ClamSMTP From: Ville Syrjälä Add support for multiple independent pci quirk tables. I want to reuse the quirk table approach for some watermark quirks but I prefer to keep the details in one place rather than spreading them all over. Signed-off-by: Ville Syrjälä Reviewed-by: Jani Nikula --- drivers/gpu/drm/i915/intel_drv.h | 9 +++++++++ drivers/gpu/drm/i915/intel_quirks.c | 28 +++++++++++++++------------- 2 files changed, 24 insertions(+), 13 deletions(-) diff --git a/drivers/gpu/drm/i915/intel_drv.h b/drivers/gpu/drm/i915/intel_drv.h index 81ec73e4a083..8924b43d6e99 100644 --- a/drivers/gpu/drm/i915/intel_drv.h +++ b/drivers/gpu/drm/i915/intel_drv.h @@ -2187,7 +2187,16 @@ int intel_psr_wait_for_idle(const struct intel_crtc_state *new_crtc_state, bool intel_psr_enabled(struct intel_dp *intel_dp); /* intel_quirks.c */ +struct intel_pci_quirk { + int device; + int subsystem_vendor; + int subsystem_device; + void (*hook)(struct drm_i915_private *i915); +}; + void intel_init_quirks(struct drm_i915_private *dev_priv); +void intel_apply_pci_quirks(struct drm_i915_private *i915, + const struct intel_pci_quirk *quirks); /* intel_runtime_pm.c */ void intel_runtime_pm_init_early(struct drm_i915_private *dev_priv); diff --git a/drivers/gpu/drm/i915/intel_quirks.c b/drivers/gpu/drm/i915/intel_quirks.c index ec2b0fc92b8b..e073510553a6 100644 --- a/drivers/gpu/drm/i915/intel_quirks.c +++ b/drivers/gpu/drm/i915/intel_quirks.c @@ -52,13 +52,6 @@ static void quirk_increase_ddi_disabled_time(struct drm_i915_private *i915) DRM_INFO("Applying Increase DDI Disabled quirk\n"); } -struct intel_quirk { - int device; - int subsystem_vendor; - int subsystem_device; - void (*hook)(struct drm_i915_private *i915); -}; - /* For systems that don't have a meaningful PCI subdevice/subvendor ID */ struct intel_dmi_quirk { void (*hook)(struct drm_i915_private *i915); @@ -87,7 +80,7 @@ static const struct intel_dmi_quirk intel_dmi_quirks[] = { }, }; -static struct intel_quirk intel_quirks[] = { +static const struct intel_pci_quirk intel_pci_quirks[] = { /* Lenovo U160 cannot use SSC on LVDS */ { 0x0046, 0x17aa, 0x3920, quirk_ssc_force_disable }, @@ -145,16 +138,17 @@ static struct intel_quirk intel_quirks[] = { /* ASRock ITX*/ { 0x3185, 0x1849, 0x2212, quirk_increase_ddi_disabled_time }, { 0x3184, 0x1849, 0x2212, quirk_increase_ddi_disabled_time }, + + {} }; -void intel_init_quirks(struct drm_i915_private *i915) +void intel_apply_pci_quirks(struct drm_i915_private *i915, + const struct intel_pci_quirk *quirks) { struct pci_dev *d = i915->drm.pdev; - int i; - - for (i = 0; i < ARRAY_SIZE(intel_quirks); i++) { - struct intel_quirk *q = &intel_quirks[i]; + const struct intel_pci_quirk *q; + for (q = quirks; q->device; q++) { if (d->device == q->device && (d->subsystem_vendor == q->subsystem_vendor || q->subsystem_vendor == PCI_ANY_ID) && @@ -162,6 +156,14 @@ void intel_init_quirks(struct drm_i915_private *i915) q->subsystem_device == PCI_ANY_ID)) q->hook(i915); } +} + +void intel_init_quirks(struct drm_i915_private *i915) +{ + int i; + + intel_apply_pci_quirks(i915, intel_pci_quirks); + for (i = 0; i < ARRAY_SIZE(intel_dmi_quirks); i++) { if (dmi_check_system(*intel_dmi_quirks[i].dmi_id_list) != 0) intel_dmi_quirks[i].hook(i915); From patchwork Fri Feb 22 15:52:50 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?b?VmlsbGUgU3lyasOkbMOk?= X-Patchwork-Id: 10826477 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 7D8F41575 for ; Fri, 22 Feb 2019 15:53:03 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 6983032953 for ; Fri, 22 Feb 2019 15:53:03 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 59FD032956; Fri, 22 Feb 2019 15:53:03 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id DFFA732953 for ; Fri, 22 Feb 2019 15:53:02 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 6485889708; Fri, 22 Feb 2019 15:53:02 +0000 (UTC) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from mga17.intel.com (mga17.intel.com [192.55.52.151]) by gabe.freedesktop.org (Postfix) with ESMTPS id 2A30889718 for ; Fri, 22 Feb 2019 15:53:01 +0000 (UTC) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga107.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 22 Feb 2019 07:52:59 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.58,400,1544515200"; d="scan'208";a="149163673" Received: from stinkbox.fi.intel.com (HELO stinkbox) ([10.237.72.174]) by fmsmga001.fm.intel.com with SMTP; 22 Feb 2019 07:52:58 -0800 Received: by stinkbox (sSMTP sendmail emulation); Fri, 22 Feb 2019 17:52:58 +0200 From: Ville Syrjala To: intel-gfx@lists.freedesktop.org Date: Fri, 22 Feb 2019 17:52:50 +0200 Message-Id: <20190222155251.16730-3-ville.syrjala@linux.intel.com> X-Mailer: git-send-email 2.19.2 In-Reply-To: <20190222155251.16730-1-ville.syrjala@linux.intel.com> References: <20190222155251.16730-1-ville.syrjala@linux.intel.com> MIME-Version: 1.0 Subject: [Intel-gfx] [PATCH 3/4] drm/i915: Use intel_apply_pci_quirks() to apply ILK+ wm quirks X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" X-Virus-Scanned: ClamAV using ClamSMTP From: Ville Syrjälä Use the newly introduced intel_apply_pci_quirks() to clean up the way we apply the ilk+ watermark quirks. Signed-off-by: Ville Syrjälä Reviewed-by: Jani Nikula --- drivers/gpu/drm/i915/intel_pm.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/drivers/gpu/drm/i915/intel_pm.c b/drivers/gpu/drm/i915/intel_pm.c index 75dceac19950..2a4b5014f56e 100644 --- a/drivers/gpu/drm/i915/intel_pm.c +++ b/drivers/gpu/drm/i915/intel_pm.c @@ -3059,10 +3059,17 @@ static void ilk_wm_disable_lp1_quirk(struct drm_i915_private *dev_priv) ilk_wm_disable_quirk(dev_priv, 1); } +static const struct intel_pci_quirk ilk_wm_quirks[] = { + /* + * Lenovo Thinkpad T431s (ivb) + * Massive underruns with LP1+. + */ + { 0x0166, 0x17aa, 0x2208, ilk_wm_disable_lp1_quirk }, + {} +}; + static void ilk_setup_wm_latency(struct drm_i915_private *dev_priv) { - struct pci_dev *pdev = dev_priv->drm.pdev; - intel_read_wm_latency(dev_priv, dev_priv->wm.pri_latency); memcpy(dev_priv->wm.spr_latency, dev_priv->wm.pri_latency, @@ -3082,14 +3089,7 @@ static void ilk_setup_wm_latency(struct drm_i915_private *dev_priv) snb_wm_lp3_irq_quirk(dev_priv); } - /* - * Lenovo Thinkpad T431s (ivb) - * Massive underruns. - */ - if (pdev->device == 0x0166 && - pdev->subsystem_vendor == 0x17aa && - pdev->subsystem_device == 0x2208) - ilk_wm_disable_lp1_quirk(dev_priv); + intel_apply_pci_quirks(dev_priv, ilk_wm_quirks); } static void skl_setup_wm_latency(struct drm_i915_private *dev_priv) From patchwork Fri Feb 22 15:52:51 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?b?VmlsbGUgU3lyasOkbMOk?= X-Patchwork-Id: 10826479 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 1AEEF17E9 for ; Fri, 22 Feb 2019 15:53:06 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 095C932953 for ; Fri, 22 Feb 2019 15:53:06 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id F0B7732956; Fri, 22 Feb 2019 15:53:05 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id AEAE032953 for ; Fri, 22 Feb 2019 15:53:05 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id F1A4D89728; Fri, 22 Feb 2019 15:53:04 +0000 (UTC) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from mga12.intel.com (mga12.intel.com [192.55.52.136]) by gabe.freedesktop.org (Postfix) with ESMTPS id C4C0C89722 for ; Fri, 22 Feb 2019 15:53:03 +0000 (UTC) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmsmga106.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 22 Feb 2019 07:53:03 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.58,400,1544515200"; d="scan'208";a="145702770" Received: from stinkbox.fi.intel.com (HELO stinkbox) ([10.237.72.174]) by fmsmga002.fm.intel.com with SMTP; 22 Feb 2019 07:53:01 -0800 Received: by stinkbox (sSMTP sendmail emulation); Fri, 22 Feb 2019 17:53:01 +0200 From: Ville Syrjala To: intel-gfx@lists.freedesktop.org Date: Fri, 22 Feb 2019 17:52:51 +0200 Message-Id: <20190222155251.16730-4-ville.syrjala@linux.intel.com> X-Mailer: git-send-email 2.19.2 In-Reply-To: <20190222155251.16730-1-ville.syrjala@linux.intel.com> References: <20190222155251.16730-1-ville.syrjala@linux.intel.com> MIME-Version: 1.0 Subject: [Intel-gfx] [PATCH 4/4] drm/i915: Restrict SNB LP3+ disable to Thinkpad X220 tablet X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" X-Virus-Scanned: ClamAV using ClamSMTP From: Ville Syrjälä The only machine we know for sure to require the LP3+ disable is the Lenovo Thinkpad X220 tablet. Originally in commit 03981c6ebec4 ("drm/i915: Disable LP3 watermarks on all SNB machines") I disabled LP3+ watermarks on all SNB machines, partially for safety, and partially since I didn't want to add a quirk. But since we now have another watermark quirk anyway let's reduce the SNB LP3+ disable scope to the x220 tablet only. Signed-off-by: Ville Syrjälä Acked-by: Jani Nikula --- drivers/gpu/drm/i915/intel_pm.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/drivers/gpu/drm/i915/intel_pm.c b/drivers/gpu/drm/i915/intel_pm.c index 2a4b5014f56e..b225461455c2 100644 --- a/drivers/gpu/drm/i915/intel_pm.c +++ b/drivers/gpu/drm/i915/intel_pm.c @@ -3038,7 +3038,7 @@ static void ilk_wm_disable_quirk(struct drm_i915_private *dev_priv, intel_print_wm_latency(dev_priv, "Cursor", dev_priv->wm.cur_latency); } -static void snb_wm_lp3_irq_quirk(struct drm_i915_private *dev_priv) +static void ilk_wm_disable_lp3(struct drm_i915_private *dev_priv) { /* * On some SNB machines (Thinkpad X220 Tablet at least) @@ -3060,6 +3060,11 @@ static void ilk_wm_disable_lp1_quirk(struct drm_i915_private *dev_priv) } static const struct intel_pci_quirk ilk_wm_quirks[] = { + /* + * Lenovo ThinkPad X220 Tablet (snb) + * CPU doesn't wake up for vblank interrupts with LP3. + */ + { 0x0126, 0x17aa, 0x21db, ilk_wm_disable_lp3 }, /* * Lenovo Thinkpad T431s (ivb) * Massive underruns with LP1+. @@ -3084,10 +3089,8 @@ static void ilk_setup_wm_latency(struct drm_i915_private *dev_priv) intel_print_wm_latency(dev_priv, "Sprite", dev_priv->wm.spr_latency); intel_print_wm_latency(dev_priv, "Cursor", dev_priv->wm.cur_latency); - if (IS_GEN(dev_priv, 6)) { + if (IS_GEN(dev_priv, 6)) snb_wm_latency_quirk(dev_priv); - snb_wm_lp3_irq_quirk(dev_priv); - } intel_apply_pci_quirks(dev_priv, ilk_wm_quirks); }