For some vendors the idle timer value is configured to zero. But with
the current LPM timer implementation it will use the alarm APIs to
schedule wake_deassert(), which introduces context switch overhead.
The code is modified to trigger the wake_deassert immediately if the
idle timeout value is configured to zero. These changes improve OPP
throughput.
Change-Id: Ic48e7b990ccf55525a0d15b65c03daedfe03c582
Signed-off-by: Jaganath Kanakkassery <jaganathx.kanakkassery@intel.com>
Signed-off-by: Zhiquan Liu <zhiquan.liu@intel.com>
static uint32_t idle_timeout_ms;
static alarm_t *idle_alarm;
static bool transmit_is_done;
+static void wake_deassert();
// Interface functions
static void start_idle_timer() {
if (state == LPM_ENABLED) {
- alarm_set(idle_alarm, idle_timeout_ms, idle_timer_expired, NULL);
+ if (idle_timeout_ms == 0) {
+ wake_deassert();
+ } else {
+ alarm_set(idle_alarm, idle_timeout_ms, idle_timer_expired, NULL);
+ }
}
}