HW: 8x12&8x10
SW: 193513A
panel resolution: 1280*800
调试一pad项目中出现了一个问题, 在进入camera应用的时候启用ZSL(零秒快拍),会出现屏幕局部Blue Screen. 进入video recording启用time lapse recording(0.5s),resolution在480P以下时,出现Blue Screen的概率比较高,奇怪的是在720P没有出现Blue screen,这种情况之前没有遇到过,提case给高通,对于ZSL模式回复如下:
mount -t debugfs debugfs /d
There are two methods to verify the issue is actually an underrun problem:-
1. By checking the MDP stats after mounting debugfs:-
1.a) adb shell
1.b) cd d/mdp //d is debugfs already mounted
1.c) cat stat
mdp:
intf2: play: 00000000 vsync: 00006823 underrun: 00000000
Here the underrun count will be non-zero value and will increment on MDP under run.
这个debug method刚开始不知道是什么意思,后来结合8939平台上的debug manual,知道了这个是统计Blue screen次数的一个数值,我在samples machine上测得的结果
mdp:
underrun: 00007219
mdp:
underrun: 00008835
mdp:
underrun: 00008835
mdp:
underrun: 00010538
这个值会随着Blue screen 出现的次数而增加,初始值应该是0. qualcomm发来adsp image让我升级测试,升级步骤如下:
adb root
sleep 5
adb remount
adb shell "rm etc/firmware/adsp*"
adb push adsp.b00 /etc/firmware/
adb push adsp.b01 /etc/firmware/
adb push adsp.b02 /etc/firmware/
adb push adsp.b03 /etc/firmware/
adb push adsp.b04 /etc/firmware/
adb push adsp.b05 /etc/firmware/
adb push adsp.b06 /etc/firmware/
adb push adsp.b07 /etc/firmware/
adb push adsp.mdt /etc/firmware/
adb shell sync
adb reboot
这个升级finish后,蓝屏现象有所改善,但并没有完全解决。最后qualcomm也没有进一步的solution可以彻底解决,ZSL这项功能只好被暂时removed。
对于time lapse recording出现的blue screen,引起的原因应该和zsl模式下的相同或者相似,之后重新向qualcomm提了case,回复如下:
diff --git a/drivers/media/platform/msm/camera_v2/isp/msm_isp_util.c b/drivers/media/platform/msm/camera_v2/isp/msm_isp_util.c
old mode 100644
new mode 100755
index f877da4..85951ff
--- a/drivers/media/platform/msm/camera_v2/isp/msm_isp_util.c
+++ b/drivers/media/platform/msm/camera_v2/isp/msm_isp_util.c
@@ -150,6 +150,11 @@ int msm_isp_update_bandwidth(enum msm_isp_hw_client client,
isp_bandwidth_mgr.client_info[i].ib;
}
}
+
+ if (path->vectors[0].ib < 1600000000) {
+ path->vectors[0].ib = 1600000000;
+ path->vectors[0].ab = 1600000000;
+ }
msm_bus_scale_client_update_request(isp_bandwidth_mgr.bus_client,
isp_bandwidth_mgr.bus_vector_active_idx);
mutex_unlock(&bandwidth_mgr_mutex);
这个patch并没有改善问题。接下来qualcomm发过来adsp,升级后,blue screen居然消失了,这一点让我感觉比较神奇,我想ZSL模式下的blue screen是否也会解决,测试后发现,出现blue的概率很低,但是仍然存在。会不会是systemwide的问题,于是将4个cpu效果全开:
adb shell stop thermald
adb shell stop mpdecision
adb shell "echo 1 > /sys/devices/system/cpu/cpu0/online"
adb shell "echo 1 > /sys/devices/system/cpu/cpu1/online"
adb shell "echo 1 > /sys/devices/system/cpu/cpu2/online"
adb shell "echo 1 > /sys/devices/system/cpu/cpu3/online"
adb shell "echo performance > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor"
adb shell "echo performance > /sys/devices/system/cpu/cpu1/cpufreq/scaling_governor"
adb shell "echo performance > /sys/devices/system/cpu/cpu2/cpufreq/scaling_governor"
adb shell "echo performance > /sys/devices/system/cpu/cpu3/cpufreq/scaling_governor"
测试结果并没有改善这个问题。那么是否是频率或者带宽的影响呢?做如下的测试:
diff --git a/drivers/video/msm/mdss/mdp3.h b/drivers/video/msm/mdss/mdp3.h
index 137a1b8..5d2ba49 100644
--- a/drivers/video/msm/mdss/mdp3.h
+++ b/drivers/video/msm/mdss/mdp3.h
@@ -26,7 +26,7 @@
#include "mdss_fb.h"
#define MDP_VSYNC_CLK_RATE 19200000
-#define MDP_CORE_CLK_RATE 100000000
+#define MDP_CORE_CLK_RATE 200000000
#define KOFF_TIMEOUT msecs_to_jiffies(84)
b)
diff --git a/drivers/video/msm/mdss/mdp3_ctrl.c b/drivers/video/msm/mdss/mdp3_ctrl.c
index cd0af6d..5009c1a 100644
--- a/drivers/video/msm/mdss/mdp3_ctrl.c
+++ b/drivers/video/msm/mdss/mdp3_ctrl.c
@@ -352,7 +352,7 @@ static int mdp3_ctrl_res_req_bus(struct msm_fb_data_type *mfd, int status)
u64 ab = 0;
u64 ib = 0;
ab = panel_info->xres * panel_info->yres * 4;
- ab *= panel_info->mipi.frame_rate;
+ ab *= panel_info->mipi.frame_rate*2;
ib = (ab * 3) / 2;
rc = mdp3_bus_scale_set_quota(MDP3_CLIENT_DMA_P, ab, ib);
} else {
The test combination is below:
1) Only a)
2) Only b)
3) Together a) and b)
问题依旧没有得到改善。现在继续和qualcomm沟通这个问题,看接下来的解决方法