msm: kgsl: fix error handling in adreno_waittimestamp()
This function was incorrectly reporting hangs when an
error such as ERESTARTSYS was returned by
__wait_event_interruptible_timeout().
Change-Id: I9139b03c4b417d135663729c763343382328da77
CRs-Fixed: 321490
Signed-off-by: Jeremy Gebben <jgebben@codeaurora.org>
diff --git a/drivers/gpu/msm/adreno.c b/drivers/gpu/msm/adreno.c
index 12e093b..23ecfb3 100644
--- a/drivers/gpu/msm/adreno.c
+++ b/drivers/gpu/msm/adreno.c
@@ -1132,9 +1132,14 @@
mutex_lock(&device->mutex);
if (status > 0) {
+ /*completed before the wait finished */
status = 0;
goto done;
+ } else if (status < 0) {
+ /*an error occurred*/
+ goto done;
}
+ /*this wait timed out*/
}
}
if (!kgsl_check_timestamp(device, timestamp)) {