Commit c1c79e3b authored by Alexandre Courbot's avatar Alexandre Courbot
Browse files

gpu: nova-core: fb: use dma::CoherentHandle



Replace the nova-core local `DmaObject` with a `CoherentHandle` that can
fulfill the same role.

Reviewed-by: default avatarDanilo Krummrich <dakr@kernel.org>
Link: https://patch.msgid.link/20260327-b4-nova-dma-removal-v2-5-616e1d0b5cb3@nvidia.com


Signed-off-by: default avatarAlexandre Courbot <acourbot@nvidia.com>
parent a8883150
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -7,6 +7,7 @@

use kernel::{
    device,
    dma::CoherentHandle,
    fmt,
    io::Io,
    prelude::*,
@@ -19,7 +20,6 @@
};

use crate::{
    dma::DmaObject,
    driver::Bar0,
    firmware::gsp::GspFirmware,
    gpu::Chipset,
@@ -53,7 +53,7 @@ pub(crate) struct SysmemFlush {
    chipset: Chipset,
    device: ARef<device::Device>,
    /// Keep the page alive as long as we need it.
    page: DmaObject,
    page: CoherentHandle,
}

impl SysmemFlush {
@@ -63,7 +63,7 @@ pub(crate) fn register(
        bar: &Bar0,
        chipset: Chipset,
    ) -> Result<Self> {
        let page = DmaObject::new(dev, kernel::page::PAGE_SIZE)?;
        let page = CoherentHandle::alloc(dev, kernel::page::PAGE_SIZE, GFP_KERNEL)?;

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