[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <DDV8W8QCD59Y.1HXCXMUS42JI5@nvidia.com>
Date: Thu, 30 Oct 2025 09:54:23 +0900
From: "Alexandre Courbot" <acourbot@...dia.com>
To: "John Hubbard" <jhubbard@...dia.com>, "Alexandre Courbot"
 <acourbot@...dia.com>, "Danilo Krummrich" <dakr@...nel.org>
Cc: "Joel Fernandes" <joelagnelf@...dia.com>, "Timur Tabi"
 <ttabi@...dia.com>, "Alistair Popple" <apopple@...dia.com>, "Edwin Peer"
 <epeer@...dia.com>, "Zhi Wang" <zhiw@...dia.com>, "David Airlie"
 <airlied@...il.com>, "Simona Vetter" <simona@...ll.ch>, "Bjorn Helgaas"
 <bhelgaas@...gle.com>, "Miguel Ojeda" <ojeda@...nel.org>, "Alex Gaynor"
 <alex.gaynor@...il.com>, "Boqun Feng" <boqun.feng@...il.com>, "Gary Guo"
 <gary@...yguo.net>, Björn Roy Baron
 <bjorn3_gh@...tonmail.com>, "Benno Lossin" <lossin@...nel.org>, "Andreas
 Hindborg" <a.hindborg@...nel.org>, "Alice Ryhl" <aliceryhl@...gle.com>,
 "Trevor Gross" <tmgross@...ch.edu>, <nouveau@...ts.freedesktop.org>,
 <rust-for-linux@...r.kernel.org>, "LKML" <linux-kernel@...r.kernel.org>,
 "Nouveau" <nouveau-bounces@...ts.freedesktop.org>
Subject: Re: [PATCH v3 2/2] gpu: nova-core: add boot42 support for next-gen
 GPUs
On Thu Oct 30, 2025 at 9:37 AM JST, John Hubbard wrote:
> On 10/29/25 6:54 AM, Alexandre Courbot wrote:
>> On Wed Oct 29, 2025 at 8:26 PM JST, Danilo Krummrich wrote:
>> <snip>
> ...
>> I don't think this will work because `NV_PMC_BOOT_0` and
>> `NV_PMC_BOOT_42` are different types, so we cannot alternate them in the
>> same call to `try_from`. But the following should:
>> 
>>     let boot0 = regs::NV_PMC_BOOT_0::read(bar);
>>     ...
>> 
>>     if boot0.is_nv04() {
>>         Err(ENODEV)?
>>     }
>> 
>>     if boot0.is_next_gen() {
>>         Spec::try_from(regs::NV_PMC_BOOT_42::read(bar))
>>     } else {
>>         Spec::try_from(boot0)
>>     }
>> 
>
> Done. Final code snippet looks like this:
>
>         let boot0 = regs::NV_PMC_BOOT_0::read(bar);
>
>         if boot0.use_boot42_instead() {
>             Spec::try_from(regs::NV_PMC_BOOT_42::read(bar))
>         } else {
>             Spec::try_from(boot0)
>         }
The previous code was returning `ENODEV` in case of NV04, aren't we
losing this? Or is it moved to BOOT0's `try_from`?
Powered by blists - more mailing lists
 
