Skip to content

Commit 6fe23c5

Browse files
committed
gpu: host1x: Set up device DMA parameters
JIRA: https://issues.redhat.com/browse/RHEL-71795 Upstream Status: eb0c062 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 (cherry picked from commit b4ad4ef) Signed-off-by: Thierry Reding <treding@nvidia.com> Signed-off-by: Marcin Juszkiewicz <mjuszkiewicz@redhat.com>
1 parent eff3326 commit 6fe23c5

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)