Commit abdfd18f authored by Rob Clark's avatar Rob Clark

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: default avatarRob Clark <robdclark@chromium.org>
parent c4b0222e
...@@ -298,7 +298,7 @@ void msm_rd_debugfs_cleanup(struct msm_drm_private *priv) ...@@ -298,7 +298,7 @@ void msm_rd_debugfs_cleanup(struct msm_drm_private *priv)
static void snapshot_buf(struct msm_rd_state *rd, static void snapshot_buf(struct msm_rd_state *rd,
struct msm_gem_submit *submit, int idx, struct msm_gem_submit *submit, int idx,
uint64_t iova, uint32_t size) uint64_t iova, uint32_t size, bool full)
{ {
struct msm_gem_object *obj = submit->bos[idx].obj; struct msm_gem_object *obj = submit->bos[idx].obj;
unsigned offset = 0; unsigned offset = 0;
...@@ -318,6 +318,9 @@ static void snapshot_buf(struct msm_rd_state *rd, ...@@ -318,6 +318,9 @@ static void snapshot_buf(struct msm_rd_state *rd,
rd_write_section(rd, RD_GPUADDR, rd_write_section(rd, RD_GPUADDR,
(uint32_t[3]){ iova, size, iova >> 32 }, 12); (uint32_t[3]){ iova, size, iova >> 32 }, 12);
if (!full)
return;
/* But only dump the contents of buffers marked READ */ /* But only dump the contents of buffers marked READ */
if (!(submit->bos[idx].flags & MSM_SUBMIT_BO_READ)) if (!(submit->bos[idx].flags & MSM_SUBMIT_BO_READ))
return; return;
...@@ -381,8 +384,7 @@ void msm_rd_dump_submit(struct msm_rd_state *rd, struct msm_gem_submit *submit, ...@@ -381,8 +384,7 @@ void msm_rd_dump_submit(struct msm_rd_state *rd, struct msm_gem_submit *submit,
rd_write_section(rd, RD_CMD, msg, ALIGN(n, 4)); rd_write_section(rd, RD_CMD, msg, ALIGN(n, 4));
for (i = 0; i < submit->nr_bos; i++) for (i = 0; i < submit->nr_bos; i++)
if (should_dump(submit, i)) snapshot_buf(rd, submit, i, 0, 0, should_dump(submit, i));
snapshot_buf(rd, submit, i, 0, 0);
for (i = 0; i < submit->nr_cmds; i++) { for (i = 0; i < submit->nr_cmds; i++) {
uint32_t szd = submit->cmd[i].size; /* in dwords */ uint32_t szd = submit->cmd[i].size; /* in dwords */
...@@ -390,7 +392,7 @@ void msm_rd_dump_submit(struct msm_rd_state *rd, struct msm_gem_submit *submit, ...@@ -390,7 +392,7 @@ void msm_rd_dump_submit(struct msm_rd_state *rd, struct msm_gem_submit *submit,
/* snapshot cmdstream bo's (if we haven't already): */ /* snapshot cmdstream bo's (if we haven't already): */
if (!should_dump(submit, i)) { if (!should_dump(submit, i)) {
snapshot_buf(rd, submit, submit->cmd[i].idx, snapshot_buf(rd, submit, submit->cmd[i].idx,
submit->cmd[i].iova, szd * 4); submit->cmd[i].iova, szd * 4, true);
} }
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment