On Fri Oct 30, 2026 at 4:57 PM JST, Eliot Courtney wrote:
> On Mon Oct 26, 2026 at 1:24 PM JST, Dave Airlie via B4 Relay wrote:
>> From: Dave Airlie <[email protected]>
>>
>> These aren't used on systems with no framebuffer memory.
>>
>> Signed-off-by: Dave Airlie <[email protected]>
>> ---
>>  drivers/gpu/nova-core/gpu.rs               | 15 +++++++------
>>  drivers/gpu/nova-core/mm.rs                | 34 
>> +++++++++++++++---------------
>>  drivers/gpu/nova-core/mm/bar_user.rs       | 14 ++++++------
>>  drivers/gpu/nova-core/mm/pagetable/map.rs  | 10 ++++-----
>>  drivers/gpu/nova-core/mm/pagetable/walk.rs |  2 +-
>>  5 files changed, 38 insertions(+), 37 deletions(-)
>>
>> diff --git a/drivers/gpu/nova-core/gpu.rs b/drivers/gpu/nova-core/gpu.rs
>> index 4e59072cab50..5d53fde2cdc1 100644
>> --- a/drivers/gpu/nova-core/gpu.rs
>> +++ b/drivers/gpu/nova-core/gpu.rs
>> @@ -564,18 +564,19 @@ pub(crate) fn new<'a>(
>>  
>>              // Create GPU memory manager owning memory management resources.
>>              mm: {
>> -                let usable_vram = 
>> gsp_static_info.usable_fb_regions.first().ok_or(ENODEV)?;
>> -                let buddy_params = GpuBuddyParams {
>> -                    base_offset: usable_vram.start,
>> -                    size: usable_vram.end - usable_vram.start,
>> -                    chunk_size: Alignment::new::<SZ_4K>(),
>> -                };
>> +                let buddy_params = 
>> gsp_static_info.usable_fb_regions.first().map(|usable_vram| {
>> +                    GpuBuddyParams {
>> +                        base_offset: usable_vram.start,
>> +                        size: usable_vram.end - usable_vram.start,
>> +                        chunk_size: Alignment::new::<SZ_4K>(),
>> +                    }
>> +                });
>
> We should probably add a helper method on e.g. Chipset to say which
> chips we expect FB on vs not, instead of proceeding with no fb regions
> here for ones where we expect there to be one.

Typically "a helper method on Chipset" means that we want a HAL method.
It just so happens that we already have a FB HAL, and a `vidmem_size`
method on it. I don't know if a vidmem size of `0` can always be
interpreted as "no framebuffer", but if not maybe we can rework it to
add that information, or just add a new method.

Reply via email to