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)