mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/chenhuacai/linux-loongson
synced 2025-09-07 14:19:35 +00:00
drm/msm: register a fault handler for display mmu faults
In preparation to register a iommu fault handler for display related modules, register a fault handler for the backing mmu object of msm_kms. Currently, the fault handler only captures the display snapshot but we can expand this later if more information needs to be added to debug display mmu faults. Signed-off-by: Abhinav Kumar <quic_abhinavk@quicinc.com> Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> Signed-off-by: Jessica Zhang <quic_jesszhan@quicinc.com> Patchwork: https://patchwork.freedesktop.org/patch/638359/ Link: https://lore.kernel.org/r/20250219-abhinavk-smmu-fault-handler-v3-1-aa3f0bf4434a@quicinc.com Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
This commit is contained in:
parent
0699018b41
commit
eabba31a83
@ -164,12 +164,23 @@ void msm_crtc_disable_vblank(struct drm_crtc *crtc)
|
|||||||
vblank_ctrl_queue_work(priv, crtc, false);
|
vblank_ctrl_queue_work(priv, crtc, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static int msm_kms_fault_handler(void *arg, unsigned long iova, int flags, void *data)
|
||||||
|
{
|
||||||
|
struct msm_kms *kms = arg;
|
||||||
|
|
||||||
|
msm_disp_snapshot_state(kms->dev);
|
||||||
|
|
||||||
|
return -ENOSYS;
|
||||||
|
}
|
||||||
|
|
||||||
struct msm_gem_address_space *msm_kms_init_aspace(struct drm_device *dev)
|
struct msm_gem_address_space *msm_kms_init_aspace(struct drm_device *dev)
|
||||||
{
|
{
|
||||||
struct msm_gem_address_space *aspace;
|
struct msm_gem_address_space *aspace;
|
||||||
struct msm_mmu *mmu;
|
struct msm_mmu *mmu;
|
||||||
struct device *mdp_dev = dev->dev;
|
struct device *mdp_dev = dev->dev;
|
||||||
struct device *mdss_dev = mdp_dev->parent;
|
struct device *mdss_dev = mdp_dev->parent;
|
||||||
|
struct msm_drm_private *priv = dev->dev_private;
|
||||||
|
struct msm_kms *kms = priv->kms;
|
||||||
struct device *iommu_dev;
|
struct device *iommu_dev;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -197,6 +208,8 @@ struct msm_gem_address_space *msm_kms_init_aspace(struct drm_device *dev)
|
|||||||
mmu->funcs->destroy(mmu);
|
mmu->funcs->destroy(mmu);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
msm_mmu_set_fault_handler(aspace->mmu, kms, msm_kms_fault_handler);
|
||||||
|
|
||||||
return aspace;
|
return aspace;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user