diff options
author | Mikko Perttunen <mperttunen@nvidia.com> | 2022-09-07 11:38:42 +0300 |
---|---|---|
committer | Thierry Reding <treding@nvidia.com> | 2022-11-25 16:14:19 +0100 |
commit | 8935002fc37fce1ad211d98a70f2fd42083c0594 (patch) | |
tree | 942af9c580d212eccce15438c06aa035eea6bbb7 /drivers/gpu/drm/tegra/uapi.c | |
parent | c2418f911a31a266af4fbaca998dc73d3676475a (diff) | |
download | linux-8935002fc37fce1ad211d98a70f2fd42083c0594.tar.bz2 |
gpu: host1x: Select context device based on attached IOMMU
On Tegra234, engines that are programmed through Host1x channels can
be attached to either the NISO0 or NISO1 SMMU. Because of that, when
selecting a context device to use with an engine, we need to select
one that is also attached to the same SMMU.
Add a parameter to host1x_memory_context_alloc to specify which device
we are allocating a context for, and use it to pick an appropriate
context device.
Signed-off-by: Mikko Perttunen <mperttunen@nvidia.com>
[treding@nvidia.com: update !IOMMU_API stub signature]
Signed-off-by: Thierry Reding <treding@nvidia.com>
Diffstat (limited to 'drivers/gpu/drm/tegra/uapi.c')
-rw-r--r-- | drivers/gpu/drm/tegra/uapi.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/gpu/drm/tegra/uapi.c b/drivers/gpu/drm/tegra/uapi.c index a98239cb0e29..5adab6b22916 100644 --- a/drivers/gpu/drm/tegra/uapi.c +++ b/drivers/gpu/drm/tegra/uapi.c @@ -116,7 +116,7 @@ int tegra_drm_ioctl_channel_open(struct drm_device *drm, void *data, struct drm_ if (supported) context->memory_context = host1x_memory_context_alloc( - host, get_task_pid(current, PIDTYPE_TGID)); + host, client->base.dev, get_task_pid(current, PIDTYPE_TGID)); if (IS_ERR(context->memory_context)) { if (PTR_ERR(context->memory_context) != -EOPNOTSUPP) { |