linux/drivers/gpu/nova-core
Danilo Krummrich 8ea0b6d5be rust: pci: make Bar lifetime-parameterized
Convert pci::Bar<SIZE> to pci::Bar<'a, SIZE>, storing &'a Device<Bound>
to tie the BAR mapping lifetime to the device.

iomap_region_sized() now returns Result<Bar<'a, SIZE>> directly instead
of impl PinInit<Devres<Bar<SIZE>>, Error>.

Since the lifetime ties the mapping to the device's bound state, callers
no longer need Devres for the common case where the Bar lives in the
driver's private data.

Add Bar::into_devres() to consume the bar and register it as a
device-managed resource, returning Devres<Bar<'static, SIZE>>. The
lifetime is erased to 'static because Devres guarantees the bar does not
actually outlive the device -- access is revoked on unbind.

Reviewed-by: Eliot Courtney <ecourtney@nvidia.com>
Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Reviewed-by: Alexandre Courbot <acourbot@nvidia.com>
Reviewed-by: Gary Guo <gary@garyguo.net>
Link: https://patch.msgid.link/20260525202921.124698-19-dakr@kernel.org
Signed-off-by: Danilo Krummrich <dakr@kernel.org>
2026-05-27 16:24:23 +02:00
..
falcon gpu: nova-core: convert falcon registers to kernel register macro 2026-03-26 15:09:44 +09:00
fb gpu: nova-core: convert FUSE registers to kernel register macro 2026-03-26 15:08:28 +09:00
firmware gpu: nova-core: firmware: move firmware image parsing code to firmware.rs 2026-03-30 14:01:40 +09:00
gsp drm for v7.1-rc1 2026-04-15 08:45:00 -07:00
bitfield.rs gpu: nova-core: bitfield: fix broken Default implementation 2026-04-05 16:17:18 +02:00
driver.rs rust: pci: make Bar lifetime-parameterized 2026-05-27 16:24:23 +02:00
falcon.rs gpu: nova-core: falcon: pad firmware DMA object size to required block alignment 2026-04-05 16:10:49 +02:00
fb.rs gpu: nova-core: fb: use dma::CoherentHandle 2026-03-28 22:20:08 +09:00
firmware.rs gpu: nova-core: firmware: factor out an elf_str() function 2026-03-30 14:01:53 +09:00
gfw.rs gpu: nova-core: convert GC6 registers to kernel register macro 2026-03-26 15:08:28 +09:00
gpu.rs rust: device: make Core and CoreInternal lifetime-parameterized 2026-05-27 16:22:42 +02:00
gsp.rs gpu: nova-core: use sized array for GSP log buffers 2026-03-27 21:48:23 +01:00
Kconfig gpu: nova-core: Kconfig: Sort select statements alphabetically 2026-03-01 21:34:59 +09:00
Makefile
nova_core.rs gpu: nova-core: firmware: gsp: use dma::Coherent for level0 table 2026-03-28 22:20:08 +09:00
num.rs gpu: nova-core: introduce bounded_enum macro 2026-03-26 15:08:27 +09:00
regs.rs gpu: nova-core: remove io:: qualifier to register macro invocations 2026-03-26 15:10:29 +09:00
sbuffer.rs gpu: nova-core: remove imports available via prelude 2026-01-30 02:42:42 +01:00
vbios.rs gpu: nova-core: vbios: use from_le_bytes() for PCI ROM header parsing 2026-04-05 16:23:43 +02:00