linux/drivers/gpu/nova-core
Alexandre Courbot 4c9ba40701 gpu: nova-core: falcon: use I/O projection to check transfer bounds
The DMA transfer routine was computing the start of the DMA area by
taking the address of the coherent allocation, and then adding the
transfer's start offset. It then checked manually that the upper bound
was valid.

Convert this to an I/O projection of the same region, which returns
`ERANGE` if the passed range does not fit within the coherent
allocation. This removes the need to perform arithmetic on DMA addresses
and to explicitly check for the bounds' validity.

Signed-off-by: Alexandre Courbot <acourbot@nvidia.com>
Link: https://patch.msgid.link/20260805-falcon-dma-projections-v2-3-4cc9f3f13ee9@nvidia.com
Signed-off-by: Danilo Krummrich <dakr@kernel.org>
2026-08-06 22:55:58 +02:00
..
falcon gpu: nova-core: wait for RISC-V HALTED on FSP unload 2026-07-23 13:20:49 +09:00
fb gpu: nova-core: return non-WPR heap size as u64 from HALs 2026-08-05 14:20:37 +09:00
firmware rust: dma: rename dma_handle to dma_address 2026-08-06 22:54:39 +02:00
fsp gpu: nova-core: correct FRTS vidmem offset calculation 2026-08-05 14:20:36 +09:00
gpu gpu: nova-core: move lifetime to Bar0 2026-06-03 22:10:51 +02:00
gsp rust: dma: rename dma_handle to dma_address 2026-08-06 22:54:39 +02:00
vgpu gpu: nova-core: detect and store vGPU state 2026-07-24 01:15:52 +02:00
.gitignore gpu: nova-core: export Rust symbols for nova-drm 2026-06-29 11:28:38 +02:00
driver.rs gpu: nova-core: move lifetime to Bar0 2026-06-03 22:10:51 +02:00
falcon.rs gpu: nova-core: falcon: use I/O projection to check transfer bounds 2026-08-06 22:55:58 +02:00
fb.rs rust: dma: rename dma_handle to dma_address 2026-08-06 22:54:39 +02:00
firmware.rs gpu: nova-core: update firmware module info for TLV images 2026-08-06 01:54:12 +02:00
fsp.rs rust: dma: rename dma_handle to dma_address 2026-08-06 22:54:39 +02:00
gpu.rs gpu: nova-core: detect and store vGPU state 2026-07-24 01:15:52 +02:00
gsp.rs rust: dma: rename dma_handle to dma_address 2026-08-06 22:54:39 +02:00
Kconfig gpu: nova: Use module names consistently 2026-05-09 23:51:49 +02:00
Makefile gpu: nova: fix rust-analyzer generation 2026-07-03 23:27:39 +02:00
mctp.rs gpu: nova-core: read vGPU mode from FSP via PRC protocol 2026-07-24 01:15:43 +02:00
nova_core_exports.c gpu: nova-core: export Rust symbols for nova-drm 2026-06-29 11:28:38 +02:00
nova_core.rs gpu: nova-core: detect and store vGPU state 2026-07-24 01:15:52 +02:00
num.rs rust: make build_assert module the home of related macros 2026-06-10 09:07:13 +02:00
regs.rs gpu: nova-core: Move one PBUS register definition 2026-07-30 13:01:13 +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: parse structs via zerocopy 2026-06-30 22:40:42 +09:00
vgpu.rs gpu: nova-core: reserve vGPU WPR2 heap 2026-07-24 01:16:02 +02:00