Skip to content

Commit eb0c062

Browse files
committed
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 <[email protected]> Reviewed-by: Christoph Hellwig <[email protected]> Tested-by: Jon Hunter <[email protected]> Signed-off-by: Thierry Reding <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected] (cherry picked from commit b4ad4ef) Signed-off-by: Thierry Reding <[email protected]>
1 parent c8347f9 commit eb0c062

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

drivers/gpu/host1x/context.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@ int host1x_memory_context_list_init(struct host1x *host1x)
5858
ctx->dev.parent = host1x->dev;
5959
ctx->dev.release = host1x_memory_context_release;
6060

61+
ctx->dev.dma_parms = &ctx->dma_parms;
6162
dma_set_max_seg_size(&ctx->dev, UINT_MAX);
6263

6364
err = device_add(&ctx->dev);

include/linux/host1x.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -466,6 +466,7 @@ struct host1x_memory_context {
466466
refcount_t ref;
467467
struct pid *owner;
468468

469+
struct device_dma_parameters dma_parms;
469470
struct device dev;
470471
u64 dma_mask;
471472
u32 stream_id;

0 commit comments

Comments
 (0)