cat ./sys/devices/virtual/amhdmitx/amhdmitx0/rawedid
00ffffffffffff0025e4032301010101011d0103805022782a96a1a355539f250a5054210800818081c0a9c0d1c001010101010101014eab70b8d1a042509060640820
4f3100001a000000fd00174c1f703c000a202020202020000000ff0053657269616c4e756d6265720a000000fc004c43442d474357513334315844015802033d704b10
0102030405202256585a23090707830100006a030c002000383c20000067d85dc401788001e30f0004e200cae60607018b6011e3056000e77c70a0d0a0295030203a00
204f3100001a565e00a0a0a0295030203500204f3100001a295900a0a038274030203a00204f3100001a000000000000000000000000ea
cat /sys/class/amhdmitx/amhdmitx0/disp_cap
480p60hz
720p60hz
1080i60hz
1080p60hz
1080p30hz
1080p24hz
2560x1080p60hz
2560x1080p60hz
代码如下(示例):
//设置分辨率为1080p 3440x1440p60hz
echo 1080p60hz > sys/class/display/mode
//查看当前设备分辨率
cat sys/class/display/mode
1080p60hz
通过如下方式得到RX所支持的色彩空间/色深模式支持的情况
# cat /sys/class/amhdmitx/amhdmitx0/dc_cap
420,10bit
420,8bit
444,10bit
444,8bit
422,10bit
422,8bit
rgb,10bit
rgb,8bit
cat sys/class/amhdmitx/amhdmitx0/attr
rgb,8bit
echo rgb,8bit > sys/class/amhdmitx/amhdmitx0/attr
cat /sys/class/amhdmitx/amhdmitx0/hpd_state
0: 未连接
1:已连接
cat /sys/class/mipi2hdmi_state/mipi2hdmi_state
0: 未连接
1:已连接
息屏设置:
echo 1 > /sys/devices/virtual/amhdmitx/amhdmitx0/avmute
亮屏设置:
echo 0 > /sys/devices/virtual/amhdmitx/amhdmitx0/avmute
或者
echo 0 > /sys/devices/virtual/amhdmitx/amhdmitx0/avmute
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
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
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]