mirror-linux/drivers/gpu/nova-core
Eliot Courtney a19457958c gpu: nova-core: gsp: add mutex locking to Cmdq
Wrap `Cmdq`'s mutable state in a new struct `CmdqInner` and wrap that in
a Mutex. This lets `Cmdq` methods take &self instead of &mut self, which
lets required commands be sent e.g. while unloading the driver.

The mutex is held over both send and receive in `send_command` to make
sure that it doesn't get the reply of some other command that could have
been sent just beforehand.

Reviewed-by: Zhi Wang <zhiw@nvidia.com>
Tested-by: Zhi Wang <zhiw@nvidia.com>
Signed-off-by: Eliot Courtney <ecourtney@nvidia.com>
Link: https://patch.msgid.link/20260318-cmdq-locking-v5-5-18b37e3f9069@nvidia.com
Signed-off-by: Alexandre Courbot <acourbot@nvidia.com>
2026-03-18 21:53:14 +09:00
..
falcon gpu: nova-core: add PIO support for loading firmware images 2026-03-09 10:39:07 +09:00
fb gpu: nova-core: justify remaining uses of `as` 2025-11-08 08:22:51 +09:00
firmware gpu: nova-core: use the Generic Bootloader to boot FWSEC on Turing 2026-03-09 10:39:13 +09:00
gsp gpu: nova-core: gsp: add mutex locking to Cmdq 2026-03-18 21:53:14 +09:00
regs rust: io: separate generic I/O helpers from MMIO implementation 2026-01-23 21:20:11 +01:00
Kconfig gpu: nova-core: Kconfig: Sort select statements alphabetically 2026-03-01 21:34:59 +09:00
Makefile
bitfield.rs gpu: nova-core: bitfield: remove BitOr implementation 2025-10-25 13:16:31 +09:00
dma.rs gpu: nova-core: Simplify `DmaObject::from_data` in nova-core/dma.rs 2025-11-07 23:10:44 +09:00
driver.rs gpu: nova-core: fix aux device registration for multi-GPU systems 2026-02-24 15:44:51 +01:00
falcon.rs gpu: nova-core: falcon: remove unwarranted safety check in dma_load 2026-03-09 10:39:10 +09:00
fb.rs gpu: nova-core: add FbRange.len() and use it in boot.rs 2026-03-10 20:13:46 +09:00
firmware.rs gpu: nova-core: firmware: fix and explain v2 header offsets computations 2026-03-09 14:29:21 +09:00
gfw.rs gpu: nova-core: apply the one "use" item per line policy 2025-11-07 23:10:44 +09:00
gpu.rs gpu: nova-core: add gen_bootloader firmware to ModInfoBuilder 2026-03-09 10:39:10 +09:00
gsp.rs gpu: nova-core: gsp: make `Cmdq` a pinned type 2026-03-18 21:53:14 +09:00
nova_core.rs gpu: nova-core: use core library's CStr instead of kernel one 2026-02-25 08:17:04 +09:00
num.rs gpu: nova-core: num: add functions to safely convert a const value to a smaller type 2025-11-14 20:25:15 +09:00
regs.rs gpu: nova-core: add PIO support for loading firmware images 2026-03-09 10:39:07 +09:00
sbuffer.rs gpu: nova-core: remove imports available via prelude 2026-01-30 02:42:42 +01:00
vbios.rs Driver core changes for 7.0-rc1 2026-02-11 17:43:59 -08:00