Skip to content

Commit c1c79e3

Browse files
committed
gpu: nova-core: fb: use dma::CoherentHandle
Replace the nova-core local `DmaObject` with a `CoherentHandle` that can fulfill the same role. Reviewed-by: Danilo Krummrich <dakr@kernel.org> Link: https://patch.msgid.link/20260327-b4-nova-dma-removal-v2-5-616e1d0b5cb3@nvidia.com Signed-off-by: Alexandre Courbot <acourbot@nvidia.com>
1 parent a888315 commit c1c79e3

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

  • drivers/gpu/nova-core

drivers/gpu/nova-core/fb.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ use core::ops::{
77

88
use kernel::{
99
device,
10+
dma::CoherentHandle,
1011
fmt,
1112
io::Io,
1213
prelude::*,
@@ -19,7 +20,6 @@ use kernel::{
1920
};
2021

2122
use crate::{
22-
dma::DmaObject,
2323
driver::Bar0,
2424
firmware::gsp::GspFirmware,
2525
gpu::Chipset,
@@ -53,7 +53,7 @@ pub(crate) struct SysmemFlush {
5353
chipset: Chipset,
5454
device: ARef<device::Device>,
5555
/// Keep the page alive as long as we need it.
56-
page: DmaObject,
56+
page: CoherentHandle,
5757
}
5858

5959
impl SysmemFlush {
@@ -63,7 +63,7 @@ impl SysmemFlush {
6363
bar: &Bar0,
6464
chipset: Chipset,
6565
) -> Result<Self> {
66-
let page = DmaObject::new(dev, kernel::page::PAGE_SIZE)?;
66+
let page = CoherentHandle::alloc(dev, kernel::page::PAGE_SIZE, GFP_KERNEL)?;
6767

6868
hal::fb_hal(chipset).write_sysmem_flush_page(bar, page.dma_handle())?;
6969

0 commit comments

Comments
 (0)