• amlogic-android9.0-hdmi调试



    1、读取edid原始数据

    cat ./sys/devices/virtual/amhdmitx/amhdmitx0/rawedid

    00ffffffffffff0025e4032301010101011d0103805022782a96a1a355539f250a5054210800818081c0a9c0d1c001010101010101014eab70b8d1a042509060640820
    4f3100001a000000fd00174c1f703c000a202020202020000000ff0053657269616c4e756d6265720a000000fc004c43442d474357513334315844015802033d704b10
    0102030405202256585a23090707830100006a030c002000383c20000067d85dc401788001e30f0004e200cae60607018b6011e3056000e77c70a0d0a0295030203a00
    204f3100001a565e00a0a0a0295030203500204f3100001a295900a0a038274030203a00204f3100001a000000000000000000000000ea
    
    • 1
    • 2
    • 3
    • 4

    2、通过以下节点得到RX所支持的HDMI显示模式(分辨率)支持的情况

    cat /sys/class/amhdmitx/amhdmitx0/disp_cap

    		480p60hz
    		720p60hz
    		1080i60hz
    		1080p60hz
    		1080p30hz
    		1080p24hz
    		2560x1080p60hz
    		2560x1080p60hz
    
    • 1
    • 2
    • 3
    • 4
    • 5
    • 6
    • 7
    • 8

    3、设置分辨率

    代码如下(示例):

    //设置分辨率为1080p 3440x1440p60hz

    echo 1080p60hz > sys/class/display/mode  
    
    • 1

    //查看当前设备分辨率

    cat sys/class/display/mode
    1080p60hz
    
    • 1
    • 2

    4、HDMI在Spec 1.4中已经定义了的颜色空间有

    通过如下方式得到RX所支持的色彩空间/色深模式支持的情况

     # cat /sys/class/amhdmitx/amhdmitx0/dc_cap
    		420,10bit
    		420,8bit
    		444,10bit
    		444,8bit
    		422,10bit
    		422,8bit
    		rgb,10bit
    		rgb,8bit
    
    • 1
    • 2
    • 3
    • 4
    • 5
    • 6
    • 7
    • 8
    • 9

    5、查看或者设置当前rx的color format参数

    cat sys/class/amhdmitx/amhdmitx0/attr
    rgb,8bit
    echo rgb,8bit > sys/class/amhdmitx/amhdmitx0/attr
    
    • 1
    • 2
    • 3

    6、查看hdmi是否已连接

    cat /sys/class/amhdmitx/amhdmitx0/hpd_state
    0: 未连接 
    1:已连接 
    
    • 1
    • 2
    • 3

    7、查看mipi是否已连接

    cat /sys/class/mipi2hdmi_state/mipi2hdmi_state
    0: 未连接 
    1:已连接 
    
    • 1
    • 2
    • 3

    8、设置hdmi息屏

    息屏设置:
              echo 1 > /sys/devices/virtual/amhdmitx/amhdmitx0/avmute
    亮屏设置:
              echo 0 > /sys/devices/virtual/amhdmitx/amhdmitx0/avmute
             或者
              echo 0 > /sys/devices/virtual/amhdmitx/amhdmitx0/avmute
    
    • 1
    • 2
    • 3
    • 4
    • 5
    • 6

    9、framework代码路径和调试抓取log:

    vendor/amlogic/frameworks/services/systemcontrol/FormatColorDepth.h
    vendor/amlogic/frameworks/services/systemcontrol/FormatColorDepth.cpp
    vendor/amlogic/frameworks/services/systemcontrol/DisplayMode.h
    vendor/amlogic/frameworks/services/systemcontrol/DisplayMode.cpp
    参考链接:https://blog.csdn.net/qq_30624591/article/details/103645940
    
    • 1
    • 2
    • 3
    • 4
    • 5

    9.0、 logcat | grep “setMboxOutputMode colorAttribute” -EC5

    C:\Users\86182>adb shell
    w400:/ #  logcat | grep "setMboxOutputMode colorAttribute" -EC5
    SystemControl: write /sys/class/amhdmitx/amhdmitx0/valid_mode, val:1080p60hz422,8bit end
    SystemControl: isModeSupportDeepColorAttr mode = 1080p60hz, color = rgb,8bit
    SystemControl: write /sys/class/amhdmitx/amhdmitx0/valid_mode, val:1080p60hzrgb,8bit end
    SystemControl: get hdmi color attribute : [444,8bit], outputmode is: [1080p60hz] , and support color list is: [444,8bit422,8bitrgb,8bit]
    SystemControl: cur deepcolor attr value is equals to colorAttribute, Do not need set it
    SystemControl: setMboxOutputMode colorAttribute = 444,8bit
    SystemControl: [ubootenv] update value name [ubootenv.var.1080p60hz_deepcolor]: value [444,8bit]
    SystemControl: [ubootenv] update value name [ubootenv.var.colorattribute]: value [444,8bit]
    SystemControl: curMode = null outputmode = 1080p60hz
    chatty  : uid=1000(system) composer@2.2-se expire 12 lines
    SystemControl: write /sys/class/display/mode, val:1080p60hz end
    
    • 1
    • 2
    • 3
    • 4
    • 5
    • 6
    • 7
    • 8
    • 9
    • 10
    • 11
    • 12
    • 13

    9.1 、logcat | grep “mode”

    01-01 11:26:25.053  3361  3443 I SystemControl: write /sys/class/amhdmitx/amhdmitx0/hdcp_mode, val:-1 end
    01-01 11:26:25.150  3361  3443 I SystemControl: isModeSupportDeepColorAttr mode = 1080p50hz, color = 444,8bit
    01-01 11:26:25.150  3361  3443 I SystemControl: write /sys/class/amhdmitx/amhdmitx0/valid_mode, val:1080p50hz444,8bit end
    01-01 11:26:25.168  3361  3443 I SystemControl: support current mode:[1080p50hz], deep color:[444,8bit]
    01-01 11:26:25.168  3361  3443 I SystemControl: pang set hdmi frqMode50:[1080p50hz], outputmode is: [1080p60hz] , and support color list is: [444,8bit422,8bitrgb,8bit]
    01-01 11:26:25.168  3361  3443 I SystemControl: curMode = null outputmode = 1080p60hz
    01-01 11:26:25.371  3361  3443 I SystemControl: write /sys/class/display/mode, val:1080p60hz end
    01-01 11:26:25.371  3361  3422 D SystemControl: [CPQControl]:GetHDRMode: mode is 32
    01-01 11:26:25.371  3361  3422 D SystemControl: [CPQControl]:CheckOutPutMode: current output mode is 1080p60hz!
    01-01 11:26:25.371  3361  3422 D SystemControl: [CPQControl]:CheckOutPutMode: output mode is 13!
    01-01 11:26:25.380  3361  3443 I SystemControl: [ubootenv] update value name [ubootenv.var.hdmimode]: value [1080p60hz]
    01-01 11:26:25.380  3361  3443 I SystemControl: set output mode:1080p60hz done
    01-01 11:26:25.380  3373  3411 I MesonHwc: DualDisplayPipe::handleEvent set mode (1080p60hz)
    01-01 11:26:25.395  3361  3443 I SystemControl: write /sys/class/display2/mode, val:panel end
    01-01 11:26:25.420  3373  3411 I MesonHwc: add display mode (panel, 1920x1080, 60.000000)
    01-01 11:26:25.420  3373  3411 D MesonHwc: update: (panel) mode (panel)
    01-01 11:26:25.420  3373  3411 D MesonHwc: On mode change state: [Complete]
    01-01 11:26:25.453  3373  3411 I MesonHwc: DualDisplayPipe::handleEvent set mode (panel)
    01-01 11:26:25.453  3373  3411 D MesonHwc: received Uevent: change@/devices/platform/vout/extcon/setmode
    01-01 11:26:25.453  3373  3411 D MesonHwc: received Uevent: DEVPATH=/devices/platform/vout/extcon/setmode
    01-01 11:26:25.453  3373  3411 D MesonHwc: received Uevent: NAME=vout_excton_setmode
    01-01 11:26:25.453  3373  3411 D MesonHwc: received Uevent: change@/devices/platform/vout/extcon/setmode
    01-01 11:26:25.453  3373  3411 D MesonHwc: received Uevent: DEVPATH=/devices/platform/vout/extcon/setmode
    01-01 11:26:25.453  3373  3411 D MesonHwc: received Uevent: NAME=vout_excton_setmode
    01-01 11:26:25.464  3361  3443 I SystemControl: getBootEnv key:ubootenv.var.hdmimode value:1080p60hz
    01-01 11:26:25.464  3373  3411 I MesonHwc: add display mode real dpi (34, 42)
    01-01 11:26:25.464  3373  3411 I MesonHwc: add display mode (480p60hz)
    01-01 11:26:25.464  3373  3411 I MesonHwc: add display mode real dpi (34, 50)
    01-01 11:26:25.464  3373  3411 I MesonHwc: add display mode (576p50hz)
    01-01 11:26:25.464  3373  3411 I MesonHwc: add display mode real dpi (61, 63)
    01-01 11:26:25.464  3373  3411 I MesonHwc: add display mode (720p60hz)
    01-01 11:26:25.464  3373  3411 I MesonHwc: add display mode real dpi (61, 63)
    01-01 11:26:25.464  3373  3411 I MesonHwc: add display mode (720p50hz)
    01-01 11:26:25.464  3373  3411 I MesonHwc: add display mode real dpi (92, 94)
    01-01 11:26:25.464  3373  3411 I MesonHwc: add display mode (1080p50hz)
    01-01 11:26:25.465  3373  3411 D MesonHwc: update: (1080p60hz) mode (480p60hz)
    01-01 11:26:25.465  3373  3411 D MesonHwc: update: (1080p60hz) mode (576p50hz)
    01-01 11:26:25.465  3373  3411 D MesonHwc: update: (1080p60hz) mode (720p60hz)
    01-01 11:26:25.465  3373  3411 D MesonHwc: update: (1080p60hz) mode (720p50hz)
    01-01 11:26:25.465  3373  3411 D MesonHwc: update: (1080p60hz) mode (1080p50hz)
    01-01 11:26:25.465  3373  3411 D MesonHwc: On mode change state: [Complete]
    
    • 1
    • 2
    • 3
    • 4
    • 5
    • 6
    • 7
    • 8
    • 9
    • 10
    • 11
    • 12
    • 13
    • 14
    • 15
    • 16
    • 17
    • 18
    • 19
    • 20
    • 21
    • 22
    • 23
    • 24
    • 25
    • 26
    • 27
    • 28
    • 29
    • 30
    • 31
    • 32
    • 33
    • 34
    • 35
    • 36
    • 37
    • 38
    • 39
    • 40
    • 41
  • 相关阅读:
    多线程的线程同步(即上锁)
    JZ11 旋转数组的最小数字
    基于 Jenkins 搭建一套 CI/CD 系统
    rabbitMQ集群搭建
    模板语法2
    从代码入手理解卡尔曼滤波器的原理之引入状态转换模型(四)
    【LeetCode每日一题:775.全局倒置与局部倒置~~~维护前缀最大值】
    【网络工程师8个疑难杂症解决方案】
    2023年中国临床信息系统市场规模及细分市场结构分析[图]
    Delete `␍` 最简单最有效的解决方法和解释(VScode)
  • 原文地址:https://blog.csdn.net/qq_38312843/article/details/126372822