Re: [PATCH v2 12/16] gpu: nova-core: use projection for PFALCON and PFALCON2 registers

John Hubbard <[email protected]>
Newsgroups dev.linux.lists.driver-core,dev.linux.lists.nova-gpu,org.freedesktop.lists.dri-devel,org.kernel.vger.linux-kernel,org.kernel.vger.linux-pci,org.kernel.vger.rust-for-linux
Message-ID <[email protected]>
On 8/12/26 7:48 AM, Alexandre Courbot wrote:
> On Thu Aug 6, 2026 at 1:35 AM JST, Gary Guo wrote:
...
>>       /// Resets DMA-related registers.
>>       pub(crate) fn dma_reset(&self) {
>> -        self.bar.update(regs::NV_PFALCON_FBIF_CTL::of::<E>(), |v| {
>> +        self.pfalcon.update(regs::NV_PFALCON_FBIF_CTL, |v| {
>>               v.with_allow_phys_no_ctx(true)
>>           });
>>   
>> -        self.bar.write(
>> -            WithBase::of::<E>(),
>> -            regs::NV_PFALCON_FALCON_DMACTL::zeroed(),
>> -        );
>> +        self.pfalcon
>> +            .write_reg(regs::NV_PFALCON_FALCON_DMACTL::zeroed());
> 
> Remembering the debates we had over how to address relative registers
> when we ported registers to the new I/O scheme, I guess this new syntax
> which should make everyone happy! :)
> 

What a huge improvement in readability! Yes, very happy
with this.

the "::of::" and the bare "<E>" were always something that
I had to look up. Now they're gone, wooohoo!

thanks,
-- 
John Hubbard
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.