drm/msm/a6xx: Skip snapshotting unused GMU buffers
authorRob Clark <robdclark@chromium.org>
Thu, 13 Oct 2022 22:55:14 +0000 (15:55 -0700)
committerRob Clark <robdclark@chromium.org>
Fri, 14 Oct 2022 16:33:12 +0000 (09:33 -0700)
Some buffers are unused on certain sub-generations of a6xx.  So just
skip them.

Signed-off-by: Rob Clark <robdclark@chromium.org>
Reviewed-by: Chia-I Wu <olvaffe@gmail.com>
Reviewed-by: Akhil P Oommen <quic_akhilpo@quicinc.com>
Patchwork: https://patchwork.freedesktop.org/patch/507013/
Link: https://lore.kernel.org/r/20221013225520.371226-3-robdclark@gmail.com
drivers/gpu/drm/msm/adreno/a6xx_gpu_state.c

index 730355f..b0124d0 100644 (file)
@@ -813,6 +813,9 @@ static struct msm_gpu_state_bo *a6xx_snapshot_gmu_bo(
 {
        struct msm_gpu_state_bo *snapshot;
 
+       if (!bo->size)
+               return NULL;
+
        snapshot = state_kcalloc(a6xx_state, 1, sizeof(*snapshot));
        if (!snapshot)
                return NULL;