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

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 <treding@nvidia.com>

+7 -10
+7 -10
drivers/gpu/host1x/hw/debug_hw.c
··· 180 180 u32 val = *(map_addr + offset / 4 + i); 181 181 182 182 if (!data_count) { 183 - host1x_debug_output(o, "%pad: %08x: ", &addr, val); 183 + host1x_debug_output(o, " %pad: %08x: ", &addr, val); 184 184 data_count = show_channel_command(o, val, &payload); 185 185 } else { 186 186 host1x_debug_cont(o, "%08x%s", val, ··· 195 195 struct push_buffer *pb = &cdma->push_buffer; 196 196 struct host1x_job *job; 197 197 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 - 203 198 list_for_each_entry(job, &cdma->sync_queue, list) { 204 199 unsigned int i; 205 200 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, 209 203 job->num_slots, job->num_unpins); 204 + 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); 210 207 211 208 for (i = 0; i < job->num_cmds; i++) { 212 209 struct host1x_job_gather *g; ··· 224 227 continue; 225 228 } 226 229 227 - host1x_debug_output(o, " GATHER at %pad+%#x, %d words\n", 230 + host1x_debug_output(o, " GATHER at %pad+%#x, %d words\n", 228 231 &g->base, g->offset, g->words); 229 232 230 233 show_gather(o, g->base + g->offset, g->words, cdma,