]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
drm/msm/a6xx: Fix dumping A650+ debugbus blocks
authorConnor Abbott <cwabbott0@gmail.com>
Wed, 25 Mar 2026 20:58:37 +0000 (16:58 -0400)
committerRob Clark <robin.clark@oss.qualcomm.com>
Tue, 31 Mar 2026 20:47:28 +0000 (13:47 -0700)
These should be appended after the existing debugbus blocks, instead of
replacing them.

Fixes: 1e05bba5e2b8 ("drm/msm/a6xx: Update a6xx gpu coredump")
Signed-off-by: Connor Abbott <cwabbott0@gmail.com>
Patchwork: https://patchwork.freedesktop.org/patch/714270/
Message-ID: <20260325-drm-msm-a650-debugbus-v1-1-dfbf358890a7@gmail.com>
Signed-off-by: Rob Clark <robin.clark@oss.qualcomm.com>
drivers/gpu/drm/msm/adreno/a6xx_gpu_state.c

index f7598d0c397588ed9a0b5581ca9dd93bb099aabf..6e4950d513b318208dbf6faad7ffd010e0e29618 100644 (file)
@@ -361,7 +361,7 @@ static void a6xx_get_debugbus_blocks(struct msm_gpu *gpu,
                        sizeof(*a6xx_state->debugbus));
 
        if (a6xx_state->debugbus) {
-               int i;
+               int i, j;
 
                for (i = 0; i < ARRAY_SIZE(a6xx_debugbus_blocks); i++)
                        a6xx_get_debugbus_block(gpu,
@@ -369,8 +369,6 @@ static void a6xx_get_debugbus_blocks(struct msm_gpu *gpu,
                                &a6xx_debugbus_blocks[i],
                                &a6xx_state->debugbus[i]);
 
-               a6xx_state->nr_debugbus = ARRAY_SIZE(a6xx_debugbus_blocks);
-
                /*
                 * GBIF has same debugbus as of other GPU blocks, fall back to
                 * default path if GPU uses GBIF, also GBIF uses exactly same
@@ -381,17 +379,19 @@ static void a6xx_get_debugbus_blocks(struct msm_gpu *gpu,
                                &a6xx_gbif_debugbus_block,
                                &a6xx_state->debugbus[i]);
 
-                       a6xx_state->nr_debugbus += 1;
+                       i++;
                }
 
 
                if (adreno_is_a650_family(to_adreno_gpu(gpu))) {
-                       for (i = 0; i < ARRAY_SIZE(a650_debugbus_blocks); i++)
+                       for (j = 0; j < ARRAY_SIZE(a650_debugbus_blocks); i++, j++)
                                a6xx_get_debugbus_block(gpu,
                                        a6xx_state,
-                                       &a650_debugbus_blocks[i],
+                                       &a650_debugbus_blocks[j],
                                        &a6xx_state->debugbus[i]);
                }
+
+               a6xx_state->nr_debugbus = i;
        }
 }