Received: by 2002:a05:7412:37c9:b0:e2:908c:2ebd with SMTP id jz9csp1052498rdb; Tue, 19 Sep 2023 20:07:46 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGGLGDiADYrRgGJRsL1ErqJ3mNHBxtUuoE0PtCvE2HpNgPk++Jn+a32G/pTDNymmOm5t8xJ X-Received: by 2002:a17:90a:f98c:b0:274:b12a:37ad with SMTP id cq12-20020a17090af98c00b00274b12a37admr1456963pjb.37.1695179266309; Tue, 19 Sep 2023 20:07:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1695179266; cv=none; d=google.com; s=arc-20160816; b=WBuQZs0b6B6kpupodVUMGfsbClKkcReJ4vMgTQ7Av0gd2/3VBNui5CRCmPUaO66YFn 4HLaGe5xv1OEeoTODb+8idson4jwDtUCDmz0FrA1RcamEamsoEeBV4hsczGefj2dpY1d GxJyyWc7VQJEAWzH0l0kjs6jQgXylEbcYMK53j4jb3HWBqJgR1P3kjaIuFw9L2Rn0H3H Rb0qVg1fn5/ZvGuVlHu0vZ4TAjs94tX78g0YqygMY0MHR+aA+hxsjkTkAecyO3PI6Jnn iAWZyYVJAKIBTuV04o2pIGXViChRiKCNi2+58NcvOX47CTm+Bi7vdTAujifXhAE412rd F9gA== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=IWCGR98wkeIiAHrX3S0J2Z0Uk4CaKPi9pzUAX0nYCVM=; fh=nWGtnMj7G5gTqff4qaf165rv29Qk7WKuInp74qAncyM=; b=H57nQDC40lHGs9LbXiHaEqj/EgWbHU2nbT2L/DIub+b7MIIk6MYbCEgiu2xFJ5dQ4T EOTa4HrfVIwXPQ2oO5RsFxKp3JXjEQd8BEvUai967+swRvFVkF7Jf6GIdFjsrk3WDyHW DWO4UOIoQl/1i16ZYzW1Ot7fUVA9/fZAJ41XSb1aAYCHAzeU++wKYuMIn/62sls/sZfq sh1q0CU9MDLbqvsittgNeTDqZVgxpdn8KVvAxP0xfjOTx/v03rajyznCrc9lMX6xpxAi PTFCmgGrn2Zmt3tEJoYja8drCkwrE5okdvV/GN0/gsz09JTBjzZzR0hNaX+xjoNnzxJt N0Ig== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=MOcLsAyD; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.38 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from fry.vger.email (fry.vger.email. [23.128.96.38]) by mx.google.com with ESMTPS id km8-20020a17090327c800b001b886a0c366si10591334plb.122.2023.09.19.20.07.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 19 Sep 2023 20:07:46 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.38 as permitted sender) client-ip=23.128.96.38; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=MOcLsAyD; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.38 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by fry.vger.email (Postfix) with ESMTP id B3A95804307F; Tue, 19 Sep 2023 15:06:14 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at fry.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233378AbjISWGN (ORCPT + 99 others); Tue, 19 Sep 2023 18:06:13 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43608 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233430AbjISWGH (ORCPT ); Tue, 19 Sep 2023 18:06:07 -0400 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 19B57C9 for ; Tue, 19 Sep 2023 15:05:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1695161114; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=IWCGR98wkeIiAHrX3S0J2Z0Uk4CaKPi9pzUAX0nYCVM=; b=MOcLsAyDs0016K3zqova5X9oUGrRp1+CwmEBgfuRE7M58FelZlYabd8hz1b+r7/nvh68gp GV7X5E1m7vw4fSogYpF27LbGQPxGvJ7l0+tcWtqCgSWuMOLMbCQtrmUj80gEzOxlD9V4cp 4p5GIq+P+qR8z1ou/roWuUsCaaaDy80= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-472-e9ZITAc5N1q5GBhuAHJVWg-1; Tue, 19 Sep 2023 18:05:11 -0400 X-MC-Unique: e9ZITAc5N1q5GBhuAHJVWg-1 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.rdu2.redhat.com [10.11.54.1]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 93712800888; Tue, 19 Sep 2023 22:05:10 +0000 (UTC) Received: from emerald.lyude.net (unknown [10.22.18.67]) by smtp.corp.redhat.com (Postfix) with ESMTP id 1A52340C2064; Tue, 19 Sep 2023 22:05:10 +0000 (UTC) From: Lyude Paul To: dri-devel@lists.freedesktop.org, nouveau@lists.freedesktop.org Cc: Ben Skeggs , Danilo Krummrich , Karol Herbst , David Airlie , Daniel Vetter , Danilo Krummrich , Dave Airlie , linux-kernel@vger.kernel.org (open list) Subject: [PATCH v3 04/44] drm/nouveau/mmu/gp100-: always invalidate TLBs at CACHE_LEVEL_ALL Date: Tue, 19 Sep 2023 17:55:59 -0400 Message-ID: <20230919220442.202488-5-lyude@redhat.com> In-Reply-To: <20230919220442.202488-1-lyude@redhat.com> References: <20230919220442.202488-1-lyude@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Scanned-By: MIMEDefang 3.1 on 10.11.54.1 X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on fry.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (fry.vger.email [0.0.0.0]); Tue, 19 Sep 2023 15:06:14 -0700 (PDT) From: Ben Skeggs Fixes some issues when running on top of RM. Signed-off-by: Ben Skeggs Reviewed-by: Lyude Paul Acked-by: Danilo Krummrich Signed-off-by: Lyude Paul --- drivers/gpu/drm/nouveau/nvkm/subdev/mmu/vmmgp100.c | 2 +- drivers/gpu/drm/nouveau/nvkm/subdev/mmu/vmmtu102.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/nouveau/nvkm/subdev/mmu/vmmgp100.c b/drivers/gpu/drm/nouveau/nvkm/subdev/mmu/vmmgp100.c index f3630d0e0d55d..bddac77f48f06 100644 --- a/drivers/gpu/drm/nouveau/nvkm/subdev/mmu/vmmgp100.c +++ b/drivers/gpu/drm/nouveau/nvkm/subdev/mmu/vmmgp100.c @@ -558,7 +558,7 @@ gp100_vmm_invalidate_pdb(struct nvkm_vmm *vmm, u64 addr) void gp100_vmm_flush(struct nvkm_vmm *vmm, int depth) { - u32 type = (5 /* CACHE_LEVEL_UP_TO_PDE3 */ - depth) << 24; + u32 type = 0; if (atomic_read(&vmm->engref[NVKM_SUBDEV_BAR])) type |= 0x00000004; /* HUB_ONLY */ type |= 0x00000001; /* PAGE_ALL */ diff --git a/drivers/gpu/drm/nouveau/nvkm/subdev/mmu/vmmtu102.c b/drivers/gpu/drm/nouveau/nvkm/subdev/mmu/vmmtu102.c index 6cb5eefa45e9a..0095d58d4d9a1 100644 --- a/drivers/gpu/drm/nouveau/nvkm/subdev/mmu/vmmtu102.c +++ b/drivers/gpu/drm/nouveau/nvkm/subdev/mmu/vmmtu102.c @@ -27,7 +27,7 @@ static void tu102_vmm_flush(struct nvkm_vmm *vmm, int depth) { struct nvkm_device *device = vmm->mmu->subdev.device; - u32 type = (5 /* CACHE_LEVEL_UP_TO_PDE3 */ - depth) << 24; + u32 type = 0; type |= 0x00000001; /* PAGE_ALL */ if (atomic_read(&vmm->engref[NVKM_SUBDEV_BAR])) -- 2.41.0