当前位置:网站首页>Qcom LCD commissioning
Qcom LCD commissioning
2022-06-28 05:05:00 【bobuddy】
LCD DSI agreement
DSI Agreement ,0x29 and 0x39 difference : stay Mipi Agreement , Both of them mean Long bag (Long Packet) data type .
Mipi DSI Of Spec The difference between the two is written in : 0x29 Belong to Generic long write ,0x39 Belong to DCS long write.
DCS System read / write commands , With parameters , Commonly used in LCD Initialization parameter command .
Generic Is a read / write command , It is a command outside the protocol specification , Usually a few IC custom , Just make sure that the host and peripherals agree with these data formats , Usually and DCS Universal .
Various clk And its calculation method
DSI vdo mode Data rate under data_rate The approximate calculation formula is :
[Bitclk]Data rate= (Height+VSA+VBP+VFP) * (Width+HSA+HBP+HFP) * total_bit_per_pixel * frame_per_second / total_lane_num
total_bit_per_pixel[bit per pixel]: Such as RGB888,24bit; RGB666,18bit
frame_per_second: How many frames per second
total_lane_num: Use several routes lane To transmit data
With the following LCD give an example :
720P: 1280*720 4lane
<PanelWidth>720</PanelWidth>
<PanelHeight>1280</PanelHeight>
<HFrontPorch>100</HFrontPorch>
<HBackPorch>100</HBackPorch>
<HPulseWidth>33</HPulseWidth>
<HSyncSkew>0</HSyncSkew>
<VBackPorch>30</VBackPorch>
<VFrontPorch>20</VFrontPorch>
<VPulseWidth>2</VPulseWidth>
<PanelFrameRate>60</PanelFrameRate>
H-total = HorizontalActive + HorizontalFrontPorch + HorizontalBackPorch + HorizontalSyncPulse + HorizontalSyncSkew
// 1280 + 100 + 100 + 33 + 0 = 1513
V-total = VerticalActive + VerticalFrontPorch + VerticalBackPorch + VerticalSyncPulse + VerticalSyncSkew
// 720 + 20 + 30 + 2 = 772
Total pixel = H-total * V-total * 60(Hz It's usually this , Of course it can change ).
// 1513 * 772 * 60 = 65,361,600
Bitclk = Total pixel * bpp(byte) *8/lane number( There are several ways mipi data lane).
// 65,361,600 * 3 * 8/4 = 392,169,600
Byteclk = bitclk/8
// 392,169,600/8 = 49,021,200
Dsipclk(Dsi pixel clock) = (Byteclk * lane number)/bpp(byte) = Total pixel * 8
// 49,021,200 * 4 / 3 = 65,361,600
LCD see LCD Resolution and DPI( Pixel density , Number of pixels per inch )
adb root
adb shell
wm size // Look at the resolution
wm density // see DPI
wm size reset // Restore the initial value
wm density reset // Restore the initial value
PPI and DPI
1. dpi yes dot per inch, How many dots per inch ,ppi yes Pixel per inch, Pixels per inch , For the design of the display ,
dpi=ppi.ppi The calculation method is the sum of the squares of the length and width , Divided by the diagonal length ( In inches ). Principle can draw a rectangular Pythagorean theorem to calculate .
2. ppi Indicates the point density of the display device ,dpi Indicates the print point density .
3. dip or dp, It is the unit for Android development ,1dp Indicates that the density at the screen point is 160ppi when 1px length . Because Android devices have so many screens, it is impossible to develop each screen separately , So use the formula
px=dp*(ppi/160) Calculate the number of pixels on different screens . give an example :HVGA screen 320*480, It's usually 3.5 " , The calculated point density is
√ (320^2 + 480^2) / 3.5 = 164, About equal to 160,1pd=1pxWVGA screen 480*800, Press 3.8 Inch screen calculation , Point density √ (480^2 + 800^2) / 3.8 = 245,
About equal to 240,1dp=1.5px. There are more high-resolution screens, not to mention , All in all dp Is to facilitate the adaptation of different screen units , At different screen densities ,1dp The physical length of is the same .
link :https://www.zhihu.com/question/21220154/answer/18584739
Modify the way ;
diff --git a/device/xxx/xxx/system.prop b/device/pri_name/system.prop
+# set lcd density
+ro.sf.lcd_density=180
ADB View the current LCD Of name -- Sl8521E
adb root
adb remount
cd /sys/devices/platform/sprd-panel-if/display/panel0
cat name
ADB View boot animation
adb shell setprop ctl.start bootanim
SC9820E ADB Set the backlight level
adb root
adb shell
cd sys/class/backlight/sprd_backlight # echo 50 > brightness
// Set the method directly
adb shell settings put system screen_brightness 150
// Get sleep time
adb shell settings get system screen_off_timeout
ADB adjustment LCD Front and back shoulders // Zhan Rui SL8521E
adb root
adb shell
cd sys/devices/platform/sprd-panel-if/display/panel0
cat vporch
cat hporch
echo 80 54 8 > hporch // After the adjustment , Need to stop the screen , Then wake up again to take effect
echo 12 16 2 > vporch // After the adjustment , Need to stop the screen , Then wake up again to take effect
ADB Screen capture command
adb root
adb wait-for-device
adb shell screencap -p /data/screen.png
adb pull /data/screen.png
ADB Recording screen
adb shell screenrecord --time-limit 10 /sdcard/demo.mp4
# ADB see fb0 Data on a node // It is equivalent to a screenshot
take fb0 The data in is saved to the root directory of the memory card in the form of pictures , The name of the picture is fb0.png
adb shell screencap -d /dev/graphics/fb0 sdcard/fb0.png
# ADB see lcd Information contain mipi-on off Wait for the order
【 The Qualcomm platform Android 9.0】
sys/kernel/debug/mdss_panel_fb0/intf0/
cd dsi_ctrl_pdata // Some initialization data can be viewed inside
cd lcdc // see lcd Front and rear shoulder values
KEY Android 5.1 Use KEY_F1 Key , The upper layer cannot receive the key value
【 Software configuration problem 】 It involves multiple documents :
Device tree configuration :xxx_msm8909-pinctrl.dtsi xxx_msm8909-qrd.dtsi These two files use KEY Relevant configurations shall be correct
key_F1 {
label = "key_f1";
gpios = <&msm_gpio 95 0x1>;
linux,input-type = <1>;
linux,code = <59>;
debounce-interval = <15>;
};
tlmm_gpio_key {
qcom,pins = <&gp 90>, <&gp 91>, <&gp 92>, <&gp 95>;
qcom,pin-func = <0>;
qcom,num-grp-pins = <4>;
label = "tlmm_gpio_key";
gpio_key_active: gpio_key_active {
drive-strength = <2>;
bias-pull-up;
};
gpio_key_suspend: gpio_key_suspend {
drive-strength = <2>;
bias-disable;
};
};
device\xxx\gpio-keys.kl Modify this file , Increase your own KEY_F1 Key mapping .
key 59 F1
key 60 F2
key 61 F3
key 62 F4
kernel\include\uapi\linux\input.h In this document , There are key value definitions for all available keys . After reading the key value defined in the device tree , The key value will be converted into the key name for uploading . Of course, after uploading ,JNI The layer does another conversion of the key value , Convert to the upper key value .
File of upper key value frameworks\base\core\java\android\view\KeyEvent.java
adb logcat –v time –b main –b system > d:/log.log ( This catch log Don't stop , Will always catch )
Then press the key , Search for interceptKeyTq If the submission is successful, the converted key value will be received .
These items must be opened debug The switch can be caught on the upper floor log.
key_code // android9 Drive key definition
8953_APP_P\kernel\msm-4.9\include\uapi\linux\input-event-codes.h
# LOG // user Version grabs all log
adb bugreport > bugreport.log This command catches , The cache will stop automatically after reading
------ KERNEL LOG (dmesg) ------ // kernel log The beginning mark
# LOG kernel log node
dmesg It's a Executable program , To read /proc/kmsg( This is a node )
# LOG Exhibition information platform framework crash Catch slog
slog log
adb pull /data/slog .
/data/misc/hprofs/ Under the hprof file
adb pull /data/misc/hprofs .
Crash occurs If there is adb port Just use the command directly without adb port Then restart and execute
Grab the upper layer log: adb logcat -b main -b radio -b system -v time
// Don't use ctrl+c end , Will always catch log
DUMP MSM8953 Explain 【kernel dump】
1. After the machine crashes , Pull out usb, prevent usb Wake up and restart again
2. open QPST software Download Software , Plug in USB, stay SB3.0 On , open Browse, You can see dump Has started crawling
3. C:\ProgramData\Qualcomm\QPST\Sahara // This is generated dumo File path , Find the file you just grabbed
4. find out\target\product\prj_name\obj\KERNEL_OBJ\vmlinux file , Copy it out and put it in a file
5. open dump Website https://cap.qti.qualcomm.com/default.aspx perhaps Desktop QCAP Software
6. Login solution dump Websites or tools , Select corresponding platform (msm953),AP(kernel Of course. ap Side )
7. Select the one just I caught it dump Document and vmlinux, Start parsing dump
8. Click on Summary, View reasons .
example : Empty pointer causes kernel crash
APPS Crash - Page fault Execute error: PC = pinctrl_select_state+0x1c/0x50 LR = adv7533_probe
notes :Log Location:C:\ProgramData\Qualcomm\QPST\Sahara\Port_COM611 // QPST software Download Caught dead file
notes : Select the lower sub option APPS, Then select file prj_name\dump // vmlinux file
# Catch dump step -- Must use IE browser
1. After the crash , open QPST config Software , Waiting to catch dump end ,900E Until it disappears
2. dump In the following path ,C:\ProgramData\Qualcomm\QPST\Sahara\
3. In the compiled code path , find vmlinux(kernel Of elf file , For other parts, please find the corresponding elf file )
Simulation system enters dump state
【(dump The function needs to be on , General version dump It's all off )】
adb shell
echo c > /proc/sysrq-trigger
adb shell "echo c > /proc/sysrq-trigger"
Check to see if... Is turned on dump function
adb shell "cat /sys/module/msm_poweroff/parameters/download_mode"
Settings on dump function
adb shell "echo 1 > /sys/module/msm_poweroff/parameters/download_mode"
LOG Trace print function call relationships
dump_stack(); // Print function call relationships
LCD Show direction ( modify memory Scanning direction )
General modifications 0x36 register , For detailed modification, please refer to specific datasheet
KEY SL8521E The key refers to the table
frameworks/native/include/android/keycodes.h
adb shell input keyevent 26 // Power Key 26 The value of is taken from here
adb shell input keyevent 23 // center Key
adb shell input keyevent 17 // * key
adb shell input keyevent 18 // # key
kernel keycode Key value definition table
kernel\include\uapi\linux\input-event-codes.h
SL8521E Unlock
adb shell input keyevent 23 // center Key
adb shell input keyevent 17 // # key
# LCD Determine the number of pixels
// see lcd Specifications
Color Depth 16.7M
2^24 = 16777216 About equal to 16.7M That is, each pixel is 24bit RGB888
ADB see android Version number
adb shell getprop ro.build.version.release
8.1.0
# LED // Android9 MSM8953
1. Turn on the flash
adb shell
cd sys/class/leds
cd led:flash_0
echo 255 > brightness // Perform before brightness for 0
cd ../led:switch_0
echo 255 > brightness // Perform before brightness for 0
// After executing this sentence, it flashes , A flash
2. Turn on the lights
adb shell
cd sys/class/leds
cd led:torch_0
echo 255 > brightness // Perform before brightness for 0
cd ../led:switch_0
echo 255 > brightness // Perform before brightness for 0
// After executing this sentence, it will light up , Changliang
Boot animation modification (Android Power on animation of the word )
Just change the picture
frameworks\base\core\res\assets\images\android-logo-mask.png
ADB SElinux // adb see selinux Whether to open
adb shell getenforce // adb see selinux state
Enforcing // Indicates that it is currently open
Permissive // Indicates that it is currently closed
adb shell setenforce 0 // adb close selinux
adb shell setenforce 1 // adb open selinux
ADB android How to judge the mobile phone CPU yes 32 A still 64 Bit ?
adb shell getprop ro.product.cpu.abi
arm64-v8a
PMIC-bootreason
[msm8909、Android8.1]
//adb Method to obtain the startup reason
adb shell
cd /d/spmi/spmi-0/
echo 0x808 > address
echo 0x1 > count
cat data
kernel API Interface
kernel/drivers/platform/msm/qpnp-power-on.c
static int qpnp_pon_probe(struct spmi_device *spmi)
{...
/* PON reason */
rc = spmi_ext_register_readl(pon->spmi->ctrl, pon->spmi->sid, QPNP_PON_REASON1(pon->base), &pon_sts, 1);
...}
Link to the original text :https://blog.csdn.net/FANG_YISHAO/article/details/120654883
边栏推荐
- 电源插座是如何传输电的?困扰小伙伴这么多年的简单问题
- [noip2002 popularization group] cross the river pawn
- Notepad++ -- column editing mode -- Usage / instance
- 无线传感器网络学习笔记(一)
- 创新之源 理解通透 二
- Hundreds of lines of code to implement a script interpreter
- S32ds jump to defaultisr
- 2022 low voltage electrician examination questions and answers
- [microservices openfeign] openfeign quick start service invocation based on feign
- Study on chemical properties and technology of biovendor rage ELISA Kit
猜你喜欢

2022 safety officer-b certificate examination question bank and answers

二级造价工程师证书含金量到底有多高?看这些就知道了

机器人学DH参数及利用matlab符号运算推导

Study on modified triphosphate: lumiprobe amino-11-ddutp

Learn Taiji Maker - mqtt Chapter 2 (IV) esp8266 reserved message application

Severe tire damage: the first rock band in the world to broadcast live on the Internet

!‘cat‘ 不是内部或外部命令,也不是可运行的程序 或批处理文件。

IP数据报的发送和转发过程

Where does the storm go? Whose pot is the weather forecast wrong?

Sword finger offer 49 Ugly number (three finger needling technique)
随机推荐
Light collector, Yunnan Baiyao!
109. 简易聊天室12:实现客户端一对一聊天
How to do a good job of gateway high availability protection in the big promotion scenario
cgo+gSoap+onvif学习总结:8、arm平台交叉编译运行及常见问题总结
项目经理考完PMP就够了?不是的!
Binary sort tree: BST
大促场景下,如何做好网关高可用防护
Learning Tai Chi Maker - mqtt Chapter 2 (V) heartbeat mechanism
Learning Tai Chi Maker - mqtt Chapter II (VI) mqtt wills
Analysis of distributed transaction TCC
开关电源电压型与电流型控制
lotus v1.16.0 calibnet
The latest examination questions and answers for the eight members (standard members) of Liaoning architecture in 2022
Project practice! Teach you JMeter performance test hand in hand
Organize the online cake mall project
Understanding the source of innovation II
It is the latest weapon to cross the blockade. It is one of the fastest ladders.
Play with double pointer
Feign通过自定义注解实现路径的转义
禁用右击、键盘打开控制台事件