diff options
| author | Thierry Reding <treding@nvidia.com> | 2022-11-17 13:36:19 +0100 |
|---|---|---|
| committer | Thierry Reding <treding@nvidia.com> | 2023-01-27 17:41:49 +0100 |
| commit | 9026ba722360ce5fb72ff7bbc445c49dc9a736ac (patch) | |
| tree | f9f68dac140e6e50f61498fc679c21cf497b3468 /drivers/gpu/host1x/context.c | |
| parent | 900cd8f065de8d867bc436c1ba05873dc893f2cb (diff) | |
gpu: host1x: Use tegra_dev_iommu_get_stream_id()
Use the newly implemented tegra_dev_iommu_get_stream_id() helper to
encapsulate and centralize the IOMMU stream ID access.
Signed-off-by: Thierry Reding <treding@nvidia.com>
Diffstat (limited to 'drivers/gpu/host1x/context.c')
| -rw-r--r-- | drivers/gpu/host1x/context.c | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/drivers/gpu/host1x/context.c b/drivers/gpu/host1x/context.c index c8e7994c2c9c..8beedcf080ab 100644 --- a/drivers/gpu/host1x/context.c +++ b/drivers/gpu/host1x/context.c @@ -35,8 +35,6 @@ int host1x_memory_context_list_init(struct host1x *host1x) cdl->len = err / 4; for (i = 0; i < cdl->len; i++) { - struct iommu_fwspec *fwspec; - ctx = &cdl->devs[i]; ctx->host = host1x; @@ -70,14 +68,12 @@ int host1x_memory_context_list_init(struct host1x *host1x) goto del_devices; } - fwspec = dev_iommu_fwspec_get(&ctx->dev); - if (!fwspec || !device_iommu_mapped(&ctx->dev)) { + if (!tegra_dev_iommu_get_stream_id(&ctx->dev, &ctx->stream_id) || + !device_iommu_mapped(&ctx->dev)) { dev_err(host1x->dev, "Context device %d has no IOMMU!\n", i); device_del(&ctx->dev); goto del_devices; } - - ctx->stream_id = fwspec->ids[0] & 0xffff; } return 0; |