[PATCH 6/7] drm/tyr: store MMIO physical base address
From: Deborah Brouwer
Date: Thu May 07 2026 - 19:34:42 EST
Store the physical base address of the GPU MMIO region in
TyrDrmDeviceData.
This will be used by the Panthor userspace-MMIO mmap path to derive the
physical PFNs inserted into userspace VMAs for USER register page
mappings.
Co-developed-by: Daniel Almeida <daniel.almeida@xxxxxxxxxxxxx>
Signed-off-by: Daniel Almeida <daniel.almeida@xxxxxxxxxxxxx>
Signed-off-by: Deborah Brouwer <deborah.brouwer@xxxxxxxxxxxxx>
---
drivers/gpu/drm/tyr/driver.rs | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/tyr/driver.rs b/drivers/gpu/drm/tyr/driver.rs
index e20a5978eed6..2ba0a22a225b 100644
--- a/drivers/gpu/drm/tyr/driver.rs
+++ b/drivers/gpu/drm/tyr/driver.rs
@@ -19,7 +19,8 @@
drm::ioctl,
io::{
poll,
- Io, //
+ Io,
+ PhysAddr, //
},
new_mutex,
of,
@@ -60,6 +61,9 @@ pub(crate) struct TyrPlatformDriverData {
pub(crate) struct TyrDrmDeviceData {
pub(crate) pdev: ARef<platform::Device>,
+ /// Physical base address of the MMIO region.
+ pub(crate) mmio_phys_addr: PhysAddr,
+
#[pin]
clks: Mutex<Clocks>,
@@ -119,6 +123,7 @@ fn probe(
let mali_regulator = Regulator::<regulator::Enabled>::get(pdev.as_ref(), c"mali")?;
let sram_regulator = Regulator::<regulator::Enabled>::get(pdev.as_ref(), c"sram")?;
+ let mmio_phys_addr = pdev.resource_by_index(0).ok_or(ENODEV)?.start();
let request = pdev.io_request_by_index(0).ok_or(ENODEV)?;
let iomem = Arc::pin_init(request.iomap_sized::<SZ_2M>(), GFP_KERNEL)?;
@@ -140,6 +145,7 @@ fn probe(
let data = try_pin_init!(TyrDrmDeviceData {
pdev: platform.clone(),
+ mmio_phys_addr,
clks <- new_mutex!(Clocks {
core: core_clk,
stacks: stacks_clk,
--
2.53.0