From: Deborah Brouwer <deborah.brouwer@collabora.com>
To: "Daniel Almeida" <daniel.almeida@collabora.com>,
"Alice Ryhl" <aliceryhl@google.com>,
"Danilo Krummrich" <dakr@kernel.org>,
"David Airlie" <airlied@gmail.com>,
"Simona Vetter" <simona@ffwll.ch>,
"Benno Lossin" <lossin@kernel.org>, "Gary Guo" <gary@garyguo.net>,
"Miguel Ojeda" <ojeda@kernel.org>,
"Boqun Feng" <boqun@kernel.org>,
"Björn Roy Baron" <bjorn3_gh@protonmail.com>,
"Andreas Hindborg" <a.hindborg@kernel.org>,
"Trevor Gross" <tmgross@umich.edu>,
"Tamir Duberstein" <tamird@kernel.org>,
"Alexandre Courbot" <acourbot@nvidia.com>,
"Onur Özkan" <work@onurozkan.dev>
Cc: dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org,
rust-for-linux@vger.kernel.org,
Deborah Brouwer <deborah.brouwer@collabora.com>,
laura.nao@collabora.com, samitolvanen@google.com,
lyude@redhat.com, beata.michalska@arm.com,
boris.brezillon@collabora.com, steven.price@arm.com,
alvin.sun@linux.dev
Subject: [PATCH v10 0/7] drm/tyr: firmware loading and MCU boot support
Date: Tue, 28 Jul 2026 11:39:22 -0700 [thread overview]
Message-ID: <20260728-fw-boot-b4-v10-0-9187aefa3f2f@collabora.com> (raw)
This series adds firmware loading and MCU boot support to the Tyr DRM
driver. It includes:
- A parser for the Mali CSF firmware binary format
- A kernel-managed BO type (KernelBo) for internal driver allocations
- GPU virtual memory (VM) integration using drm_gpuvm
- An MMU module and a generic slot manager
- Loading firmware, VM activation, and MCU boot at probe()
It is based on drm-rust-next and also depends on:
[PATCH v3] rust: iommu: add device lifetime to IoPageTable
https://lore.kernel.org/rust-for-linux/20260703-pgtable_lt_b4-v3-1-e738e1f513a4@collabora.com
Signed-off-by: Deborah Brouwer <deborah.brouwer@collabora.com>
---
Changes in v10:
- rename 'bound to 'drm when not used for bus device private data
- check that mapping/unmapping parameters are page aligned
- Link to v9: https://lore.kernel.org/r/20260722-fw-boot-b4-v9-0-8669d2a02590@collabora.com
Changes in v9:
- reuse SlotData when reactivating a slot
- add fn seat to SlotOperations
- don't allocate gpuva for full unmap_range
- add small sleeps instead of busy-wait for hw
- move sparse address space test to constructor
- use infallible pin_init! for registration data
- add fw stop() to disable MCU and call it from drop()
- check page alignment in parser
- validate firmware header and entry bounds
- allow firmware sections with no VM mapping footprint
- clear stale MCU interrupts before boot
- handle various errors and clean up
- remove various unreachable code
- remove trailing newlines from dev_ prints
- Link to v8: https://lore.kernel.org/r/20260721-fw-boot-b4-v8-0-b28f744581c9@collabora.com
Changes in v8:
- kill the vm if firmware does not initialize properly
- write to JOB_IRQ_CLEAR after MCU boots
- check that a mapping request does not run past the end of the GEM buffer
- check that the SG table gave us enough backing memory for our VA
- make the KernelBo gem object field (bo) private and add an accessor
- return unused gpuva from remap()
- always provide three gpuva to unmap() instead of two
- be stricter about interpreting MAIR bits for device and non-cacheable memory
- preserve idle slot data in case subsequent activation fails
- clear evicted slot after eviction in case a subsequent activation fails
- wait for flush and lock commands to complete before proceeding
- rewrite SectionFlags with the register macro
- use the InaBits conversion provided by the register macro
- rename the slot data argument to vm_as_data for clarity
- add various checks for size, shifting, truncating, sparse values, overflow etc.
- return errors instead of panicking from unwrap()
- use dev_* macros for all logging
- Link to v7: https://lore.kernel.org/r/20260713-fw-boot-b4-v7-0-afd8dc1494dd@collabora.com
Changes in v7:
- slot.rs: don't print an error when all slots are busy
- change all allow(dead_code) to expect(dead_code)
- use LockedSeat type alias in VmAsData
- shift the lockaddr_base so it fits properly in LOCKADDR
- replace core::fmt with kernel::fmt
- make SAFETY comments clearer for map/unmap pages
- fix arm 32-bit build failures
- release gpuvm_unique lock before calling deferred_cleanup
- Link to v6: https://lore.kernel.org/r/20260709-fw-boot-b4-v6-0-ca391e1a4108@collabora.com
Changes in v6:
- Move gpu_info from drm::Driver::Data to RegistrationData
and remove drm::Driver::Data entirely.
- Remove the extra drm::Device ARef in TyrPlatformDriverData
since drm::Registration already owns an ARef to the drm::Device.
- Stop storing platform::Device ARef in firmware since it is unused.
- Pass a generic kernel::Device instead of the platform::Device through
firmware to Vm and pagetables since this is all that they need.
- Link to v5: https://lore.kernel.org/r/20260708-fw-boot-b4-v5-0-7792ab68e359@collabora.com
Changes in v5:
- Reduce the scope of this series back to just MCU booting.
- Drop the CSF global interface, job IRQ, wait, and arch timer patches
since they will be sent as subsequent series.
- Add lifetimes to resources and store them in TyrRegistrationData.
- Link to v4: https://lore.kernel.org/r/20260424-b4-fw-boot-v4-v4-0-a5d91050789d@collabora.com
Changes in v4:
New commits:
- drm/tyr: program CSF global interface
- rust: time: add arch_timer_get_rate wrapper
- drm/tyr: add CSF firmware interface support
- drm/tyr: validate presence of CSF shared section
- drm/tyr: wait for global interface readiness
- drm/tyr: add Job IRQ handling
- drm/tyr: add Wait type for GPU events
The existing commits from v3 remain unchanged.
- Link to v3: https://lore.kernel.org/r/20260413-b4-fw-boot-v3-v3-0-b422f3c03885@collabora.com
Changes in v3:
New commits:
- drm/tyr: remove unused device from platform data
- drm/tyr: use shmem GEM object type in TyrDrmDriver
drm/tyr: select required dependencies in Kconfig
- Rename commit since the dependencies are not limited to DRM.
- Select new RUST_DRM_GEM_SHMEM_HELPER instead of DRM_GEM_SHMEM_HELPER.
drm/tyr: set DMA mask using GPU physical address
- Use register macro to read pa_bits instead of separate helper function.
drm/tyr: add MMU module
- Switch MMU code to typed register APIs (TRANSCFG, MEMATTR, STATUS, LOCKADDR, etc.).
- Use MmuCommand enum for MMU commands instead of raw constants.
- Minor cleanups and renaming (MAX_AS, AS_PRESENT handling).
drm/tyr: add GPU virtual memory module
- Extract VA/PA bits via typed MMU_FEATURES register.
- Update the VM code to match the new GPUVM v6 and shmem GEM v10 APIs.
drm/tyr: add a kernel buffer object
- Reject zero-sized KernelBo allocations up front.
drm/tyr: add firmware loading and MCU boot support
- Use typed GPU control registers.
- Pass iomem by Arc into Firmware::new() since we store it eventually.
- Link to v2: https://lore.kernel.org/rust-for-linux/20260302232500.244489-1-deborah.brouwer@collabora.com/
Changes in v2:
- The whole series is rebased on drm-rust-next including v7.0-rc1.
- Each patch has its own changelog.
Link to v1: https://lore.kernel.org/rust-for-linux/20260212013713.304343-1-deborah.brouwer@collabora.com/
---
Boris Brezillon (3):
drm/tyr: add a generic slot manager
drm/tyr: add Memory Management Unit (MMU) support
drm/tyr: add GPU virtual memory (VM) support
Daniel Almeida (1):
drm/tyr: add parser for firmware binary
Deborah Brouwer (3):
drm/tyr: add resources to RegistrationData
drm/tyr: add a kernel buffer object
drm/tyr: add Microcontroller Unit (MCU) booting
drivers/gpu/drm/tyr/Kconfig | 5 +
drivers/gpu/drm/tyr/driver.rs | 68 ++-
drivers/gpu/drm/tyr/file.rs | 11 +-
drivers/gpu/drm/tyr/fw.rs | 321 +++++++++++
drivers/gpu/drm/tyr/fw/parser.rs | 588 +++++++++++++++++++
drivers/gpu/drm/tyr/gem.rs | 134 ++++-
drivers/gpu/drm/tyr/mmu.rs | 120 ++++
drivers/gpu/drm/tyr/mmu/address_space.rs | 511 +++++++++++++++++
drivers/gpu/drm/tyr/regs.rs | 135 ++++-
drivers/gpu/drm/tyr/slot.rs | 404 +++++++++++++
drivers/gpu/drm/tyr/tyr.rs | 4 +
drivers/gpu/drm/tyr/vm.rs | 949 +++++++++++++++++++++++++++++++
12 files changed, 3215 insertions(+), 35 deletions(-)
---
base-commit: 951aa1f4952cbb4e30ace86c99f248f968d56705
change-id: 20260708-fw-boot-b4-f07706a265c7
Best regards,
--
Deborah Brouwer <deborah.brouwer@collabora.com>
next reply other threads:[~2026-07-28 18:40 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-28 18:39 Deborah Brouwer [this message]
2026-07-28 18:39 ` [PATCH v10 1/7] drm/tyr: add resources to RegistrationData Deborah Brouwer
2026-07-28 18:39 ` [PATCH v10 2/7] drm/tyr: add a generic slot manager Deborah Brouwer
2026-07-28 18:39 ` [PATCH v10 3/7] drm/tyr: add Memory Management Unit (MMU) support Deborah Brouwer
2026-07-28 19:31 ` Danilo Krummrich
2026-07-28 20:35 ` Deborah Brouwer
2026-07-28 21:19 ` Danilo Krummrich
2026-07-28 18:39 ` [PATCH v10 4/7] drm/tyr: add GPU virtual memory (VM) support Deborah Brouwer
2026-07-30 14:40 ` Alice Ryhl
2026-07-31 13:09 ` Deborah Brouwer
2026-07-28 18:39 ` [PATCH v10 5/7] drm/tyr: add a kernel buffer object Deborah Brouwer
2026-07-28 18:39 ` [PATCH v10 6/7] drm/tyr: add parser for firmware binary Deborah Brouwer
2026-07-28 18:39 ` [PATCH v10 7/7] drm/tyr: add Microcontroller Unit (MCU) booting Deborah Brouwer
2026-07-31 12:49 ` [PATCH v10 0/7] drm/tyr: firmware loading and MCU boot support Alice Ryhl
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260728-fw-boot-b4-v10-0-9187aefa3f2f@collabora.com \
--to=deborah.brouwer@collabora.com \
--cc=a.hindborg@kernel.org \
--cc=acourbot@nvidia.com \
--cc=airlied@gmail.com \
--cc=aliceryhl@google.com \
--cc=alvin.sun@linux.dev \
--cc=beata.michalska@arm.com \
--cc=bjorn3_gh@protonmail.com \
--cc=boqun@kernel.org \
--cc=boris.brezillon@collabora.com \
--cc=dakr@kernel.org \
--cc=daniel.almeida@collabora.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=gary@garyguo.net \
--cc=laura.nao@collabora.com \
--cc=linux-kernel@vger.kernel.org \
--cc=lossin@kernel.org \
--cc=lyude@redhat.com \
--cc=ojeda@kernel.org \
--cc=rust-for-linux@vger.kernel.org \
--cc=samitolvanen@google.com \
--cc=simona@ffwll.ch \
--cc=steven.price@arm.com \
--cc=tamird@kernel.org \
--cc=tmgross@umich.edu \
--cc=work@onurozkan.dev \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®