mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-08-31 01:11:51 -04:00
gpu: nova-core: return non-WPR heap size as u64 from HALs
This is always immediately widened to u64, so just return it as a u64 from the beginning. Signed-off-by: Eliot Courtney <ecourtney@nvidia.com> Link: https://patch.msgid.link/20260804-blackwell-fixes-v4-3-ac858b6a1935@nvidia.com Signed-off-by: Alexandre Courbot <acourbot@nvidia.com>
This commit is contained in:
committed by
Alexandre Courbot
parent
b2bc53d344
commit
744e168d62
@@ -271,7 +271,7 @@ pub(crate) fn new(
|
||||
};
|
||||
|
||||
let non_wpr_heap = {
|
||||
let non_wpr_heap_size = u64::from(hal.non_wpr_heap_size());
|
||||
let non_wpr_heap_size = hal.non_wpr_heap_size();
|
||||
FbRange(wpr2.start - non_wpr_heap_size..wpr2.start)
|
||||
};
|
||||
|
||||
|
||||
@@ -37,7 +37,7 @@ pub(crate) trait FbHal {
|
||||
fn pmu_reserved_size(&self) -> u32;
|
||||
|
||||
/// Returns the non-WPR heap size for this chipset, in bytes.
|
||||
fn non_wpr_heap_size(&self) -> u32;
|
||||
fn non_wpr_heap_size(&self) -> u64;
|
||||
|
||||
/// Returns the FRTS size, in bytes.
|
||||
fn frts_size(&self) -> u64;
|
||||
|
||||
@@ -74,7 +74,7 @@ fn pmu_reserved_size(&self) -> u32 {
|
||||
super::tu102::pmu_reserved_size_tu102()
|
||||
}
|
||||
|
||||
fn non_wpr_heap_size(&self) -> u32 {
|
||||
fn non_wpr_heap_size(&self) -> u64 {
|
||||
super::tu102::non_wpr_heap_size_tu102()
|
||||
}
|
||||
|
||||
|
||||
@@ -41,7 +41,7 @@ fn pmu_reserved_size(&self) -> u32 {
|
||||
super::tu102::pmu_reserved_size_tu102()
|
||||
}
|
||||
|
||||
fn non_wpr_heap_size(&self) -> u32 {
|
||||
fn non_wpr_heap_size(&self) -> u64 {
|
||||
super::tu102::non_wpr_heap_size_tu102()
|
||||
}
|
||||
|
||||
|
||||
@@ -111,9 +111,9 @@ fn pmu_reserved_size(&self) -> u32 {
|
||||
pmu_reserved_size_gb100()
|
||||
}
|
||||
|
||||
fn non_wpr_heap_size(&self) -> u32 {
|
||||
fn non_wpr_heap_size(&self) -> u64 {
|
||||
// Non-WPR heap for GB10x (see Open RM: kgspGetNonWprHeapSize, GB100/GB102).
|
||||
u32::SZ_2M
|
||||
u64::SZ_2M
|
||||
}
|
||||
|
||||
fn frts_size(&self) -> u64 {
|
||||
|
||||
@@ -71,10 +71,10 @@ fn pmu_reserved_size(&self) -> u32 {
|
||||
super::gb100::pmu_reserved_size_gb100()
|
||||
}
|
||||
|
||||
fn non_wpr_heap_size(&self) -> u32 {
|
||||
fn non_wpr_heap_size(&self) -> u64 {
|
||||
// Non-WPR heap for GB20x (see Open RM: kgspGetNonWprHeapSize, GB202+).
|
||||
// This size is r570-specific.
|
||||
u32::SZ_2M + u32::SZ_128K
|
||||
u64::SZ_2M + u64::SZ_128K
|
||||
}
|
||||
|
||||
fn frts_size(&self) -> u64 {
|
||||
|
||||
@@ -63,9 +63,9 @@ fn pmu_reserved_size(&self) -> u32 {
|
||||
super::tu102::pmu_reserved_size_tu102()
|
||||
}
|
||||
|
||||
fn non_wpr_heap_size(&self) -> u32 {
|
||||
fn non_wpr_heap_size(&self) -> u64 {
|
||||
// Non-WPR heap for Hopper (see Open RM: kgspCalculateFbLayout_GH100).
|
||||
u32::SZ_2M
|
||||
u64::SZ_2M
|
||||
}
|
||||
|
||||
fn frts_size(&self) -> u64 {
|
||||
|
||||
@@ -46,8 +46,8 @@ pub(super) const fn pmu_reserved_size_tu102() -> u32 {
|
||||
0
|
||||
}
|
||||
|
||||
pub(super) const fn non_wpr_heap_size_tu102() -> u32 {
|
||||
u32::SZ_1M
|
||||
pub(super) const fn non_wpr_heap_size_tu102() -> u64 {
|
||||
u64::SZ_1M
|
||||
}
|
||||
|
||||
pub(super) const fn frts_size_tu102() -> u64 {
|
||||
@@ -77,7 +77,7 @@ fn pmu_reserved_size(&self) -> u32 {
|
||||
pmu_reserved_size_tu102()
|
||||
}
|
||||
|
||||
fn non_wpr_heap_size(&self) -> u32 {
|
||||
fn non_wpr_heap_size(&self) -> u64 {
|
||||
non_wpr_heap_size_tu102()
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user