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_mmu.h | |
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_mmu.h')
-rw-r--r-- | drivers/gpu/drm/msm/msm_mmu.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/drivers/gpu/drm/msm/msm_mmu.h b/drivers/gpu/drm/msm/msm_mmu.h index f85c879..aa2c5d4 100644 --- a/drivers/gpu/drm/msm/msm_mmu.h +++ b/drivers/gpu/drm/msm/msm_mmu.h @@ -33,6 +33,8 @@ struct msm_mmu_funcs { struct msm_mmu { const struct msm_mmu_funcs *funcs; struct device *dev; + int (*handler)(void *arg, unsigned long iova, int flags); + void *arg; }; static inline void msm_mmu_init(struct msm_mmu *mmu, struct device *dev, @@ -45,4 +47,11 @@ static inline void msm_mmu_init(struct msm_mmu *mmu, struct device *dev, struct msm_mmu *msm_iommu_new(struct device *dev, struct iommu_domain *domain); struct msm_mmu *msm_gpummu_new(struct device *dev, struct msm_gpu *gpu); +static inline void msm_mmu_set_fault_handler(struct msm_mmu *mmu, void *arg, + int (*handler)(void *arg, unsigned long iova, int flags)) +{ + mmu->arg = arg; + mmu->handler = handler; +} + #endif /* __MSM_MMU_H__ */ |