author | Luan Yuan <luan.yuan@amlogic.com> | 2017-12-13 09:26:35 (GMT) |
---|---|---|
committer | Luan Yuan <luan.yuan@amlogic.com> | 2017-12-13 09:28:08 (GMT) |
commit | 9cc9140ecd7424bafa4492d6d2e21132f959dced (patch) | |
tree | 6c47c0beb901837e2f8bdb46c63783a868614f75 | |
parent | fd796838b73c9e5d44d146a7fb21206f07b75907 (diff) | |
download | frameworks-9cc9140ecd7424bafa4492d6d2e21132f959dced.zip frameworks-9cc9140ecd7424bafa4492d6d2e21132f959dced.tar.gz frameworks-9cc9140ecd7424bafa4492d6d2e21132f959dced.tar.bz2 |
systemcontrol: set null mode when change deepcolor.[1/1]
PD#156199
need set null to display/mode when change deepcolor
Change-Id: I1b01f7293b498b7576dbf8e9bf3802a0e4d27e11
-rw-r--r-- | services/systemcontrol/DisplayMode.cpp | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/services/systemcontrol/DisplayMode.cpp b/services/systemcontrol/DisplayMode.cpp index a265c86..9438fb5 100644 --- a/services/systemcontrol/DisplayMode.cpp +++ b/services/systemcontrol/DisplayMode.cpp @@ -1082,7 +1082,15 @@ void DisplayMode::updateDeepColor(bool cvbsMode, output_mode_state state, const } else { strcpy(colorAttribute, "default"); } - pSysWrite->writeSysfs(DISPLAY_HDMI_COLOR_ATTR, colorAttribute); + char attr[MODE_LEN] = {0}; + pSysWrite->readSysfs(DISPLAY_HDMI_COLOR_ATTR, attr); + if (strstr(attr, colorAttribute) == NULL) { + SYS_LOGI("set DeepcolorAttr value is different from attr sysfs value\n"); + pSysWrite->writeSysfs(SYSFS_DISPLAY_MODE, "null"); + pSysWrite->writeSysfs(DISPLAY_HDMI_COLOR_ATTR, colorAttribute); + } else { + SYS_LOGI("cur deepcolor attr value is equals to colorAttribute, Do not need set it\n"); + } SYS_LOGI("setMboxOutputMode colorAttribute = %s\n", colorAttribute); //save to ubootenv saveDeepColorAttr(outputmode, colorAttribute); |