[PATCH 0/1] rust: firmware: the firmware upload abstraction
From: Mike Lothian
Date: Wed Aug 26 2026 - 12:53:06 EST
request_firmware() covers "pull an image from /lib/firmware".
firmware_upload_register() covers the other half: userspace hands the driver an
image to write. It publishes /sys/class/firmware/<name>/ with the loading and
data handshake plus status, error, remaining_size and cancel, and is what a
driver uses when an image has to be written on demand rather than only when a
newer one happens to be on disk
This adds an Upload trait mirroring struct fw_upload_ops, a Registration that
unregisters on drop, and an Error enum whose values are the fw_upload_err codes
userspace already reads back out of the error attribute
rust: firmware: add request_into_buf() reached drm-rust-next this cycle and is
not a duplicate of this: that is the pull direction, and upstream still has no
binding for the push one
The consumer is the DisplayLink driver at the end of the chain, which writes
dock firmware over DFU. This has not been posted before, so it goes out
unversioned even though that driver is on its third round
The rest of the posting, which is one series per subsystem:
rust-core, 9 patches, rust-for-linux and linux-kernel
https://lore.kernel.org/r/20260826162851.2497-1-mike@xxxxxxxxxxxxxx
rust-crypto, 2 patches, linux-crypto and rust-for-linux
https://lore.kernel.org/r/20260826163004.3365-1-mike@xxxxxxxxxxxxxx
rust-usb, 5 patches, linux-usb and rust-for-linux
https://lore.kernel.org/r/20260826163101.4168-1-mike@xxxxxxxxxxxxxx
rust-drm, 23 patches, dri-devel and rust-for-linux
https://lore.kernel.org/r/20260826163359.4998-1-mike@xxxxxxxxxxxxxx
rust-firmware, 1 patch, this one
drm-vino, 13 patches, to dri-devel, not sent yet
Vino is the user for all of them. The abstractions themselves are generic and
carry no knowledge of DisplayLink
The whole thing is one branch, base and prerequisites included, which is the
quickest way to read it:
git clone -b vino-v3 https://github.com/FireBurn/linux
cd linux
make LLVM=1 rustavailable
make LLVM=1 -j$(nproc)
make LLVM=1 -j$(nproc) modules
CONFIG_RUST=y and CONFIG_DRM_VINO=m are the two to set; DRM_VINO selects the
rest of what it needs
It is the exact tree these patches were generated from, at 4c9ba407018e, the
drm-rust-next tip of 2026-08-06. drm-next has moved on since, and this follows
drm-rust-next deliberately: the KMS layer underneath this work lives only there,
and that tree picks up drm-next on its own schedule
Two commits on the branch are not in any of the series above, because they
enable no part of Vino: a scheduler call site that stops compiling under the
locking-guard series, and the Kms associated type Tyr needs once the KMS
registration trait requires one
It applies to the base above on its own, with no unmerged work under it, so it
can be taken without waiting for anything else here
The reference branch also carries Boqun Feng's counted interrupt disabling
series, which SpinLockIrq needs. One patch of it is already in tip locking/core
as e901c1510e24
These patches were written with the assistance of Claude (Anthropic), used
through Claude Code as an interactive coding assistant, across the design, the
implementation and the tests. Every patch it contributed to carries an
Assisted-by trailer. The Signed-off-by is mine: I have reviewed and tested what
is here and I stand behind it
Mike Lothian (1):
rust: firmware: add the firmware upload abstraction
1 file changed, 237 insertions(+), 0 deletions(-)
base-commit: 4c9ba407018e8deb06dbc643112bac8f40404f95