summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRajesh Kemisetti <rajeshk@codeaurora.org>2016-04-14 15:34:51 +0530
committerCarter Cooper <ccooper@codeaurora.org>2016-07-20 15:19:32 -0600
commit0ff59e62624886a564f582b7e370c85d107b26ce (patch)
treee34e1a314bb2c5fc49e63e42410f41ec4760d9a9
parent9e4b3ba4afcff08bce320513610955391ab95806 (diff)
msm: kgsl: Stop fault_timer before reading fault registers
Currently adreno_ft_regs_val is getting updated at the time of first submission or on the expiry of fault_timer. If the fault_timer expires exactly at the time of inflight becomes 0 and there is an immediate submission for which GPU finishes the work within short time. Then there is a chance to read the fault registers in fault_detect_read() and fault_detect_read_compare() with less time gap and declare it as a fault. Stop the timer before reading fault registers and start it again. CRs-Fixed: 1043478 Change-Id: Ib35104adf7b3618f94c6adf7fab531abffea3f76 Signed-off-by: Rajesh Kemisetti <rajeshk@codeaurora.org>
-rw-r--r--drivers/gpu/msm/adreno_dispatch.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/drivers/gpu/msm/adreno_dispatch.c b/drivers/gpu/msm/adreno_dispatch.c
index 3f36a93ea110..8140b726fd0f 100644
--- a/drivers/gpu/msm/adreno_dispatch.c
+++ b/drivers/gpu/msm/adreno_dispatch.c
@@ -576,8 +576,15 @@ static int sendcmd(struct adreno_device *adreno_dev,
if (dispatcher->inflight == 1) {
if (ret == 0) {
+
+ /* Stop fault timer before reading fault registers */
+ del_timer_sync(&dispatcher->fault_timer);
+
fault_detect_read(adreno_dev);
+ /* Start the fault timer on first submission */
+ start_fault_timer(adreno_dev);
+
if (!test_and_set_bit(ADRENO_DISPATCHER_ACTIVE,
&dispatcher->priv))
reinit_completion(&dispatcher->idle_gate);
@@ -637,9 +644,6 @@ static int sendcmd(struct adreno_device *adreno_dev,
mod_timer(&dispatcher->timer, cmdbatch->expires);
}
- /* Start the fault detection timer on the first submission */
- if (dispatcher->inflight == 1)
- start_fault_timer(adreno_dev);
/*
* we just submitted something, readjust ringbuffer