[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20250829224054.GA2082651@joelbox2>
Date: Fri, 29 Aug 2025 18:43:50 -0400
From: Joel Fernandes <joelagnelf@...dia.com>
To: Timur Tabi <ttabi@...dia.com>
Cc: "dri-devel@...ts.freedesktop.org" <dri-devel@...ts.freedesktop.org>,
"dakr@...nel.org" <dakr@...nel.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
Alexandre Courbot <acourbot@...dia.com>,
"joel@...lfernandes.org" <joel@...lfernandes.org>,
"lossin@...nel.org" <lossin@...nel.org>,
"ojeda@...nel.org" <ojeda@...nel.org>,
"boqun.feng@...il.com" <boqun.feng@...il.com>,
"a.hindborg@...nel.org" <a.hindborg@...nel.org>,
"simona@...ll.ch" <simona@...ll.ch>,
"tmgross@...ch.edu" <tmgross@...ch.edu>,
"alex.gaynor@...il.com" <alex.gaynor@...il.com>,
"tzimmermann@...e.de" <tzimmermann@...e.de>,
"mripard@...nel.org" <mripard@...nel.org>,
"maarten.lankhorst@...ux.intel.com" <maarten.lankhorst@...ux.intel.com>,
"nouveau@...ts.freedesktop.org" <nouveau@...ts.freedesktop.org>,
John Hubbard <jhubbard@...dia.com>,
"rust-for-linux@...r.kernel.org" <rust-for-linux@...r.kernel.org>,
"bjorn3_gh@...tonmail.com" <bjorn3_gh@...tonmail.com>,
"airlied@...il.com" <airlied@...il.com>,
"aliceryhl@...gle.com" <aliceryhl@...gle.com>,
"gary@...yguo.net" <gary@...yguo.net>,
Alistair Popple <apopple@...dia.com>
Subject: Re: [PATCH 05/17] nova-core: gsp: Add support for checking if GSP
reloaded
On Fri, Aug 29, 2025 at 06:44:53PM +0000, Timur Tabi wrote:
> On Fri, 2025-08-29 at 13:32 -0400, Joel Fernandes wrote:
> > + /// Function to check if GSP reload/resume has completed during the boot process.
> > + #[expect(dead_code)]
> > + pub(crate) fn check_reload_completed(&self, bar: &Bar0, timeout: Delta) -> Result<bool> {
>
> I think this should be renamed to is_reload_completed() and return just bool instead of Result<bool>
This function can return Err(ETIMEDOUT).
>
> > + wait_on(timeout, || {
> > + let val = regs::NV_PGC6_BSI_SECURE_SCRATCH_14::read(bar);
> > + if val.boot_stage_3_handoff() {
> > + Some(true)
> > + } else {
> > + None
> > + }
> > + })
>
> And if you insist on returning Result<bool>, at least have this return Some(false) or
> Some(val.boot_stage_3_handoff()) instead.
Ok, so basically that means we would return False if a timeout occured.
That's fine with me, I can make that change.
thanks,
- Joel
Powered by blists - more mailing lists