From: "Gary Guo" <gary@garyguo.net>
To: "Daniel Almeida" <daniel.almeida@collabora.com>,
"Gary Guo" <gary@garyguo.net>
Cc: "Dirk Behme" <dirk.behme@gmail.com>,
"Danilo Krummrich" <dakr@kernel.org>,
"Alice Ryhl" <aliceryhl@google.com>,
"Maarten Lankhorst" <maarten.lankhorst@linux.intel.com>,
"Maxime Ripard" <mripard@kernel.org>,
"Thomas Zimmermann" <tzimmermann@suse.de>,
"David Airlie" <airlied@gmail.com>,
"Simona Vetter" <simona@ffwll.ch>,
"Miguel Ojeda" <ojeda@kernel.org>,
"Boqun Feng" <boqun.feng@gmail.com>,
"Björn Roy Baron" <bjorn3_gh@protonmail.com>,
"Benno Lossin" <lossin@kernel.org>,
"Andreas Hindborg" <a.hindborg@kernel.org>,
"Trevor Gross" <tmgross@umich.edu>,
"Steven Price" <steven.price@arm.com>,
dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org,
rust-for-linux@vger.kernel.org
Subject: Re: [PATCH] rust/drm: tyr: Convert to the register!() macro
Date: Fri, 16 Jan 2026 13:53:10 +0000 [thread overview]
Message-ID: <DFQ2B06J0U0T.M8K7D98WCZYI@garyguo.net> (raw)
In-Reply-To: <25EE982E-B03D-4C50-B973-34AC4FFA96B6@collabora.com>
On Fri Jan 16, 2026 at 1:38 PM GMT, Daniel Almeida wrote:
>
>>>>
>>>> Is there any reason why you replace the UPPERCASE register names with
>>>> CamelCase ones?
>>>>
>>>> I was under the impression that we want to use UPPERCASE for register
>>>> names. Like in nova
>>>>
>>>> https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/drivers/gpu/nova-core/regs.rs
>>>
>>> Not really. UPPERCASE for non-const items will trigger the linter. The Nova
>>> people chose to #[allow] this to align with OpenRM and, IIRC from the LPC
>>> discussions, their registers are automatically generated from some internal
>>> docs.
>>>
>>> We have only a few, we can simply convert them to CamelCase.
>>
>> Frankly, register names do look nicer in UPPER_CASE, especially that they're in
>> many cases, packed with acronyms.
>>
>> Best,
>> Gary
>>
>
> I don’t have an opinion here, to be honest. I think CamelCase does make it
> easier on the eyes since our register names look quite simple,
You're on the lucky side! Most hardware don't enjoy that, especially if
you want to match register names with the ones documented on the datasheet.
> specially when
> compared to Nova. However, I can switch to UPPER_CASE and add an
> #![allow(non_camel_case_types)] if more people chime in.
I wonder if we should just such allow `non_camel_case_types` to the register
macro? I don't have an opinion on whether we want to enforce using UPPER_CASE,
but at least I think we should allow it.
Best,
Gary
next prev parent reply other threads:[~2026-01-16 13:53 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-01-14 22:53 Daniel Almeida
2026-01-15 10:35 ` Steven Price
2026-01-16 12:12 ` Daniel Almeida
2026-01-15 17:05 ` Dirk Behme
2026-01-16 7:10 ` Dirk Behme
2026-01-16 12:26 ` Daniel Almeida
2026-01-16 14:56 ` Danilo Krummrich
2026-01-16 15:19 ` Alexandre Courbot
2026-01-16 15:25 ` Danilo Krummrich
2026-01-16 12:23 ` Daniel Almeida
2026-01-16 13:00 ` Gary Guo
2026-01-16 13:38 ` Daniel Almeida
2026-01-16 13:53 ` Gary Guo [this message]
2026-01-16 13:58 ` Danilo Krummrich
2026-01-16 13:00 ` Dirk Behme
2026-01-16 13:59 ` Daniel Almeida
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=DFQ2B06J0U0T.M8K7D98WCZYI@garyguo.net \
--to=gary@garyguo.net \
--cc=a.hindborg@kernel.org \
--cc=airlied@gmail.com \
--cc=aliceryhl@google.com \
--cc=bjorn3_gh@protonmail.com \
--cc=boqun.feng@gmail.com \
--cc=dakr@kernel.org \
--cc=daniel.almeida@collabora.com \
--cc=dirk.behme@gmail.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=linux-kernel@vger.kernel.org \
--cc=lossin@kernel.org \
--cc=maarten.lankhorst@linux.intel.com \
--cc=mripard@kernel.org \
--cc=ojeda@kernel.org \
--cc=rust-for-linux@vger.kernel.org \
--cc=simona@ffwll.ch \
--cc=steven.price@arm.com \
--cc=tmgross@umich.edu \
--cc=tzimmermann@suse.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®