]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
gpu: nova-core: replace ARef<Device> with &'bound Device in SysmemFlush
authorDanilo Krummrich <dakr@kernel.org>
Mon, 25 May 2026 22:58:31 +0000 (00:58 +0200)
committerDanilo Krummrich <dakr@kernel.org>
Fri, 29 May 2026 00:08:41 +0000 (02:08 +0200)
Now that SysmemFlush is lifetime-parameterized, the ARef<Device> is
unnecessary -- a plain &'bound Device reference suffices.

Reviewed-by: Eliot Courtney <ecourtney@nvidia.com>
Reviewed-by: Alexandre Courbot <acourbot@nvidia.com>
Tested-by: Alexandre Courbot <acourbot@nvidia.com>
Link: https://patch.msgid.link/20260525225838.276108-4-dakr@kernel.org
Signed-off-by: Danilo Krummrich <dakr@kernel.org>
drivers/gpu/nova-core/fb.rs

index 3b3271790cc97cf12ec167181cba5fa8ca59ba39..1fb65d4eb290f9508b3220a7f9af6c8a75c80f8f 100644 (file)
@@ -15,8 +15,7 @@ use kernel::{
         Alignable,
         Alignment, //
     },
-    sizes::*,
-    sync::aref::ARef, //
+    sizes::*, //
 };
 
 use crate::{
@@ -46,7 +45,7 @@ mod hal;
 pub(crate) struct SysmemFlush<'sys> {
     /// Chipset we are operating on.
     chipset: Chipset,
-    device: ARef<device::Device>,
+    device: &'sys device::Device,
     bar: &'sys Bar0,
     /// Keep the page alive as long as we need it.
     page: CoherentHandle,
@@ -55,7 +54,7 @@ pub(crate) struct SysmemFlush<'sys> {
 impl<'sys> SysmemFlush<'sys> {
     /// Allocate a memory page and register it as the sysmem flush page.
     pub(crate) fn register(
-        dev: &device::Device<device::Bound>,
+        dev: &'sys device::Device<device::Bound>,
         bar: &'sys Bar0,
         chipset: Chipset,
     ) -> Result<Self> {
@@ -65,7 +64,7 @@ impl<'sys> SysmemFlush<'sys> {
 
         Ok(Self {
             chipset,
-            device: dev.into(),
+            device: dev,
             bar,
             page,
         })