Re: [PATCH v11 02/20] gpu: nova-core: gsp: Extract usable FB region from GSP
From: Joel Fernandes
Date: Sat Apr 25 2026 - 16:58:03 EST
On Tue, Apr 21, 2026 at 10:55:21AM -0400, Joel Fernandes wrote:
> On Thu, Apr 16, 2026 at 04:26:48PM -0700, John Hubbard wrote:
> > On 4/15/26 2:05 PM, Joel Fernandes wrote:
> > ...
> >
> > Apologies, I found one more minor thing, while looking at a
> > subsequent patch in this series:
> >
> > > impl MessageFromGsp for GetGspStaticInfoReply {
> > > const FUNCTION: MsgFunction = MsgFunction::GetGspStaticInfo;
> > > type Message = GspStaticConfigInfo;
> > > - type InitError = Infallible;
> > > + type InitError = Error;
> > >
> > > fn read(
> > > msg: &Self::Message,
> > > @@ -205,6 +209,7 @@ fn read(
> > > ) -> Result<Self, Self::InitError> {
> > > Ok(GetGspStaticInfoReply {
> > > gpu_name: msg.gpu_name_str(),
> > > + usable_fb_region: msg.first_usable_fb_region().ok_or(ENODEV)?,
> >
> > OK, failing out is correct here. But in addition, we should also
> > log this at dev_err!() level. This is rare, surprising, and actionable,
> > so perfect for that level of logging.
>
> Sure, that works for me. Will add it in for v12.
dev_err unfortunately requires passing dev into MessageFromGsp::read()
which it doesn't today. Doing so modifies all other implementations of read()
as well, not just GspStaticInfo. For v12 I will leave it as is, but lets
discuss for future versions.
Also, note that the error does not go undetected because it will result in
the following dev_err firing anyway, perhaps its sufficient?
dev_err!(pdev, "Failed to obtain GSP static info ({:?})\n", e)
thanks,
--
Joel Fernandes