diff options
| author | Alexandre Courbot <acourbot@nvidia.com> | 2025-07-18 16:26:14 +0900 |
|---|---|---|
| committer | Alexandre Courbot <acourbot@nvidia.com> | 2025-08-15 12:02:55 +0900 |
| commit | 9b2379f02423801d372bc588d38b62a1fa6cd05f (patch) | |
| tree | cdf2d4664d3b4c66d6189b66694c70e13e1a3cb0 /drivers/gpu/nova-core | |
| parent | gpu: nova-core: register: fix documentation and indentation (diff) | |
| download | linux-9b2379f02423801d372bc588d38b62a1fa6cd05f.tar.gz linux-9b2379f02423801d372bc588d38b62a1fa6cd05f.zip | |
gpu: nova-core: register: add missing doccomments for fixed registers I/O accessors
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>
Diffstat (limited to 'drivers/gpu/nova-core')
| -rw-r--r-- | drivers/gpu/nova-core/regs/macros.rs | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/gpu/nova-core/regs/macros.rs b/drivers/gpu/nova-core/regs/macros.rs index 5b3a320de1d3..d5ce7cb67f21 100644 --- a/drivers/gpu/nova-core/regs/macros.rs +++ b/drivers/gpu/nova-core/regs/macros.rs @@ -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, |
