[PATCH v6 03/24] rust: dma: add dma_handle_with_offset method to CoherentAllocation

Danilo Krummrich dakr at kernel.org
Mon Jun 23 15:50:08 UTC 2025


On Thu, Jun 19, 2025 at 10:23:47PM +0900, Alexandre Courbot wrote:
> Sometimes one may want to obtain a DMA handle starting at a given
> offset. This can be done by adding said offset to the result of
> `dma_handle()`, but doing so on the client side carries the risk that
> the operation will go outside the bounds of the allocation.
> 
> Thus, add a `dma_handle_with_offset` method that adds the desired offset
> after checking that it is still valid.
> 
> Signed-off-by: Alexandre Courbot <acourbot at nvidia.com>

Applied to alloc-next, thanks!


More information about the dri-devel mailing list