Higher-Ranked Lifetime Types for Rust device drivers
Replace drvdata() with registration data on the auxiliary bus. Private
data is now scoped to the registration object, removing the ordering
constraints and lifetime complications that came with drvdata().
Add Higher-Ranked Lifetime Types (HRT) so driver structs can borrow
device resources like pci::Bar and IoMem directly, tied to the device
binding scope. This removes the need for Devres indirection and
ARef<Device> in most driver code.
This is a stable tag for other trees to merge.
Signed-off-by: Danilo Krummrich <dakr@kernel.org>
use crate::{
file::TyrDrmFileData,
- gem::TyrObject,
+ gem::BoData,
gpu,
gpu::GpuInfo,
- regs, //
+ regs::gpu_control::*, //
};
- pub(crate) type IoMem = kernel::io::mem::IoMem<SZ_2M>;
+ pub(crate) type IoMem = kernel::io::mem::IoMem<'static, SZ_2M>;
pub(crate) struct TyrDrmDriver;