[PATCH 5/7] gpu: nova-core: fb: use dma::Coherent
From: Alexandre Courbot
Date: Sat Mar 21 2026 - 09:40:17 EST
Replace the nova-core local `DmaObject` with a `Coherent` that can
fulfill the same role.
Signed-off-by: Alexandre Courbot <acourbot@xxxxxxxxxx>
---
drivers/gpu/nova-core/fb.rs | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/gpu/nova-core/fb.rs b/drivers/gpu/nova-core/fb.rs
index 6536d0035cb1..ba971a114a06 100644
--- a/drivers/gpu/nova-core/fb.rs
+++ b/drivers/gpu/nova-core/fb.rs
@@ -7,6 +7,7 @@
use kernel::{
device,
+ dma::Coherent,
fmt,
prelude::*,
ptr::{
@@ -18,7 +19,6 @@
};
use crate::{
- dma::DmaObject,
driver::Bar0,
firmware::gsp::GspFirmware,
gpu::Chipset,
@@ -52,7 +52,7 @@ pub(crate) struct SysmemFlush {
chipset: Chipset,
device: ARef<device::Device>,
/// Keep the page alive as long as we need it.
- page: DmaObject,
+ page: Coherent<[u8]>,
}
impl SysmemFlush {
@@ -62,7 +62,7 @@ pub(crate) fn register(
bar: &Bar0,
chipset: Chipset,
) -> Result<Self> {
- let page = DmaObject::new(dev, kernel::page::PAGE_SIZE)?;
+ let page = Coherent::zeroed_slice(dev, kernel::page::PAGE_SIZE, GFP_KERNEL)?;
hal::fb_hal(chipset).write_sysmem_flush_page(bar, page.dma_handle())?;
--
2.53.0