前面聊的
成都創(chuàng)新互聯(lián)公司是一家專業(yè)提供偏關(guān)企業(yè)網(wǎng)站建設(shè),專注與成都做網(wǎng)站、成都網(wǎng)站制作、H5技術(shù)、小程序制作等業(yè)務(wù)。10年已為偏關(guān)眾多企業(yè)、政府機(jī)構(gòu)等服務(wù)。創(chuàng)新互聯(lián)專業(yè)網(wǎng)站制作公司優(yōu)惠進(jìn)行中。最近在調(diào)試項(xiàng)目的亮屏速度,我們希望在按下power鍵后到亮屏這個(gè)時(shí)間能達(dá)到500MS以內(nèi),在Rockchip 3399和3288上面的時(shí)間都不能達(dá)到要求,因此引發(fā)了一系列的調(diào)試之路。
計(jì)算按下power鍵到亮屏的時(shí)間
Android 喚醒時(shí)間統(tǒng)計(jì)
剛開始的時(shí)候,我只在android階段統(tǒng)計(jì)時(shí)間,也能看到時(shí)間的差異,但是不是最準(zhǔn)確的,我統(tǒng)計(jì)的時(shí)間日志如下
01-18 09:13:40.992 683 772 D SurfaceControl: Excessive delay in setPowerMode(): 743ms
01-18 09:13:45.304 683 772 D SurfaceControl: Excessive delay in setPowerMode(): 757ms
01-18 09:13:49.559 683 772 D SurfaceControl: Excessive delay in setPowerMode(): 725ms
01-18 09:18:27.461 683 772 D SurfaceControl: Excessive delay in setPowerMode(): 741ms
01-18 09:18:32.766 683 772 D SurfaceControl: Excessive delay in setPowerMode(): 743ms
01-18 09:18:35.861 683 772 D SurfaceControl: Excessive delay in setPowerMode(): 745ms
01-18 09:18:38.345 683 772 D SurfaceControl: Excessive delay in setPowerMode(): 733ms
Kernel從Power到亮屏的時(shí)間統(tǒng)計(jì)
后來同事中的精英古總在他的代碼上加入了從按下Power鍵到亮屏的時(shí)間,直接通過printk打印,代碼如下
diff --git a/drivers/gpu/drm/panel/panel-simple.c b/drivers/gpu/drm/panel/panel-simple.c old mode 100644 new mode 100755 index 17c3b94..2b39662 --- a/drivers/gpu/drm/panel/panel-simple.c +++ b/drivers/gpu/drm/panel/panel-simple.c @@ -504,6 +504,7 @@ static int panel_simple_enable(struct drm_panel *panel) } p->enabled = true; + printk("%s exit\n", __func__); return 0; } diff --git a/drivers/input/keyboard/rk_keys.c b/drivers/input/keyboard/rk_keys.c old mode 100644 new mode 100755 index fed5ced..537b599 --- a/drivers/input/keyboard/rk_keys.c +++ b/drivers/input/keyboard/rk_keys.c @@ -134,6 +134,10 @@ static void keys_timer(unsigned long _data) key_dbg(pdata, "%skey[%s]: report event[%d] state[%d]\n", button->type == TYPE_ADC ? "adc" : "gpio", button->desc, button->code, button->state); + if(strcmp(button->desc, "power") == 0) + printk("%skey[%s]: report event[%d] state[%d]\n", + button->type == TYPE_ADC ? "adc" : "gpio", + button->desc, button->code, button->state); input_event(input, EV_KEY, button->code, button->state); input_sync(input); }