Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 1BD704776B for ; Mon, 11 Dec 2023 13:55:44 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="jPb+mGFq" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 4F037C433CC; Mon, 11 Dec 2023 13:55:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1702302944; bh=Z4zFiJy8nVOqQvwvU48WTvdbUM9MltSNX1w9qcMnUeU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=jPb+mGFqgCqBXZeAWYED8WF5ytJBtR1L0OSIO0Neq+wjAJwKMNBpfh3jS0ihwCgd4 C72PqJbN7chu5Bs4YNMg/NncPChX2hFukhLt+2XxMPZ8Xa8zW2eHDHeXw+p62z6crI yHA2KNsNO2299tmn/NXS4yCVd1MBIj4qeGZhqvaBo5P3M+TI+FI/SXyHrZ+d+xyoke RtQfipAgfV0HuATpGuOR8Zow4CsTX/LH8mvNrL+9rEAniKI9XBsyTK8pwqHDd9Yflh Dx2wIOYQ6VhW0bBA3ex1JMqkOi1MiklPCeeSrj2/gqOjpOpysHL3u84FYXGSMjiK05 3A4Z3GztBTexw== From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Dave Airlie , Danilo Krummrich , Sasha Levin , kherbst@redhat.com, lyude@redhat.com, airlied@gmail.com, daniel@ffwll.ch, bskeggs@redhat.com, dri-devel@lists.freedesktop.org, nouveau@lists.freedesktop.org Subject: [PATCH AUTOSEL 6.1 13/29] nouveau/tu102: flush all pdbs on vmm flush Date: Mon, 11 Dec 2023 08:53:57 -0500 Message-ID: <20231211135457.381397-13-sashal@kernel.org> X-Mailer: git-send-email 2.42.0 In-Reply-To: <20231211135457.381397-1-sashal@kernel.org> References: <20231211135457.381397-1-sashal@kernel.org> Precedence: bulk X-Mailing-List: stable@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-stable: review X-Patchwork-Hint: Ignore X-stable-base: Linux 6.1.66 Content-Transfer-Encoding: 8bit From: Dave Airlie [ Upstream commit cb9c919364653eeafb49e7ff5cd32f1ad64063ac ] This is a hack around a bug exposed with the GSP code, I'm not sure what is happening exactly, but it appears some of our flushes don't result in proper tlb invalidation for out BAR2 and we get a BAR2 fault from GSP and it all dies. Signed-off-by: Dave Airlie Signed-off-by: Danilo Krummrich Link: https://patchwork.freedesktop.org/patch/msgid/20231130010852.4034774-1-airlied@gmail.com Signed-off-by: Sasha Levin --- drivers/gpu/drm/nouveau/nvkm/subdev/mmu/vmmtu102.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/nouveau/nvkm/subdev/mmu/vmmtu102.c b/drivers/gpu/drm/nouveau/nvkm/subdev/mmu/vmmtu102.c index 6cb5eefa45e9a..5a08458fe1b7f 100644 --- a/drivers/gpu/drm/nouveau/nvkm/subdev/mmu/vmmtu102.c +++ b/drivers/gpu/drm/nouveau/nvkm/subdev/mmu/vmmtu102.c @@ -31,7 +31,7 @@ tu102_vmm_flush(struct nvkm_vmm *vmm, int depth) type |= 0x00000001; /* PAGE_ALL */ if (atomic_read(&vmm->engref[NVKM_SUBDEV_BAR])) - type |= 0x00000004; /* HUB_ONLY */ + type |= 0x00000006; /* HUB_ONLY | ALL PDB (hack) */ mutex_lock(&vmm->mmu->mutex); -- 2.42.0