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

gpu: host1x: Show all allocated syncpts via debugfs

When the host1x syncpts status is dumped via the debugfs, syncpts that
have been allocated but not yet used are not shown and so currently it
is not possible to see all the allocated syncpts. Update the path for
dumping the syncpt status via the debugfs to show all allocated syncpts
even if they have not been used yet. Note that when the syncpt status
is dumped by the kernel itself for debugging only the active syncpt are
shown.

Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>

authored by

Jon Hunter and committed by
Thierry Reding
74bb98dd 3e9c4584

+7 -4
+7 -4
drivers/gpu/host1x/debug.c
··· 75 75 return 0; 76 76 } 77 77 78 - static void show_syncpts(struct host1x *m, struct output *o) 78 + static void show_syncpts(struct host1x *m, struct output *o, bool show_all) 79 79 { 80 80 struct list_head *pos; 81 81 unsigned int i; ··· 97 97 waiters++; 98 98 spin_unlock(&m->syncpt[i].intr.lock); 99 99 100 - if (!min && !max && !waiters) 100 + if (!kref_read(&m->syncpt[i].ref)) 101 + continue; 102 + 103 + if (!show_all && !min && !max && !waiters) 101 104 continue; 102 105 103 106 host1x_debug_output(o, ··· 127 124 unsigned int i; 128 125 129 126 host1x_hw_show_mlocks(m, o); 130 - show_syncpts(m, o); 127 + show_syncpts(m, o, true); 131 128 host1x_debug_output(o, "---- channels ----\n"); 132 129 133 130 for (i = 0; i < m->info->nb_channels; ++i) { ··· 244 241 .fn = write_to_printk 245 242 }; 246 243 247 - show_syncpts(host1x, &o); 244 + show_syncpts(host1x, &o, false); 248 245 }