> On 11 Mar 2026, at 20:04, Deborah Brouwer <[email protected]>
> wrote:
>
> Now that Tyr uses the register! macro, it no longer needs to define a
> custom register struct or read/write functions, so delete them.
>
> Co-developed-by: Daniel Almeida <[email protected]>
> Signed-off-by: Daniel Almeida <[email protected]>
> Signed-off-by: Deborah Brouwer <[email protected]>
> ---
> drivers/gpu/drm/tyr/regs.rs | 33 ---------------------------------
> 1 file changed, 33 deletions(-)
>
> diff --git a/drivers/gpu/drm/tyr/regs.rs b/drivers/gpu/drm/tyr/regs.rs
> index
> 6c16a041ab3c36f8aaf785487ad61925be65a026..3fc5101c2dcd5d892abc726ea07d75d8f22b5d23
> 100644
> --- a/drivers/gpu/drm/tyr/regs.rs
> +++ b/drivers/gpu/drm/tyr/regs.rs
> @@ -27,39 +27,6 @@
> // does.
> #![allow(dead_code)]
>
> -use kernel::{
> - device::{
> - Bound,
> - Device, //
> - },
> - devres::Devres,
> - io::Io,
> - prelude::*, //
> -};
> -
> -use crate::driver::IoMem;
> -
> -/// Represents a register in the Register Set
> -///
> -/// TODO: Replace this with the Nova `register!()` macro when it is
> available.
> -/// In particular, this will automatically give us 64bit register reads and
> -/// writes.
> -pub(crate) struct Register<const OFFSET: usize>;
> -
> -impl<const OFFSET: usize> Register<OFFSET> {
> - #[inline]
> - pub(crate) fn read(&self, dev: &Device<Bound>, iomem: &Devres<IoMem>) ->
> Result<u32> {
> - let value = (*iomem).access(dev)?.read32(OFFSET);
> - Ok(value)
> - }
> -
> - #[inline]
> - pub(crate) fn write(&self, dev: &Device<Bound>, iomem: &Devres<IoMem>,
> value: u32) -> Result {
> - (*iomem).access(dev)?.write32(value, OFFSET);
> - Ok(())
> - }
> -}
> -
> /// These registers correspond to the GPU_CONTROL register page.
> /// They are involved in GPU configuration and control.
> pub(super) mod gpu_control {
>
> --
> 2.52.0
>
Ah, much better now. Thanks!
Reviewed-by: Daniel Almeida <[email protected]>