gpu: nvgpu: Make the sync_pt_value_str more informative

Add semamphore specific information to the sync_pt_value str when
the underlying primitive for the sync_pt is a semamphore. This is
useful for debugging purposes.

Bug 1732449
JIRA DNVGPU-12

Change-Id: I0dd7d921e39e3245ed1778aad77e20297b55df61
Signed-off-by: Alex Waterman <alexw@nvidia.com>
Reviewed-on: http://git-master/r/1162689
Reviewed-by: Terje Bergstrom <tbergstrom@nvidia.com>
GVS: Gerrit_Virtual_Submit
This commit is contained in:
Alex Waterman
2016-06-09 17:06:04 -07:00
parent d33fb5a964
commit 3f8caca9e8

View File

@@ -433,7 +433,12 @@ static void gk20a_sync_timeline_value_str(struct sync_timeline *timeline,
static void gk20a_sync_pt_value_str_for_sema(struct gk20a_sync_pt *pt,
char *str, int size)
{
snprintf(str, size, "gk20a-sema");
struct gk20a_semaphore *s = pt->sema;
snprintf(str, size, "S: c=%d [v=%u,r_v=%u]",
s->hw_sema->ch->hw_chid,
gk20a_semaphore_get_value(s),
gk20a_semaphore_read(s));
}
static void gk20a_sync_pt_value_str(struct sync_pt *sync_pt, char *str,