Received: by 2002:ad5:4acb:0:0:0:0:0 with SMTP id n11csp506824imw; Wed, 13 Jul 2022 02:46:24 -0700 (PDT) X-Google-Smtp-Source: AGRyM1sKPCTfLEoqKqZiPkTJrJsWXZ8e2X5eY25rFx7ixvZhIVNHFBncahZ96Y2GHlk6SU4/nDWn X-Received: by 2002:a65:5a01:0:b0:419:759a:2b20 with SMTP id y1-20020a655a01000000b00419759a2b20mr2177422pgs.487.1657705583830; Wed, 13 Jul 2022 02:46:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1657705583; cv=none; d=google.com; s=arc-20160816; b=PsMH2uJUy62zrmMT7+305Rv+3Arr/Sywc+ZfLjERNl1fUl/L6/k7EqeUx1NPnrp0S6 +trl8RwW2NdXd5tSTyXDaNP2YQukYyCdq2GcdH8JnRqwrbYO9z8i+h74dCqisBLOCAq5 h1bR/fJE2U1sXt3N0DHqY3xZBIQpr0ER7LeF8y68PU6UH50ncu6DsCO1FlEicYnMPCjK 3CFHkePx3cKRPx/0Va0PIJdulHJk7mlNWQaH1MlSm8bkb85uKxtf/+N7XgjHWQt/3dQ3 A+iBmzy9aKOzQa0/2mlVcsn4aQaHQgz/+neWUZZsCHrZZk5VwJKE/jg/rGPN1d2Efayl rmGg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:to:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:from :dkim-signature; bh=e9jnTIMtPamkda97TDGYuVodqh07MGvTU1CsVKDUojI=; b=XMUgqwojsMuQipMeuRr5xYzLf4zqwKyRS0KAaUm+zVgB2+DD0+vYH1QxRv4zHM2Mt1 3amhEePyWI6RrQt0A10iFiYmYEZvU6X9e+qJRorTBAlYLAM4sAJ5R3KX+ag++lyVsjy2 LpMiqE3OZ6fYluuFi9DaDYF1OiOrfx7P3aLXT+Wcmu4RqDfSgHr2fxrRRzNbfox4H/QQ nzP//nLoUn2+84VhDIMuNFHwJkFXxci0MOBnW480mtnXGAJ1t4uHuVHqUtizmjDKtS/G GaCP+asoTFvGJSQhDHyuF95W/1z0z7zpnCDEbYbwr8jfXeLb6JYPARppRVgyKBxQ06tE voTg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@kernel.org header.s=k20201202 header.b=lM43VL+5; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id x30-20020a637c1e000000b0040da3e73d46si16896007pgc.139.2022.07.13.02.46.12; Wed, 13 Jul 2022 02:46:23 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=fail header.i=@kernel.org header.s=k20201202 header.b=lM43VL+5; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235686AbiGMJau (ORCPT + 99 others); Wed, 13 Jul 2022 05:30:50 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43800 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235377AbiGMJaZ (ORCPT ); Wed, 13 Jul 2022 05:30:25 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9131EEE1F8; Wed, 13 Jul 2022 02:30:24 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 2D406B81CD2; Wed, 13 Jul 2022 09:30:23 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id DB669C34114; Wed, 13 Jul 2022 09:30:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1657704621; bh=TwXaLs6Qq1k/ViDsjq1vtPJ62qR+0nfRAZMZIFfXwvY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=lM43VL+56kTLfitdH7ZNh3bl3OKPYGv0CN/4i6cU/58LXkg0Z/TYeYJJm1XxLiPJK RzXf0EjLOIMAtQ/xVBzpVliGJQxoRj56TNc1jDCUshX9hD1Y5AWHzd4fPj/hlJHD6u 09s6sIo7fTDmu3Kl0lC6d49Tun9JOqaAmKlME7v+JBF6be2lZMcXyXl1qIa2Ccp/0K FkRfrCExEsG9zk07B9SR4HuHH8A3xDOMcpa4VzU+qOx+PUUFzY2/5EWZm7rdbtBExO YIClcqCUboOMsfJJ6yA1QnYdAgMBz9tU5Id+ERDyOHMyT6FdbnJLpnoRP2Yo1uOdYt pITCazZ/bKRaw== Received: from mchehab by mail.kernel.org with local (Exim 4.95) (envelope-from ) id 1oBYhH-0050LI-Is; Wed, 13 Jul 2022 10:30:19 +0100 From: Mauro Carvalho Chehab Cc: Chris Wilson , Andi Shyti , Daniel Vetter , Daniele Ceraolo Spurio , Dave Airlie , David Airlie , Jani Nikula , Joonas Lahtinen , Lucas De Marchi , Matt Roper , Mauro Carvalho Chehab , Rodrigo Vivi , Tvrtko Ursulin , dri-devel@lists.freedesktop.org, intel-gfx@lists.freedesktop.org, linux-kernel@vger.kernel.org, stable@vger.kernel.org, Fei Yang , =?UTF-8?q?Thomas=20Hellstr=C3=B6m?= Subject: [PATCH 03/21] drm/i915/gt: Invalidate TLB of the OA unit at TLB invalidations Date: Wed, 13 Jul 2022 10:30:00 +0100 Message-Id: <0a56680efc82f69d1651b513e0de077b441e866e.1657703926.git.mchehab@kernel.org> X-Mailer: git-send-email 2.36.1 In-Reply-To: References: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-7.7 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net To: unlisted-recipients:; (no To-header on input) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Chris Wilson Ensure that the TLB of the OA unit is also invalidated on gen12 HW, as just invalidating the TLB of an engine is not enough. Cc: stable@vger.kernel.org Fixes: 7938d61591d3 ("drm/i915: Flush TLBs before releasing backing store") Signed-off-by: Chris Wilson Cc: Fei Yang Cc: Andi Shyti Acked-by: Thomas Hellström Signed-off-by: Mauro Carvalho Chehab --- See [PATCH 00/21] at: https://lore.kernel.org/all/cover.1657703926.git.mchehab@kernel.org/ drivers/gpu/drm/i915/gt/intel_gt.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/drivers/gpu/drm/i915/gt/intel_gt.c b/drivers/gpu/drm/i915/gt/intel_gt.c index c4d43da84d8e..1d84418e8676 100644 --- a/drivers/gpu/drm/i915/gt/intel_gt.c +++ b/drivers/gpu/drm/i915/gt/intel_gt.c @@ -11,6 +11,7 @@ #include "pxp/intel_pxp.h" #include "i915_drv.h" +#include "i915_perf_oa_regs.h" #include "intel_context.h" #include "intel_engine_pm.h" #include "intel_engine_regs.h" @@ -969,6 +970,15 @@ void intel_gt_invalidate_tlbs(struct intel_gt *gt) awake |= engine->mask; } + /* Wa_2207587034:tgl,dg1,rkl,adl-s,adl-p */ + if (awake && + (IS_TIGERLAKE(i915) || + IS_DG1(i915) || + IS_ROCKETLAKE(i915) || + IS_ALDERLAKE_S(i915) || + IS_ALDERLAKE_P(i915))) + intel_uncore_write_fw(uncore, GEN12_OA_TLB_INV_CR, 1); + spin_unlock_irq(&uncore->lock); for_each_engine_masked(engine, gt, awake, tmp) { -- 2.36.1