From 3f8caca9e8a5d9b9ebc1fa1e16fefdb20f2e25f9 Mon Sep 17 00:00:00 2001 From: Alex Waterman Date: Thu, 9 Jun 2016 17:06:04 -0700 Subject: 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 Reviewed-on: http://git-master/r/1162689 Reviewed-by: Terje Bergstrom GVS: Gerrit_Virtual_Submit --- drivers/gpu/nvgpu/gk20a/sync_gk20a.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'drivers/gpu/nvgpu') diff --git a/drivers/gpu/nvgpu/gk20a/sync_gk20a.c b/drivers/gpu/nvgpu/gk20a/sync_gk20a.c index d823ef9c..de30eed4 100644 --- a/drivers/gpu/nvgpu/gk20a/sync_gk20a.c +++ b/drivers/gpu/nvgpu/gk20a/sync_gk20a.c @@ -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, -- cgit v1.2.2