From 337fcd31e4c7bd8a85b6ccba1bc44227dce9eebd Mon Sep 17 00:00:00 2001 From: Dave Airlie Date: Wed, 7 May 2025 17:27:31 -0400 Subject: [PATCH] nvk/nil: Use PTE_KIND_GENERIC_MEMORY for everything on Blackwell+ This has been confirmed for current blackwell hardware, look out in future for changes. Part-of: --- src/nouveau/nil/image.rs | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/src/nouveau/nil/image.rs b/src/nouveau/nil/image.rs index 566660e41a9..933cea1cdd9 100644 --- a/src/nouveau/nil/image.rs +++ b/src/nouveau/nil/image.rs @@ -8,7 +8,7 @@ use crate::tiling::Tiling; use crate::Minify; use nil_rs_bindings::*; -use nvidia_headers::classes::{cl9097, cla097, clb197, clc597}; +use nvidia_headers::classes::{cl9097, cla097, clb197, clc597, clcd97}; use std::panic; @@ -742,7 +742,9 @@ impl Image { samples: u32, compressed: bool, ) -> u8 { - if dev.cls_eng3d >= clc597::TURING_A { + if dev.cls_eng3d >= clcd97::BLACKWELL_A { + Self::gb202_choose_pte_kind(format, compressed) + } else if dev.cls_eng3d >= clc597::TURING_A { Self::tu102_choose_pte_kind(format, compressed) } else if dev.cls_eng3d >= cl9097::FERMI_A { Self::nvc0_choose_pte_kind(format, samples, compressed) @@ -751,6 +753,11 @@ impl Image { } } + fn gb202_choose_pte_kind(_format: Format, _compressed: bool) -> u8 { + use nvidia_headers::hwref::tu102::mmu::*; + return NV_MMU_PTE_KIND_GENERIC_MEMORY.try_into().unwrap(); + } + fn tu102_choose_pte_kind(format: Format, compressed: bool) -> u8 { use nvidia_headers::hwref::tu102::mmu::*; match pipe_format::from(format) {