Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

gpu: host1x: Set up device DMA parameters

In order to store device DMA parameters, the DMA framework depends on
the device's dma_parms field to point at a valid memory location. Add
backing storage for this in struct host1x_memory_context and point to
it.

Reported-by: Jonathan Hunter <jonathanh@nvidia.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Tested-by: Jon Hunter <jonathanh@nvidia.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20240916133320.368620-1-thierry.reding@gmail.com

+2
+1
drivers/gpu/host1x/context.c
··· 58 58 ctx->dev.parent = host1x->dev; 59 59 ctx->dev.release = host1x_memory_context_release; 60 60 61 + ctx->dev.dma_parms = &ctx->dma_parms; 61 62 dma_set_max_seg_size(&ctx->dev, UINT_MAX); 62 63 63 64 err = device_add(&ctx->dev);
+1
include/linux/host1x.h
··· 471 471 refcount_t ref; 472 472 struct pid *owner; 473 473 474 + struct device_dma_parameters dma_parms; 474 475 struct device dev; 475 476 u64 dma_mask; 476 477 u32 stream_id;