diff options
author | Rob Clark <robdclark@chromium.org> | 2020-02-18 13:20:12 -0800 |
---|---|---|
committer | Rob Clark <robdclark@chromium.org> | 2020-03-19 12:18:44 -0700 |
commit | e515af8d4a6f18f96c360724568a7497868101a8 (patch) | |
tree | 55bf3f0158d9d095d16219751d72a52f02af1077 /drivers/gpu/drm/msm/msm_gem.h | |
parent | 0478b4fc5f37f4d494245fe7bcce3f531cf380e9 (diff) | |
download | linux-e515af8d4a6f18f96c360724568a7497868101a8.tar.gz linux-e515af8d4a6f18f96c360724568a7497868101a8.tar.bz2 linux-e515af8d4a6f18f96c360724568a7497868101a8.zip |
drm/msm: devcoredump should dump MSM_SUBMIT_BO_DUMP buffers
Also log buffers with the DUMP flag set, to ensure we capture all useful
cmdstream in crashdump state with modern mesa.
Otherwise we miss out on the contents of "state object" cmdstream
buffers.
v2: add missing 'inline'
Signed-off-by: Rob Clark <robdclark@chromium.org>
Reviewed-by: Jordan Crouse <jcrouse@codeaurora.org>
Diffstat (limited to 'drivers/gpu/drm/msm/msm_gem.h')
-rw-r--r-- | drivers/gpu/drm/msm/msm_gem.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/drivers/gpu/drm/msm/msm_gem.h b/drivers/gpu/drm/msm/msm_gem.h index 37aa556c5f92..30584eaf8cc8 100644 --- a/drivers/gpu/drm/msm/msm_gem.h +++ b/drivers/gpu/drm/msm/msm_gem.h @@ -160,4 +160,14 @@ struct msm_gem_submit { } bos[]; }; +/* helper to determine of a buffer in submit should be dumped, used for both + * devcoredump and debugfs cmdstream dumping: + */ +static inline bool +should_dump(struct msm_gem_submit *submit, int idx) +{ + extern bool rd_full; + return rd_full || (submit->bos[idx].flags & MSM_SUBMIT_BO_DUMP); +} + #endif /* __MSM_GEM_H__ */ |