Skip to content

Commit afa770f

Browse files
committed
gpu: host1x: debug: Dump only relevant parts of CDMA push buffer
Dumping the full CDMA push buffer takes a long time and isn't very useful since most of the contents are not relevant. Instead only show the CDMA push buffer entries associated with current jobs. While at it, tweak the indentation a bit to make the output more readable. Signed-off-by: Thierry Reding <[email protected]>
1 parent ff41dd2 commit afa770f

File tree

1 file changed

+7
-10
lines changed

1 file changed

+7
-10
lines changed

drivers/gpu/host1x/hw/debug_hw.c

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,7 @@ static void show_gather(struct output *o, dma_addr_t phys_addr,
180180
u32 val = *(map_addr + offset / 4 + i);
181181

182182
if (!data_count) {
183-
host1x_debug_output(o, "%pad: %08x: ", &addr, val);
183+
host1x_debug_output(o, " %pad: %08x: ", &addr, val);
184184
data_count = show_channel_command(o, val, &payload);
185185
} else {
186186
host1x_debug_cont(o, "%08x%s", val,
@@ -195,19 +195,16 @@ static void show_channel_gathers(struct output *o, struct host1x_cdma *cdma)
195195
struct push_buffer *pb = &cdma->push_buffer;
196196
struct host1x_job *job;
197197

198-
host1x_debug_output(o, "PUSHBUF at %pad, %u words\n",
199-
&pb->dma, pb->size / 4);
200-
201-
show_gather(o, pb->dma, pb->size / 4, cdma, pb->dma, pb->mapped);
202-
203198
list_for_each_entry(job, &cdma->sync_queue, list) {
204199
unsigned int i;
205200

206-
host1x_debug_output(o, "\n%p: JOB, syncpt_id=%d, syncpt_val=%d, first_get=%08x, timeout=%d num_slots=%d, num_handles=%d\n",
207-
job, job->syncpt->id, job->syncpt_end,
208-
job->first_get, job->timeout,
201+
host1x_debug_output(o, "JOB, syncpt %u: %u timeout: %u num_slots: %u num_handles: %u\n",
202+
job->syncpt->id, job->syncpt_end, job->timeout,
209203
job->num_slots, job->num_unpins);
210204

205+
show_gather(o, pb->dma + job->first_get, job->num_slots * 2, cdma,
206+
pb->dma + job->first_get, pb->mapped + job->first_get);
207+
211208
for (i = 0; i < job->num_cmds; i++) {
212209
struct host1x_job_gather *g;
213210
u32 *mapped;
@@ -227,7 +224,7 @@ static void show_channel_gathers(struct output *o, struct host1x_cdma *cdma)
227224
continue;
228225
}
229226

230-
host1x_debug_output(o, " GATHER at %pad+%#x, %d words\n",
227+
host1x_debug_output(o, " GATHER at %pad+%#x, %d words\n",
231228
&g->base, g->offset, g->words);
232229

233230
show_gather(o, g->base + g->offset, g->words, cdma,

0 commit comments

Comments
 (0)