summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHareesh Gundu <hareeshg@codeaurora.org>2016-08-18 17:53:30 +0530
committerGerrit - the friendly Code Review server <code-review@localhost>2016-10-06 23:18:46 -0700
commitf5c29ace29f14c2aa5a9a44182f2cc5d91541af9 (patch)
tree1da728999b884159aa175c4704c6aeb6b2e33416
parente9a7b4841897c06e8fe78c70869d81874687a29b (diff)
msm: kgsl: Get GPU snapshot if wait for global timestamp timeout
If the wait for global fails due to timeout then nothing after this point is likely to work very well. Get GPU snapshot in addition to BUG_ON(), to analyze the GPU fault. CRs-Fixed: 1053780 Change-Id: I29930120a72a08533c859002f646af93e67c754f Signed-off-by: Hareesh Gundu <hareeshg@codeaurora.org>
-rw-r--r--drivers/gpu/msm/adreno_drawctxt.c19
1 files changed, 13 insertions, 6 deletions
diff --git a/drivers/gpu/msm/adreno_drawctxt.c b/drivers/gpu/msm/adreno_drawctxt.c
index fb95f6108fb8..d9ebe37d0cf0 100644
--- a/drivers/gpu/msm/adreno_drawctxt.c
+++ b/drivers/gpu/msm/adreno_drawctxt.c
@@ -499,13 +499,20 @@ void adreno_drawctxt_detach(struct kgsl_context *context)
/*
* If the wait for global fails due to timeout then nothing after this
- * point is likely to work very well - BUG_ON() so we can take advantage
- * of the debug tools to figure out what the h - e - double hockey
- * sticks happened. If EAGAIN error is returned then recovery will kick
- * in and there will be no more commands in the RB pipe from this
- * context which is waht we are waiting for, so ignore -EAGAIN error
+ * point is likely to work very well - Get GPU snapshot and BUG_ON()
+ * so we can take advantage of the debug tools to figure out what the
+ * h - e - double hockey sticks happened. If EAGAIN error is returned
+ * then recovery will kick in and there will be no more commands in the
+ * RB pipe from this context which is waht we are waiting for, so ignore
+ * -EAGAIN error
*/
- BUG_ON(ret && ret != -EAGAIN);
+ if (ret && ret != -EAGAIN) {
+ KGSL_DRV_ERR(device, "Wait for global ts=%d type=%d error=%d\n",
+ drawctxt->internal_timestamp,
+ drawctxt->type, ret);
+ device->force_panic = 1;
+ kgsl_device_snapshot(device, context);
+ }
kgsl_sharedmem_writel(device, &device->memstore,
KGSL_MEMSTORE_OFFSET(context->id, soptimestamp),