diff options
author | Rob Clark <robdclark@gmail.com> | 2016-12-07 11:13:53 -0500 |
---|---|---|
committer | Rob Clark <robdclark@gmail.com> | 2017-02-06 11:28:42 -0500 |
commit | 7f8036b7f6c6aa635b056fb3fe49ba7062982a5b (patch) | |
tree | 977b9e22d619b8cd2438e9b784e0738e9b2211fd /drivers/gpu/drm/msm/msm_iommu.c | |
parent | 720c3bb80235ffb10129ee930bb394871afbd235 (diff) | |
download | op-kernel-dev-7f8036b7f6c6aa635b056fb3fe49ba7062982a5b.zip op-kernel-dev-7f8036b7f6c6aa635b056fb3fe49ba7062982a5b.tar.gz |
drm/msm: let gpu wire up it's own fault handler
Signed-off-by: Rob Clark <robdclark@gmail.com>
Diffstat (limited to 'drivers/gpu/drm/msm/msm_iommu.c')
-rw-r--r-- | drivers/gpu/drm/msm/msm_iommu.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/drivers/gpu/drm/msm/msm_iommu.c b/drivers/gpu/drm/msm/msm_iommu.c index 61aaaa1..7f5779d 100644 --- a/drivers/gpu/drm/msm/msm_iommu.c +++ b/drivers/gpu/drm/msm/msm_iommu.c @@ -24,9 +24,12 @@ struct msm_iommu { }; #define to_msm_iommu(x) container_of(x, struct msm_iommu, base) -static int msm_fault_handler(struct iommu_domain *iommu, struct device *dev, +static int msm_fault_handler(struct iommu_domain *domain, struct device *dev, unsigned long iova, int flags, void *arg) { + struct msm_iommu *iommu = arg; + if (iommu->base.handler) + return iommu->base.handler(iommu->base.arg, iova, flags); pr_warn_ratelimited("*** fault: iova=%08lx, flags=%d\n", iova, flags); return 0; } @@ -136,7 +139,7 @@ struct msm_mmu *msm_iommu_new(struct device *dev, struct iommu_domain *domain) iommu->domain = domain; msm_mmu_init(&iommu->base, dev, &funcs); - iommu_set_fault_handler(domain, msm_fault_handler, dev); + iommu_set_fault_handler(domain, msm_fault_handler, iommu); return &iommu->base; } |