From patchwork Thu Feb 12 23:41:34 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Paauwe, Bob J" X-Patchwork-Id: 5822561 Return-Path: X-Original-To: patchwork-intel-gfx@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id DBE389F3CA for ; Thu, 12 Feb 2015 23:41:12 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 2BB3320260 for ; Thu, 12 Feb 2015 23:41:12 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id 545A120256 for ; Thu, 12 Feb 2015 23:41:11 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 96E9C6E784; Thu, 12 Feb 2015 15:41:10 -0800 (PST) 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 ESMTP id 1B5426E781 for ; Thu, 12 Feb 2015 15:41:06 -0800 (PST) Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by orsmga101.jf.intel.com with ESMTP; 12 Feb 2015 15:41:05 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.09,567,1418112000"; d="scan'208";a="665697140" Received: from bpaauwe-desk.fm.intel.com ([10.1.134.218]) by fmsmga001.fm.intel.com with ESMTP; 12 Feb 2015 15:41:03 -0800 From: Bob Paauwe To: intel-gfx Date: Thu, 12 Feb 2015 15:41:34 -0800 Message-Id: <1423784498-11272-9-git-send-email-bob.j.paauwe@intel.com> X-Mailer: git-send-email 2.1.0 In-Reply-To: <1423784498-11272-1-git-send-email-bob.j.paauwe@intel.com> References: <1423784498-11272-1-git-send-email-bob.j.paauwe@intel.com> Subject: [Intel-gfx] [RFC 08/12] drm/i915/config: Use workarounds list from configuration. X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP If there are ACPI table based workarounds for a platform, use those instead of the built-in driver list when doing the workaround init. Signed-off-by: Bob Paauwe --- drivers/gpu/drm/i915/intel_ringbuffer.c | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/drivers/gpu/drm/i915/intel_ringbuffer.c b/drivers/gpu/drm/i915/intel_ringbuffer.c index 2060610..6aa8908 100644 --- a/drivers/gpu/drm/i915/intel_ringbuffer.c +++ b/drivers/gpu/drm/i915/intel_ringbuffer.c @@ -1014,16 +1014,19 @@ int init_workarounds_ring(struct intel_engine_cs *ring) dev_priv->workarounds.count = 0; - if (IS_BROADWELL(dev)) - return bdw_init_workarounds(ring); + if (!intel_config_wa_add(dev_priv)) { + if (IS_BROADWELL(dev)) + return bdw_init_workarounds(ring); - if (IS_CHERRYVIEW(dev)) - return chv_init_workarounds(ring); + if (IS_CHERRYVIEW(dev)) + return chv_init_workarounds(ring); + + if (IS_SKYLAKE(dev)) + return skl_init_workarounds(ring); + else if (IS_GEN9(dev)) + return gen9_init_workarounds(ring); + } - if (IS_SKYLAKE(dev)) - return skl_init_workarounds(ring); - else if (IS_GEN9(dev)) - return gen9_init_workarounds(ring); return 0; }