Received: from smtp.kernel.org (aws-us-west-2-korg-mail-alma10-1.taild15c8.ts.net [100.103.45.18]) (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 4217D568FB9; Wed, 9 Sep 2026 14:12:07 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1788963128; cv=none; b=hTdqd9S88nWDgPu3pTveSbs+oEjaYeN1DKLCBDewRDz+Zz+TPVkY1U35R5UCDFgi+Z5b6qJfto8YwPShgxtEi6m3WobG/baeUJhsW7XboG/UG1tB+EQjcczFeCjJEPdZ1DGL/twai9saDJWxKVDjhJ9t+MO3uxF7imZBYLB22V8= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1788963128; c=relaxed/simple; bh=dkYzeEEMWusCGrPv0fNXNfBsw3XxJhlsiUGXjf9OQY8=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=Gc7vC3dg4wdovat+k0cCRG1NPZAHflSWUzdQvRzkeYQuPU3xEHEULFqHZqR/T+VezXqi29TDB6Ys2TO1+q3+vgZOqt3Jx2ydQoDd6DU2qPd8w0N/FS0iRqRqp2RUtBH4j6/yT5DFQ0h5mtzm1TM4l6ziDAArbODA7dmQvrR49jQ= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=vF6X+C6S; arc=none smtp.client-ip=100.103.45.18 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="vF6X+C6S" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 8D2011F00A3A; Wed, 9 Sep 2026 14:12:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1788963127; bh=dtDzqujV37moPoW0hMsFyENH3NKl2AHHLl1t3LlPAiM=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=vF6X+C6SfmiO9Xgdw9eS/Hs2vVrKvs5JaBknPmKosoWepDarw9gX/eOkLhuT1rW4k izQxyn7bSFTWw08eaXg1d9G0ND1dtbVRb0mhSMKCZpLrQ6MN0Y4ZdskaVpBr/M/1S5 V0/DGGVA3uyV0roNttbPn+2i630I2xnfYDD7fwjA= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Faith Ekstrand , Aaron Kling , Danilo Krummrich Subject: [PATCH 7.2 530/556] drm/nouveau: Use write-combined maps for coherent Date: Wed, 9 Sep 2026 15:43:30 +0200 Message-ID: <20260909134249.050870377@linuxfoundation.org> X-Mailer: git-send-email 2.55.0 In-Reply-To: <20260909134230.441546314@linuxfoundation.org> References: <20260909134230.441546314@linuxfoundation.org> User-Agent: quilt/0.69 X-stable: review X-Patchwork-Hint: ignore Precedence: bulk X-Mailing-List: patches@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 7.2-stable review patch. If anyone has any objections, please let me know. ------------------ From: Faith Ekstrand commit 774b73428e6eabb4f0382aeeb76e569c7b106a29 upstream. On Tegra devices, uncached maps translate to device memory, causing unaligned accesses by userspace resulting in a SIGBUS. Instead, use write-combined maps to ensure proper access. This would also affect discrete cards on any Arm device. It was determined that discrete cards regardless of cpu arch should use write-combined maps for coherent anyways. Thus this change is made for all gpu types. Cc: stable@vger.kernel.org Signed-off-by: Faith Ekstrand Co-developed-by: Aaron Kling Signed-off-by: Aaron Kling Fixes: 1b4ea4c5980f ("drm/ttm: set the tt caching state at creation time") Link: https://patch.msgid.link/20260821-tegra-coherent-wc-v2-1-2b1ddb67bf18@gmail.com Signed-off-by: Danilo Krummrich Signed-off-by: Greg Kroah-Hartman --- drivers/gpu/drm/nouveau/nouveau_sgdma.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) --- a/drivers/gpu/drm/nouveau/nouveau_sgdma.c +++ b/drivers/gpu/drm/nouveau/nouveau_sgdma.c @@ -72,9 +72,7 @@ nouveau_sgdma_create_ttm(struct ttm_buff struct nouveau_sgdma_be *nvbe; enum ttm_caching caching; - if (nvbo->force_coherent) - caching = ttm_uncached; - else if (drm->agp.bridge) + if (nvbo->force_coherent || drm->agp.bridge) caching = ttm_write_combined; else caching = ttm_cached;