Received: by 2002:a6b:fb09:0:0:0:0:0 with SMTP id h9csp614951iog; Wed, 15 Jun 2022 08:44:22 -0700 (PDT) X-Google-Smtp-Source: AGRyM1t0gLle+3K3RIRYC5hTOnzAQs+F9y26WswTJZfxOUU35vMJQWLYJQhk1o6BpBeaGu6VbBdv X-Received: by 2002:a17:903:20d3:b0:168:cca5:e79e with SMTP id i19-20020a17090320d300b00168cca5e79emr454054plb.66.1655307862640; Wed, 15 Jun 2022 08:44:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1655307862; cv=none; d=google.com; s=arc-20160816; b=Ka9S2opSKcO4tcznT0AoCaHpmMdb24d90RvRWIJTIPzpyOCN6xYqiQCKn75oYNla6v +PcH3sUHqKrglRwQmVhk0LiLL+V702dfhJj+E7+FEq/cdYJCNwqh/HR3KvV0bLf/cIDK SUfKC4ml2x5cn1Nve8iMdXKMCXIqJYO7Ly9D1/gQHKr92twPUeU9XTM6UrKNpyT8jR2Q YiQX62WUzQj64HQEMpql3AyK3FoRen9u+f7Y9Zojv/QDab/6+QOL12pzkpwKAIg6iNOk m9H8zALtdc8YakCdSqM019Czm8KFOKPP89K/jerf7QNiVZA0PXhCJRUfiK+yb9pn1PGa u/Eg== 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=HVPpHM/ZSDpt7Yq177EoM4aK8D7wJbtCMgiHaZxlYck=; b=ZKYzyJaLYsue1SeZ8/VABUk9dmLJ/+5T8lVP5vGV1SQxjaM0TknFAVzRDkHCBeIR2J dw4yuEZjd766S79GTgdEXrYxWacGGSyD2gss07EUNmkd9qxnpYn8PClZ6/awG4t2YvqH Bwu+ElG1+tb7zWX5Y0B1AFl6XVwvkTG4BPjt/6Q5apOJT5fAVveABmrx5CjcGx9dZ6Lg cgoQP63dgxkWH5FhfK2mfAaWB1rVlL1lDgXzGvLUA3wMF0w8+2OqqoGUrh4LqlOxdWRv 8wEkStdJH0mvNd6cE5qrUjoo06hYvBEy3tro4gkF/4cQrz6HU6kEQHhyTcaFiH8xImJD DXqw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@kernel.org header.s=k20201202 header.b=LXQf8xhE; 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 h2-20020a170902f54200b0016645f83ef1si20825059plf.213.2022.06.15.08.44.06; Wed, 15 Jun 2022 08:44:22 -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=LXQf8xhE; 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 S1353411AbiFOPaP (ORCPT + 99 others); Wed, 15 Jun 2022 11:30:15 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50524 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1355472AbiFOP2i (ORCPT ); Wed, 15 Jun 2022 11:28:38 -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 AFE94427F1; Wed, 15 Jun 2022 08:27:48 -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 55EF2B81F0B; Wed, 15 Jun 2022 15:27:47 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id ECDEDC34115; Wed, 15 Jun 2022 15:27:45 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1655306866; bh=d5dFQ9NHsAkSm+gLQzVN8kPNqSNsxZsVoyo0jFhjNL0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=LXQf8xhEcd/2SP9lwnz0ukumi2OpBNyaaWzqoWEweJNDGmokgwGwt3y1sppwNHyQ7 Rzxzuq4qly/kJRh9TpXSJs/vZ4SSwYySPo6oCtR3lSb9i2ZGukCYt4ukqKgYmFIxCi 4RYwiBl2BDFOyJEqVGqfPdTjg/wDJ2XcvxfPYlQ/2GwAx3ebFWcSy330pPk76hRvDv m1eLCgWxxKsmve7jSKKvt972JvLb/DQ1dXV3QlwxS2UNwbNxjFozXlJyyu8o8WPTFV KO/BfNu64ZOcJb9+Gdm3qMvPUeiwovYMC/uqNJ7oIVn1Y+/K4J48asEamxxyleAP/i 6fvv0mYBklH9w== Received: from mchehab by mail.kernel.org with local (Exim 4.95) (envelope-from ) id 1o1Uvm-00A4Jj-EX; Wed, 15 Jun 2022 16:27:42 +0100 From: Mauro Carvalho Chehab Cc: Chris Wilson , "Fei Yang" , =?UTF-8?q?Micha=C5=82=20Winiarski?= , "Thomas Hellstrom" , Andi Shyti , Daniel Vetter , Daniele Ceraolo Spurio , Dave Airlie , David Airlie , Jani Nikula , John Harrison , Joonas Lahtinen , Lucas De Marchi , Matt Roper , Matthew Auld , Rodrigo Vivi , Tvrtko Ursulin , dri-devel@lists.freedesktop.org, intel-gfx@lists.freedesktop.org, linux-kernel@vger.kernel.org, mauro.chehab@linux.intel.com, stable@vger.kernel.org, =?UTF-8?q?Thomas=20Hellstr=C3=B6m?= , Mauro Carvalho Chehab Subject: [PATCH 3/6] drm/i915/gt: Skip TLB invalidations once wedged Date: Wed, 15 Jun 2022 16:27:37 +0100 Message-Id: <9d9e663ca8e97becf04e1d4c8cb8a9a1f397a5f1.1655306128.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=-8.3 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 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. Fixes: 7938d61591d3 ("drm/i915: Flush TLBs before releasing backing store") Signed-off-by: Chris Wilson Cc: Fei Yang Cc: Andi Shyti Cc: stable@vger.kernel.org Acked-by: Thomas Hellström Signed-off-by: Mauro Carvalho Chehab --- See [PATCH 0/6] at: https://lore.kernel.org/all/cover.1655306128.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 61b7ec5118f9..fb4fd5273ca4 100644 --- a/drivers/gpu/drm/i915/gt/intel_gt.c +++ b/drivers/gpu/drm/i915/gt/intel_gt.c @@ -1226,6 +1226,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