summaryrefslogtreecommitdiff
path: root/include/linux/host1x.h
diff options
context:
space:
mode:
authorMikko Perttunen <mperttunen@nvidia.com>2022-09-07 11:38:42 +0300
committerThierry Reding <treding@nvidia.com>2022-11-25 18:14:19 +0300
commit8935002fc37fce1ad211d98a70f2fd42083c0594 (patch)
tree942af9c580d212eccce15438c06aa035eea6bbb7 /include/linux/host1x.h
parentc2418f911a31a266af4fbaca998dc73d3676475a (diff)
downloadlinux-8935002fc37fce1ad211d98a70f2fd42083c0594.tar.xz
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 'include/linux/host1x.h')
-rw-r--r--include/linux/host1x.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/linux/host1x.h b/include/linux/host1x.h
index cb2100d9b0ff..dc55d9d3b94f 100644
--- a/include/linux/host1x.h
+++ b/include/linux/host1x.h
@@ -469,11 +469,13 @@ struct host1x_memory_context {
#ifdef CONFIG_IOMMU_API
struct host1x_memory_context *host1x_memory_context_alloc(struct host1x *host1x,
+ struct device *dev,
struct pid *pid);
void host1x_memory_context_get(struct host1x_memory_context *cd);
void host1x_memory_context_put(struct host1x_memory_context *cd);
#else
static inline struct host1x_memory_context *host1x_memory_context_alloc(struct host1x *host1x,
+ struct device *dev,
struct pid *pid)
{
return NULL;