Received: by 2002:ad5:4acb:0:0:0:0:0 with SMTP id n11csp474024imw; Thu, 14 Jul 2022 05:10:17 -0700 (PDT) X-Google-Smtp-Source: AGRyM1tf2NDTIEPSfT0gzLWg+mYVTgpVrRu4w7DPhGYzgRr6DKYG2mRMX/5DB5XUVYiZs+ACE3Sm X-Received: by 2002:a05:6402:370c:b0:435:cb14:9aa8 with SMTP id ek12-20020a056402370c00b00435cb149aa8mr11859274edb.35.1657800617280; Thu, 14 Jul 2022 05:10:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1657800617; cv=none; d=google.com; s=arc-20160816; b=zNpB6oqsIFqs6EdQAi+HWv5zw789jchXa35SZ3oGFzBKwrH+9ihdLtg2btvwvtV81p dZ8AOOdLgFkP0ylgRZexOfP2PB08rBNtjbSzcm5/3ZhrO537PeSWaxFe0OFWkfLQ79ie xPKTzVOsYeN1NS8GikVwMQlyZ09P4g/0m9lOpOaQ4abJ13Px0GDL649RaVBmqvwxU9Zw E3AOsKmsvUumpl99wKKSyqVRoceVToMqzZlEU8tGAE8IxGIs9jtmFIHdtzPuHT9zFbFf WkX796AN2rtAn6V9ZxYS2MJcYpjsRo+MPoh+S5s+iPw3ua6fIrntjXtmbBngGWbBF/D2 lojg== 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=ihDl/Ihv3hX5ZSOSSa/2owjRettYC8qVEvHEyao0pdk=; b=qclv+Iwvd8MGgx1wZ5msTtuEcdY9LG6MZjW3mgbA0jqGBS9eD3otebpR8YpnkHeeLW knXYwNCOKp9CXZFxT1Q7HMpjm4FeRYDSuyTeYJklI3i3I9PpgGaGfq/gDKMDBeePN6ey shJMquzjGGvlAExTyJHB2a9A8eZ7bASXameHjeV+JXYGj7SAw7uePfivkCvQz1882Qed nD1X+IkfWO28MB6bH4Q5byUMKcGMGVu0gh6ruzj3xnDY+OfqsOk4YJ0lY6jKWfBzXtIT TwCj7eSZAMWJaI5O6N9QMmsft+pPxKPPtne9nL1wF6UDb+lJkR11kyB/R5nUuXC5oNNp X7uA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@kernel.org header.s=k20201202 header.b=I3nE6rQ8; 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 yz14-20020a170906dc4e00b0072a8a36c34esi1678037ejb.358.2022.07.14.05.09.49; Thu, 14 Jul 2022 05:10:17 -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=I3nE6rQ8; 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 S239183AbiGNMHE (ORCPT + 99 others); Thu, 14 Jul 2022 08:07:04 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48886 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238844AbiGNMGf (ORCPT ); Thu, 14 Jul 2022 08:06:35 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6DAFE5C9EF; Thu, 14 Jul 2022 05:06:33 -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 E05ADB824D7; Thu, 14 Jul 2022 12:06:31 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 6A83CC34115; Thu, 14 Jul 2022 12:06:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1657800390; bh=Q3PvrZaFh8yidXeIp5BuRSLNfcqnlDsJtIj9djuNb0k=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=I3nE6rQ8BmrjmbidGZcBMiKHvI2fdOizwhaFeWQbyZ21kXuZzX6DvVuCcAHbkl+3k E1J7b9+o8PZrI5Wds9dGC26Rf+W7MkhHvlo+mT1fUy5w8A3vEO3Mw0S+hDEqO3kIIR s9DwHv+v7rWiBM4Ijj8XuZQ/Y614roN+TVnjuIEdReoeieXfV+aK2j8npgFucnauiQ LdjYaqkcKoJcYu0y6YkBHRNbJS1S6h2JJj+D9Au/A4E8UFCctFt3I2jctOGqBF2y19 1SSIZKCJWfjlZPQgb250pV8Yor5GJKAlTJ7+gMl8LYqR95Xz9bj+YNbp0YbTtdPXah 8OW+NNoagcl4A== Received: from mchehab by mail.kernel.org with local (Exim 4.95) (envelope-from ) id 1oBxbv-0059sh-SF; Thu, 14 Jul 2022 13:06:27 +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 v2 05/21] drm/i915/gt: Skip TLB invalidations once wedged Date: Thu, 14 Jul 2022 13:06:10 +0100 Message-Id: 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 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. 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: 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 v2 00/21] at: https://lore.kernel.org/all/cover.1657800199.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