msm: kgsl: Modify only the pending idle timer in ISR.
mod_timer reactivates the timer even when timer is deleted using
del_timer_sync. In the ISR we should be modifying only the pending
timer. We deleted the timer using del_timer_sync, if the interrupts
are still enabled, we could be re-enabling the timer in the ISR.
There is a code path in kgsl_suspend device where we delete the timer
but disable IRQ later.This code path seems to be fixed with another
commit.
Change-Id: I1253dd3c774427e725d302d9ba13d87fad10c463
Signed-off-by: Tarun Karra <tkarra@codeaurora.org>
diff --git a/drivers/gpu/msm/adreno.c b/drivers/gpu/msm/adreno.c
index 3269a8d..7fb06da 100644
--- a/drivers/gpu/msm/adreno.c
+++ b/drivers/gpu/msm/adreno.c
@@ -202,7 +202,7 @@
}
/* Reset the time-out in our idle timer */
- mod_timer(&device->idle_timer,
+ mod_timer_pending(&device->idle_timer,
jiffies + device->pwrctrl.interval_timeout);
return result;
}
diff --git a/drivers/gpu/msm/z180.c b/drivers/gpu/msm/z180.c
index d60df72..718fac9 100644
--- a/drivers/gpu/msm/z180.c
+++ b/drivers/gpu/msm/z180.c
@@ -251,7 +251,7 @@
kgsl_pwrctrl_request_state(device, KGSL_STATE_NAP);
queue_work(device->work_queue, &device->idle_check_ws);
}
- mod_timer(&device->idle_timer,
+ mod_timer_pending(&device->idle_timer,
jiffies + device->pwrctrl.interval_timeout);
return result;