]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
gpu: nova-core: register: add missing doccomments for fixed registers I/O accessors
authorAlexandre Courbot <acourbot@nvidia.com>
Fri, 18 Jul 2025 07:26:14 +0000 (16:26 +0900)
committerAlexandre Courbot <acourbot@nvidia.com>
Fri, 15 Aug 2025 03:02:55 +0000 (12:02 +0900)
Add the missing doccomments for these accessors, as having a bit of
inline documentation is always helpful.

Reviewed-by: Daniel Almeida <daniel.almeida@collabora.com>
Reviewed-by: Lyude Paul <lyude@redhat.com>
Link: https://lore.kernel.org/r/20250718-nova-regs-v2-9-7b6a762aa1cd@nvidia.com
Signed-off-by: Alexandre Courbot <acourbot@nvidia.com>
drivers/gpu/nova-core/regs/macros.rs

index 5b3a320de1d3fee7e317af8955d27fa0b3a34f89..d5ce7cb67f21883b20097b7562613fb0d65dedd9 100644 (file)
@@ -300,6 +300,7 @@ macro_rules! register {
         impl $name {
             pub(crate) const OFFSET: usize = $offset;
 
+            /// Read the register from its address in `io`.
             #[inline]
             pub(crate) fn read<const SIZE: usize, T>(io: &T) -> Self where
                 T: ::core::ops::Deref<Target = ::kernel::io::Io<SIZE>>,
@@ -307,6 +308,7 @@ macro_rules! register {
                 Self(io.read32($offset))
             }
 
+            /// Write the value contained in `self` to the register address in `io`.
             #[inline]
             pub(crate) fn write<const SIZE: usize, T>(self, io: &T) where
                 T: ::core::ops::Deref<Target = ::kernel::io::Io<SIZE>>,
@@ -314,6 +316,8 @@ macro_rules! register {
                 io.write32(self.0, $offset)
             }
 
+            /// Read the register from its address in `io` and run `f` on its value to obtain a new
+            /// value to write back.
             #[inline]
             pub(crate) fn alter<const SIZE: usize, T, F>(
                 io: &T,