diff options
author | Rob Clark <robdclark@chromium.org> | 2022-06-30 00:19:16 +0300 |
---|---|---|
committer | Rob Clark <robdclark@chromium.org> | 2022-07-07 04:54:41 +0300 |
commit | 18514c3848cf86f3e2843c9cfc218c8471a1984e (patch) | |
tree | c4b454eefbd55c2a9b7a4e48057d388b66795fa3 /drivers/gpu/drm/msm/msm_gpu.c | |
parent | cc66a42c94b11b4a92068a730773283a28937571 (diff) | |
download | linux-18514c3848cf86f3e2843c9cfc218c8471a1984e.tar.xz |
drm/msm/gpu: Add GEM debug label to devcore
When trying to understand an iova fault devcore, once you figure out
which buffer we accessed beyond the end of, it is useful to see the
buffer's debug label.
Signed-off-by: Rob Clark <robdclark@chromium.org>
Patchwork: https://patchwork.freedesktop.org/patch/491910/
Link: https://lore.kernel.org/r/20220629211919.563585-3-robdclark@gmail.com
Diffstat (limited to 'drivers/gpu/drm/msm/msm_gpu.c')
-rw-r--r-- | drivers/gpu/drm/msm/msm_gpu.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/gpu/drm/msm/msm_gpu.c b/drivers/gpu/drm/msm/msm_gpu.c index 3314a137be3b..e1ee85025b67 100644 --- a/drivers/gpu/drm/msm/msm_gpu.c +++ b/drivers/gpu/drm/msm/msm_gpu.c @@ -229,6 +229,10 @@ static void msm_gpu_crashstate_get_bo(struct msm_gpu_state *state, state_bo->size = obj->base.size; state_bo->iova = iova; + BUILD_BUG_ON(sizeof(state_bo->name) != sizeof(obj->name)); + + memcpy(state_bo->name, obj->name, sizeof(state_bo->name)); + if (full) { void *ptr; |