diff options
author | Alex Waterman <alexw@nvidia.com> | 2016-04-29 20:03:03 -0400 |
---|---|---|
committer | mobile promotions <svcmobile_promotions@nvidia.com> | 2016-08-30 13:04:30 -0400 |
commit | 9eac0fd84921359ded2acdf920de5592322ad93c (patch) | |
tree | 5d250d475a2dc4629df39cee285a4429660c87f1 /drivers/gpu/nvgpu/gk20a/channel_sync_gk20a.c | |
parent | 0e69c6707b974726459759464bc7876afe894740 (diff) |
gpu: nvgpu: Add debugging to the semaphore code
Add GPU debugging to the semaphore code.
Bug 1732449
JIRA DNVGPU-12
Change-Id: I98466570cf8d234b49a7f85d88c834648ddaaaee
Signed-off-by: Alex Waterman <alexw@nvidia.com>
Reviewed-on: http://git-master/r/1198594
(cherry picked from commit 420809cc31fcdddde32b8e59721676c67b45f592)
Reviewed-on: http://git-master/r/1153671
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Diffstat (limited to 'drivers/gpu/nvgpu/gk20a/channel_sync_gk20a.c')
-rw-r--r-- | drivers/gpu/nvgpu/gk20a/channel_sync_gk20a.c | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/drivers/gpu/nvgpu/gk20a/channel_sync_gk20a.c b/drivers/gpu/nvgpu/gk20a/channel_sync_gk20a.c index 9c8911e9..e4972610 100644 --- a/drivers/gpu/nvgpu/gk20a/channel_sync_gk20a.c +++ b/drivers/gpu/nvgpu/gk20a/channel_sync_gk20a.c | |||
@@ -428,9 +428,12 @@ static void add_sema_cmd(struct gk20a *g, struct channel_gk20a *c, | |||
428 | struct gk20a_semaphore *s, struct priv_cmd_entry *cmd, | 428 | struct gk20a_semaphore *s, struct priv_cmd_entry *cmd, |
429 | int cmd_size, bool acquire, bool wfi) | 429 | int cmd_size, bool acquire, bool wfi) |
430 | { | 430 | { |
431 | u32 off = cmd->off; | 431 | int ch = c->hw_chid; |
432 | u32 ob, off = cmd->off; | ||
432 | u64 va; | 433 | u64 va; |
433 | 434 | ||
435 | ob = off; | ||
436 | |||
434 | /* | 437 | /* |
435 | * RO for acquire (since we just need to read the mem) and RW for | 438 | * RO for acquire (since we just need to read the mem) and RW for |
436 | * release since we will need to write back to the semaphore memory. | 439 | * release since we will need to write back to the semaphore memory. |
@@ -480,6 +483,19 @@ static void add_sema_cmd(struct gk20a *g, struct channel_gk20a *c, | |||
480 | /* ignored */ | 483 | /* ignored */ |
481 | gk20a_mem_wr32(g, cmd->mem, off++, 0); | 484 | gk20a_mem_wr32(g, cmd->mem, off++, 0); |
482 | } | 485 | } |
486 | |||
487 | if (acquire) | ||
488 | gpu_sema_verbose_dbg("(A) c=%d ACQ_GE %-4u owner=%-3d" | ||
489 | "va=0x%llx cmd_mem=0x%llx b=0x%llx off=%u", | ||
490 | ch, gk20a_semaphore_get_value(s), | ||
491 | s->hw_sema->ch->hw_chid, va, cmd->gva, | ||
492 | cmd->mem->gpu_va, ob); | ||
493 | else | ||
494 | gpu_sema_verbose_dbg("(R) c=%d INCR %u (%u) va=0x%llx " | ||
495 | "cmd_mem=0x%llx b=0x%llx off=%u", | ||
496 | ch, gk20a_semaphore_get_value(s), | ||
497 | readl(s->hw_sema->value), va, cmd->gva, | ||
498 | cmd->mem->gpu_va, ob); | ||
483 | } | 499 | } |
484 | 500 | ||
485 | static int gk20a_channel_semaphore_wait_syncpt( | 501 | static int gk20a_channel_semaphore_wait_syncpt( |