Received: by 2002:a05:6358:5282:b0:b5:90e7:25cb with SMTP id g2csp3321383rwa; Tue, 23 Aug 2022 02:47:47 -0700 (PDT) X-Google-Smtp-Source: AA6agR5siJhdPNv4JAtSE7T7jbKvid2ICa9KCIJZUWV/6uz5BVPxnsj4b/GCK2MOn7ZEdNZwbyxL X-Received: by 2002:a63:6116:0:b0:41c:680b:f18d with SMTP id v22-20020a636116000000b0041c680bf18dmr19525083pgb.423.1661248066891; Tue, 23 Aug 2022 02:47:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1661248066; cv=none; d=google.com; s=arc-20160816; b=fN7goJTsVBSPTJOMjUL8/r6dhLIQhFrbU2Q1MNgRsGQeozfIdi6r7XLoM+dQF6M82o ELC/2M+3EXZoyaKTHHb424gD0Ab9NyQJyI5kobF8/UhhWoaD3CnNQ9a/j3EjRLEKJ90A kh/A0TwPaCLYEKu4GbsS5wM7GLyC0HPDcwVlnBgKMMzK6vsI4CqrTLzt9kPJYMnUQlM1 IsaP/BPM69JPwEVgtAcpp7GzIqXX1MqwuKeMxZPJnfo7vvFexLUFmcOu1Pnpcdk05PEV O/ZzSg6HNiKT9Zd5/m6CrDf2f41gWeaPBSLdZgZ9Uy9N4UMbgTH6vX1vKtlYnafdwIWP UuOw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=lRvZLQEQEYn5svUtiTdS6JIMKxdqD2sDMOntjyyVOrE=; b=N8tOkUEphZmyS9kB6ZsSjFlVvp1mKkC6LHzMmHIUMIUt4fqCqRosD8iFTqCEaqInfN S11D1/tBOeaDg3wAmhfcn3VU4335st6jYzVrgbyeCSIOLfgvVVMLdCzdS98kilxyKPCN uTMnXRYNLOJV9AVbYSmLFjCuzL5UOkg4ey2yvgZBFiMLVsP2lPgr8rxD9XKgqoUxYBtB AUUAbHeaOPSF8NxPBtbxUOv+CirdxFtXN2QHek1xMPdQrEOYCt7EfPpaxMGmWTixK5k8 lsIzBRH+sbGPKmkXpnD/SMh8ynXeFwssgH53/Y4mOjzMAxnAc3oFfnKQSwJ0cjaUFXsb yXHA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=FGoc9jAR; 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=linuxfoundation.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id k6-20020a170902ce0600b0016daefb1c72si14725196plg.263.2022.08.23.02.47.36; Tue, 23 Aug 2022 02:47:46 -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=pass header.i=@linuxfoundation.org header.s=korg header.b=FGoc9jAR; 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=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S242334AbiHWIQs (ORCPT + 99 others); Tue, 23 Aug 2022 04:16:48 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58898 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S241727AbiHWIIn (ORCPT ); Tue, 23 Aug 2022 04:08:43 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A6ED46CD15; Tue, 23 Aug 2022 01:05:44 -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 dfw.source.kernel.org (Postfix) with ESMTPS id D4FF96125F; Tue, 23 Aug 2022 08:05:36 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id DCF17C433C1; Tue, 23 Aug 2022 08:05:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1661241936; bh=iHvtYGx2k0tmFDF8LrNw08O4l4O2vAl+C+agfuDg9n8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=FGoc9jARXHkvE6mAgHAliQy8uNmKxsxf2NhpCwcQYyVhW6apATpGTSWlfZ4S/k5PV 0dVFx9LYVwmB/a9dlblg62lubnk4rllzCQWFtjFuj8B+acwobKln4DnnXiG/XWh86m Tl/yBqQFzCD9nj8YcoTaInLiYfYKzIuEyb4f59vM= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Chris Wilson , Fei Yang , Andi Shyti , Tvrtko Ursulin , =?UTF-8?q?Thomas=20Hellstr=C3=B6m?= , Mauro Carvalho Chehab , Rodrigo Vivi Subject: [PATCH 5.19 024/365] drm/i915/gt: Invalidate TLB of the OA unit at TLB invalidations Date: Tue, 23 Aug 2022 09:58:45 +0200 Message-Id: <20220823080119.230710305@linuxfoundation.org> X-Mailer: git-send-email 2.37.2 In-Reply-To: <20220823080118.128342613@linuxfoundation.org> References: <20220823080118.128342613@linuxfoundation.org> User-Agent: quilt/0.67 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-7.1 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 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Chris Wilson commit 180abeb2c5032704787151135b6a38c6b71295a6 upstream. 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 Reviewed-by: Andi Shyti Acked-by: Tvrtko Ursulin Acked-by: Thomas Hellström Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Andi Shyti Link: https://patchwork.freedesktop.org/patch/msgid/59724d9f5cf1e93b1620d01b8332ac991555283d.1658924372.git.mchehab@kernel.org (cherry picked from commit dfc83de118ff7930acc9a4c8dfdba7c153aa44d6) Signed-off-by: Rodrigo Vivi Signed-off-by: Greg Kroah-Hartman --- drivers/gpu/drm/i915/gt/intel_gt.c | 10 ++++++++++ 1 file changed, 10 insertions(+) --- a/drivers/gpu/drm/i915/gt/intel_gt.c +++ b/drivers/gpu/drm/i915/gt/intel_gt.c @@ -10,6 +10,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" @@ -1226,6 +1227,15 @@ void intel_gt_invalidate_tlbs(struct int 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) {