Received: by 2002:ad5:4acb:0:0:0:0:0 with SMTP id n11csp506328imw; Wed, 13 Jul 2022 02:45:45 -0700 (PDT) X-Google-Smtp-Source: AGRyM1uFb0BwYrkt6nQnVprfwVXK+Vivci8DCUoxIvuqKKM20+kGLjrnhLBE0qckHiidHCpQCMbK X-Received: by 2002:a63:8b4b:0:b0:412:96f4:f154 with SMTP id j72-20020a638b4b000000b0041296f4f154mr2253653pge.281.1657705545226; Wed, 13 Jul 2022 02:45:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1657705545; cv=none; d=google.com; s=arc-20160816; b=Fu0I6jD2l1ajTvqvXMmMSt9V/1c2Juq6DnkmKfg3/iAjwI/iZ9Fdv5MvZ8rEzI+Ccd N1t2/XwcOcPoXxf3BhvPPa4K501JGLStoxaTviVuxajWyk/SDEP2DJhklYFOQmnDQDXH IBH/81fq3u4/+YGqKYmKobuB/IDfjnLJ4KCcB4NFNDsUOUrdYp6W91d3ZL1WdpWO3nNw ka5znJ/7/0H3fEk4GlcSrlTO4OD7Pmtbq22z+Cc5u5VzTwXBBtHYVS9ldmsbtSczNBTB Ahz9LWocJVG+HQj9x7zSZq5H8hNAtNKChe5fpmqTSqs03MkYGX5k8uZuLB6TwGzVWXj+ cRvA== 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=oaG2G0gXsgypBVhHxZLkXo+qTcUqPl/K/qNPPOVUrEg=; b=DNnEOnvaF3DXG7kmOUtR1OAflQC1OWACGz0lOUvlYiZiGfj51xar52/LqDUU4i/NZ5 0Uo0dDHI60j3GlpnFlhRUIAbayiLbZl3SSTYTuz76oQSnG/fHZskse4f/ohwda75GRP+ VN+HBXpuAkZ5STEoMkDtKv+x8cq/eQfCxgls//Wr7oSt8n3+lzqnBAL0VScysbh6lve/ +qJXMP+ofUcec2x7WDFurgHamQKHoyFMQfM+TTvCrXZStvwDnERl5e+wtReZvivv9lD2 Srw04n93E3Z0y6nzBRhyiV2BicpHdmH8C+7AYYXHVcuI0bq4puaE6bDyCAEgfzpoZxtS YNnA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@kernel.org header.s=k20201202 header.b=WuyDvdbd; 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 o11-20020a17090ac08b00b001efbea806fesi1616828pjs.113.2022.07.13.02.45.33; Wed, 13 Jul 2022 02:45:45 -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=WuyDvdbd; 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 S235575AbiGMJbN (ORCPT + 99 others); Wed, 13 Jul 2022 05:31:13 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43858 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235456AbiGMJa0 (ORCPT ); Wed, 13 Jul 2022 05:30:26 -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 E9924EA14B; 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 5BA04B81D63; Wed, 13 Jul 2022 09:30:23 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id E2CF2C341C6; 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=YJNkVNAUvK5StDP52pIbkShfQ+2J49Rn1f/TmIabGZI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=WuyDvdbdi94Eg3JERcGkhWtGT6aN6uWBEKdOWsE4QjEKyrsCaP/qcdcfjogVtBDGU bI1YrxRVQGJkv8JugiM7yrW/E3ZbkTZbEpf9LvOU3Anqeh4Lwj1xva7ENM5mVyvnB7 2plsUVI42lUlXvTgCt4kFhWzmJsYbicyZ5rUKfMMvi0AZY8BTUtjki3VvHliZ0tr1O Nm7RXnewrhbtYopFhntoNRlKYE8GvDAdl7i/YdyeLrOkFd58PzYXKVmpK9qIPvSGUS 2QNUbaKF36wbj6c+81rtg+op9NSPFoAMgy0YvVEdkedT7f5TtZTLDCJB7RNbzHYYHB mN8dWUTGrSYFg== Received: from mchehab by mail.kernel.org with local (Exim 4.95) (envelope-from ) id 1oBYhH-0050LO-KC; 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 05/21] drm/i915/gt: Skip TLB invalidations once wedged Date: Wed, 13 Jul 2022 10:30:02 +0100 Message-Id: <1af2335658aacc73cdbbe26e041d065e198e6870.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 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 --- See [PATCH 00/21] at: https://lore.kernel.org/all/cover.1657703926.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