Skip to content
Snippets Groups Projects
Commit 9262a179 authored by Abhinav Kumar's avatar Abhinav Kumar Committed by Dmitry Baryshkov
Browse files

drm/msm/dpu: rate limit snapshot capture for mmu faults


There is no recovery mechanism in place yet to recover from mmu
faults for DPU. We can only prevent the faults by making sure there
is no misconfiguration.

Rate-limit the snapshot capture for mmu faults to once per
msm_atomic_commit_tail() as that should be sufficient to capture
the snapshot for debugging otherwise there will be a lot of DPU
snapshots getting captured for the same fault which is redundant
and also might affect capturing even one snapshot accurately.

Signed-off-by: default avatarAbhinav Kumar <quic_abhinavk@quicinc.com>
Signed-off-by: default avatarJessica Zhang <quic_jesszhan@quicinc.com>
Reviewed-by: default avatarDmitry Baryshkov <dmitry.baryshkov@linaro.org>
Patchwork: https://patchwork.freedesktop.org/patch/638362/
Link: https://lore.kernel.org/r/20250219-abhinavk-smmu-fault-handler-v3-5-aa3f0bf4434a@quicinc.com


Signed-off-by: default avatarDmitry Baryshkov <dmitry.baryshkov@linaro.org>
parent c08c944c
No related branches found
No related tags found
4 merge requests!156drm/msm: display changes for 6.15, first part,!155Draft: testing display pipelines for 6.15,!154Draft: testing display changes for 6.15,!137Draft: drm/msm/hdmi: test HDMI connector conversion
Pipeline #1372912 failed
......@@ -232,6 +232,8 @@ void msm_atomic_commit_tail(struct drm_atomic_state *state)
kms->funcs->wait_flush(kms, crtc_mask);
trace_msm_atomic_wait_flush_finish(crtc_mask);
atomic_set(&kms->fault_snapshot_capture, 0);
/*
* Now that there is no in-progress flush, prepare the
* current update:
......
......@@ -168,7 +168,10 @@ static int msm_kms_fault_handler(void *arg, unsigned long iova, int flags, void
{
struct msm_kms *kms = arg;
msm_disp_snapshot_state(kms->dev);
if (atomic_read(&kms->fault_snapshot_capture) == 0) {
msm_disp_snapshot_state(kms->dev);
atomic_inc(&kms->fault_snapshot_capture);
}
return -ENOSYS;
}
......
......@@ -135,6 +135,9 @@ struct msm_kms {
int irq;
bool irq_requested;
/* rate limit the snapshot capture to once per attach */
atomic_t fault_snapshot_capture;
/* mapper-id used to request GEM buffer mapped for scanout: */
struct msm_gem_address_space *aspace;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment