Received: by 2002:ac0:e34a:0:0:0:0:0 with SMTP id g10csp257350imn; Wed, 27 Jul 2022 05:33:14 -0700 (PDT) X-Google-Smtp-Source: AGRyM1s2ixjXv+rZa78LEzIY8LgWhuXLIvulukKZtRlbiVN7V/46wsM601s/uYxga5Oq/mlfxt2a X-Received: by 2002:a17:907:2e0d:b0:72b:5cf4:464a with SMTP id ig13-20020a1709072e0d00b0072b5cf4464amr17160951ejc.87.1658925194606; Wed, 27 Jul 2022 05:33:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1658925194; cv=none; d=google.com; s=arc-20160816; b=dgwO4Bpx04rQs6ro0l/Gi07T0XEWIdl8cOcay8EIkWlgzxopi8sU1DfpfWqBbhyu4V ZR1NJw2WRcQ7TCTClTbsyOvmXeBlPRM7nhLQR731jrdY7zobqCrr414VaesZfUvRVp7b Cad0fNoxGakJbvuVOsc0hGZClV7J4uRomEzn7y+JeksDzH5EFE3u+syUmSZNv44qpx1E vpcOXPRMyQ+CNvQMCL91HfRYCkv/EbHqurwqgRK0Btlu5TZgGqv5pIUFY44ZqXaHYiAS hyNLFRaFEEdcJnVtCWzhPdTgFu57CtSF4O7wS3f4wQrZ9haynY3XPXEEEahdfi9U3z09 HWtA== 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=LylQYGZMMzbdX05rYMZFBk7NKPhhSu7kI8sZXztK5yE=; b=aURDbQqeycFsHsVqnXrPujcAytaVv06JEMZQK3mLTEezlPJTl0QAEXSb6rzohXJS2J 0sSnAFCAiYHvgqHGz6+2oazxwHlNFHjP3SZkkugbc4ZW5DMIWWb+PZWxyNbwZWvS+bgo YODfMZPb3Bl9+dx8eMElZeQhtJxQe2W44/CPZfhJrkkW3XBLEtRg/OxJ4Xrfhp9I/QNc 7jckyeDwgOJvu3mpPxSFB8dbErQ7Suv+sVT7GodCJ/+TXCDVnRuii7LqhTHXsP5vd/eO lr9unSQp0FA8xWutpr10tWfmi+JvecSmUeS8BYMTOwTLlCJKYcNuiBVWj/eU7D142JFk Fvig== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@kernel.org header.s=k20201202 header.b=iIUU+xwD; 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 hr16-20020a1709073f9000b007262ad8839esi21086273ejc.16.2022.07.27.05.32.48; Wed, 27 Jul 2022 05:33:14 -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=iIUU+xwD; 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 S233157AbiG0Mak (ORCPT + 99 others); Wed, 27 Jul 2022 08:30:40 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42532 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233006AbiG0MaE (ORCPT ); Wed, 27 Jul 2022 08:30:04 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4C5CB186D6; Wed, 27 Jul 2022 05:30:03 -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 0541DB82077; Wed, 27 Jul 2022 12:30:02 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 89ECCC4347C; Wed, 27 Jul 2022 12:30:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1658925000; bh=GQnU144pkObOuuSOogSq2lICybfwG6TF/c3AiwyFiLU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=iIUU+xwD3iVDACp1ZnSRc544KHgche8Xy0PlTjUYVBQ/hPu2sI9nV01zGlvR6HMmN 8hWPFzbcpPnfY/3wZ2V7Z7G/7sjFRxgnD51Z6gRBz+UDLaO5d7eAfieCMrIfB52K8t 0Rd0BnFe/tiNEdb/wpqyEwv8/B16/JtJbAS5Z18pEA5dsUo6Ca9/iYfYV87On/WBBZ EE+ZjOenfcBGZuIQA2CZVC+84I/4jyT/So3w9uUT8WJe7pZDJxo5wZ2e5epuQOwATl deUoe+Waz2xy4n/MqIsQDoa92AY78A3piVR7d9TPGNqbwD6iPDZYZRmd50WJQhjNCA jYVmNJCH3NoBA== Received: from mchehab by mail.kernel.org with local (Exim 4.95) (envelope-from ) id 1oGgAo-003xmL-B2; Wed, 27 Jul 2022 14:29:58 +0200 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 , Tvrtko Ursulin , =?UTF-8?q?Thomas=20Hellstr=C3=B6m?= Subject: [PATCH v3 4/6] drm/i915/gt: Skip TLB invalidations once wedged Date: Wed, 27 Jul 2022 14:29:54 +0200 Message-Id: <5aa86564b9ec5fe7fe605c1dd7de76855401ed73.1658924372.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 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 Skip all further TLB invalidations once the device is wedged and had been reset, as, on such cases, it can no longer process instructions on the GPU and the user no longer has access to the TLB's in each engine. So, an attempt to do a TLB cache invalidation will produce a timeout. That helps to reduce the performance regression introduced by TLB invalidate logic. Cc: stable@vger.kernel.org Fixes: 7938d61591d3 ("drm/i915: Flush TLBs before releasing backing store") Signed-off-by: Chris Wilson Cc: Fei Yang Cc: Tvrtko Ursulin Reviewed-by: Andi Shyti Acked-by: Thomas Hellström Signed-off-by: Mauro Carvalho Chehab --- To avoid mailbombing on a large number of people, only mailing lists were C/C on the cover. See [PATCH v3 0/6] at: https://lore.kernel.org/all/cover.1658924372.git.mchehab@kernel.org/ drivers/gpu/drm/i915/gt/intel_gt.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/gpu/drm/i915/gt/intel_gt.c b/drivers/gpu/drm/i915/gt/intel_gt.c index 1d84418e8676..5c55a90672f4 100644 --- a/drivers/gpu/drm/i915/gt/intel_gt.c +++ b/drivers/gpu/drm/i915/gt/intel_gt.c @@ -934,6 +934,9 @@ void intel_gt_invalidate_tlbs(struct intel_gt *gt) if (I915_SELFTEST_ONLY(gt->awake == -ENODEV)) return; + if (intel_gt_is_wedged(gt)) + return; + if (GRAPHICS_VER(i915) == 12) { regs = gen12_regs; num = ARRAY_SIZE(gen12_regs); -- 2.36.1