Commit b4ad4ef3 authored by Thierry Reding's avatar Thierry Reding
Browse files

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: default avatarJonathan Hunter <jonathanh@nvidia.com>
Reviewed-by: default avatarChristoph Hellwig <hch@lst.de>
Tested-by: default avatarJon Hunter <jonathanh@nvidia.com>
Signed-off-by: default avatarThierry Reding <treding@nvidia.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20240916133320.368620-1-thierry.reding@gmail.com
parent f70000ef
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -58,6 +58,7 @@ int host1x_memory_context_list_init(struct host1x *host1x)
		ctx->dev.parent = host1x->dev;
		ctx->dev.release = host1x_memory_context_release;

		ctx->dev.dma_parms = &ctx->dma_parms;
		dma_set_max_seg_size(&ctx->dev, UINT_MAX);

		err = device_add(&ctx->dev);
+1 −0
Original line number Diff line number Diff line
@@ -471,6 +471,7 @@ struct host1x_memory_context {
	refcount_t ref;
	struct pid *owner;

	struct device_dma_parameters dma_parms;
	struct device dev;
	u64 dma_mask;
	u32 stream_id;