Re: [RFC 4/7] gpu: nova-core: populate GSP_VF_INFO when vGPU is enabled
From: Zhi Wang
Date: Tue Dec 09 2025 - 08:56:01 EST
On Sat, 6 Dec 2025 21:32:51 -0500
Joel Fernandes <joelagnelf@xxxxxxxxxx> wrote:
> Hi Zhi,
>
> On 12/6/2025 7:42 AM, Zhi Wang wrote:
snip
==
> > 0x00000004); +
> > + let val = bar.read32(0x88000 + 0xbfc);
> > + info.b64bitBar2 = u8::from((val & 0x00000006) ==
> > 0x00000004);
>
> Please no magic numbers, please use proper named constants with
> documentation comments explaining the values.
>
> Also BAR reads here need proper register macro definitions/access.
>
That is true. :) But this is because there is no register definition in
the OpenRM code/non OpenRM code as well. I have no idea about the name
and bit definitions of this register.
Suppose I will have to find some clues from some folks then document
them here when going to patches request for merged. :)
> Also the above code is lacking in comments. All the steps above need
> proper comments IMO.
>
> General philosophy of Nova is it is a well documented, cleanly
> written driver with minimal/no magic numbers and abundant comments. :)
>
Agree. :)
> Thanks.
>