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>
This commit is contained in:
Alexandre Courbot
2025-07-18 16:26:14 +09:00
parent e40d2b2616
commit 9b2379f024

View File

@@ -300,6 +300,7 @@ pub(crate) fn [<set_ $field>](mut self, value: $to_type) -> Self {
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 @@ pub(crate) fn read<const SIZE: usize, T>(io: &T) -> Self where
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 @@ pub(crate) fn write<const SIZE: usize, T>(self, io: &T) where
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,