summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/host1x/syncpt.c
diff options
context:
space:
mode:
authorTerje Bergstrom <tbergstrom@nvidia.com>2013-03-22 16:34:04 +0200
committerThierry Reding <thierry.reding@avionic-design.de>2013-04-22 12:32:46 +0200
commit6236451d83a720072053855fa63d51934024a707 (patch)
tree8596f5ceee4e8b38804a74895d698a389e5cf6bf /drivers/gpu/host1x/syncpt.c
parent6579324a41cc414009a601738b70a53d6376325c (diff)
downloadblackbird-op-linux-6236451d83a720072053855fa63d51934024a707.tar.gz
blackbird-op-linux-6236451d83a720072053855fa63d51934024a707.zip
gpu: host1x: Add debug support
Add support for host1x debugging. Adds debugfs entries, and dumps channel state to UART in case of stuck job. Signed-off-by: Arto Merilainen <amerilainen@nvidia.com> Signed-off-by: Terje Bergstrom <tbergstrom@nvidia.com> Reviewed-by: Thierry Reding <thierry.reding@avionic-design.de> Tested-by: Thierry Reding <thierry.reding@avionic-design.de> Tested-by: Erik Faye-Lund <kusmabite@gmail.com> Signed-off-by: Thierry Reding <thierry.reding@avionic-design.de>
Diffstat (limited to 'drivers/gpu/host1x/syncpt.c')
-rw-r--r--drivers/gpu/host1x/syncpt.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/gpu/host1x/syncpt.c b/drivers/gpu/host1x/syncpt.c
index 7e77e63da57b..4b493453e805 100644
--- a/drivers/gpu/host1x/syncpt.c
+++ b/drivers/gpu/host1x/syncpt.c
@@ -25,6 +25,7 @@
#include "syncpt.h"
#include "dev.h"
#include "intr.h"
+#include "debug.h"
#define SYNCPT_CHECK_PERIOD (2 * HZ)
#define MAX_STUCK_CHECK_COUNT 15
@@ -231,6 +232,10 @@ int host1x_syncpt_wait(struct host1x_syncpt *sp, u32 thresh, long timeout,
"%s: syncpoint id %d (%s) stuck waiting %d, timeout=%ld\n",
current->comm, sp->id, sp->name,
thresh, timeout);
+
+ host1x_debug_dump_syncpts(sp->host);
+ if (check_count == MAX_STUCK_CHECK_COUNT)
+ host1x_debug_dump(sp->host);
check_count++;
}
}
OpenPOWER on IntegriCloud