Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

drm/msm: always dump buffer base/size

Even if we are not dumping the buffer's contents, it is useful to log
their base address and size. This makes it easier to see when different
gpu pointers point to a single buffer, for example higher mipmap levels
of a single texture.

Signed-off-by: Rob Clark <robdclark@chromium.org>

+6 -4
+6 -4
drivers/gpu/drm/msm/msm_rd.c
··· 298 298 299 299 static void snapshot_buf(struct msm_rd_state *rd, 300 300 struct msm_gem_submit *submit, int idx, 301 - uint64_t iova, uint32_t size) 301 + uint64_t iova, uint32_t size, bool full) 302 302 { 303 303 struct msm_gem_object *obj = submit->bos[idx].obj; 304 304 unsigned offset = 0; ··· 317 317 */ 318 318 rd_write_section(rd, RD_GPUADDR, 319 319 (uint32_t[3]){ iova, size, iova >> 32 }, 12); 320 + 321 + if (!full) 322 + return; 320 323 321 324 /* But only dump the contents of buffers marked READ */ 322 325 if (!(submit->bos[idx].flags & MSM_SUBMIT_BO_READ)) ··· 384 381 rd_write_section(rd, RD_CMD, msg, ALIGN(n, 4)); 385 382 386 383 for (i = 0; i < submit->nr_bos; i++) 387 - if (should_dump(submit, i)) 388 - snapshot_buf(rd, submit, i, 0, 0); 384 + snapshot_buf(rd, submit, i, 0, 0, should_dump(submit, i)); 389 385 390 386 for (i = 0; i < submit->nr_cmds; i++) { 391 387 uint32_t szd = submit->cmd[i].size; /* in dwords */ ··· 392 390 /* snapshot cmdstream bo's (if we haven't already): */ 393 391 if (!should_dump(submit, i)) { 394 392 snapshot_buf(rd, submit, submit->cmd[i].idx, 395 - submit->cmd[i].iova, szd * 4); 393 + submit->cmd[i].iova, szd * 4, true); 396 394 } 397 395 } 398 396