summaryrefslogtreecommitdiff
authorTellen Yu <tellen.yu@amlogic.com>2017-12-14 02:15:05 (GMT)
committer Gerrit Code Review <gituser@scgit.amlogic.com>2017-12-14 02:15:05 (GMT)
commit1a13713de156bdf2e19d542710e41ca95343ee85 (patch)
treef17988f0a9a9966099b92b384395181305fbc36d
parent6d0878315fe01d0566f197a4246de895cb586431 (diff)
parent9cc9140ecd7424bafa4492d6d2e21132f959dced (diff)
downloadframeworks-1a13713de156bdf2e19d542710e41ca95343ee85.zip
frameworks-1a13713de156bdf2e19d542710e41ca95343ee85.tar.gz
frameworks-1a13713de156bdf2e19d542710e41ca95343ee85.tar.bz2
Merge "systemcontrol: set null mode when change deepcolor.[1/1]" into o-amlogic
Diffstat
-rw-r--r--services/systemcontrol/DisplayMode.cpp10
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);