From 98659487b845c05b6bed85d881713545db674c7c Mon Sep 17 00:00:00 2001 From: Abhinav Kumar Date: Fri, 16 Apr 2021 13:57:20 -0700 Subject: drm/msm: add support to take dpu snapshot Add the msm_disp_snapshot module which adds supports to dump dpu registers and capture the drm atomic state which can be used in case of error conditions. changes in v5: - start storing disp_state in msm_kms instead of dpu_kms - get rid of MSM_DISP_SNAPSHOT_IN_* enum by simplifying the functions - move snprintf inside the snapshot core by using varargs - get rid of some stale code comments - allow snapshot module for non-DPU targets Reported-by: kernel test robot Signed-off-by: Abhinav Kumar Reviewed-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/1618606645-19695-3-git-send-email-abhinavk@codeaurora.org Signed-off-by: Rob Clark --- drivers/gpu/drm/msm/msm_kms.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'drivers/gpu/drm/msm/msm_kms.h') diff --git a/drivers/gpu/drm/msm/msm_kms.h b/drivers/gpu/drm/msm/msm_kms.h index d8151a89e163..d84bfdae5238 100644 --- a/drivers/gpu/drm/msm/msm_kms.h +++ b/drivers/gpu/drm/msm/msm_kms.h @@ -152,6 +152,9 @@ struct msm_kms { /* mapper-id used to request GEM buffer mapped for scanout: */ struct msm_gem_address_space *aspace; + /* handle to disp snapshot state */ + struct msm_disp_state *disp_state; + /* * For async commit, where ->flush_commit() and later happens * from the crtc's pending_timer close to end of the frame: -- cgit v1.2.3