Commit 74bb98dd authored by Jon Hunter's avatar Jon Hunter Committed by Thierry Reding

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: default avatarJon Hunter <jonathanh@nvidia.com>
Signed-off-by: default avatarThierry Reding <treding@nvidia.com>
parent 3e9c4584
...@@ -75,7 +75,7 @@ static int show_channel(struct host1x_channel *ch, void *data, bool show_fifo) ...@@ -75,7 +75,7 @@ static int show_channel(struct host1x_channel *ch, void *data, bool show_fifo)
return 0; return 0;
} }
static void show_syncpts(struct host1x *m, struct output *o) static void show_syncpts(struct host1x *m, struct output *o, bool show_all)
{ {
struct list_head *pos; struct list_head *pos;
unsigned int i; unsigned int i;
...@@ -97,7 +97,10 @@ static void show_syncpts(struct host1x *m, struct output *o) ...@@ -97,7 +97,10 @@ static void show_syncpts(struct host1x *m, struct output *o)
waiters++; waiters++;
spin_unlock(&m->syncpt[i].intr.lock); spin_unlock(&m->syncpt[i].intr.lock);
if (!min && !max && !waiters) if (!kref_read(&m->syncpt[i].ref))
continue;
if (!show_all && !min && !max && !waiters)
continue; continue;
host1x_debug_output(o, host1x_debug_output(o,
...@@ -124,7 +127,7 @@ static void show_all(struct host1x *m, struct output *o, bool show_fifo) ...@@ -124,7 +127,7 @@ static void show_all(struct host1x *m, struct output *o, bool show_fifo)
unsigned int i; unsigned int i;
host1x_hw_show_mlocks(m, o); host1x_hw_show_mlocks(m, o);
show_syncpts(m, o); show_syncpts(m, o, true);
host1x_debug_output(o, "---- channels ----\n"); host1x_debug_output(o, "---- channels ----\n");
for (i = 0; i < m->info->nb_channels; ++i) { for (i = 0; i < m->info->nb_channels; ++i) {
...@@ -241,5 +244,5 @@ void host1x_debug_dump_syncpts(struct host1x *host1x) ...@@ -241,5 +244,5 @@ void host1x_debug_dump_syncpts(struct host1x *host1x)
.fn = write_to_printk .fn = write_to_printk
}; };
show_syncpts(host1x, &o); show_syncpts(host1x, &o, false);
} }
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