if (mdnie_mode == MDNIE_SCENARIO_MODE) {
if ((IS_LDU_MODE(mdnie)) && (mdnie->props.scenario != EBOOK_MODE)) {
mdnie->props.scr_white_mode = SCR_WHITE_MODE_ADJUST_LDU;
- } else if (mdnie->props.update_sensorRGB &&
- mdnie->props.mode == AUTO &&
+ } else if (mdnie->props.update_sensorRGB ||
+ (mdnie->props.mode == AUTO &&
(mdnie->props.scenario == BROWSER_MODE ||
- mdnie->props.scenario == EBOOK_MODE)) {
+ mdnie->props.scenario == EBOOK_MODE))) {
mdnie->props.scr_white_mode = SCR_WHITE_MODE_SENSOR_RGB;
mdnie->props.update_sensorRGB = false;
} else if (mdnie->props.scenario <= SCENARIO_MAX &&
{
struct mdnie_info *mdnie = dev_get_drvdata(dev);
unsigned int white_red = 0, white_green = 0, white_blue = 0;
- int mdnie_mode = mdnie_current_state(mdnie), ret;
+ int ret;
ret = sscanf(buf, "%d %d %d",
&white_red, &white_green, &white_blue);
dev_info(dev, "%s, white_r %d, white_g %d, white_b %d\n",
__func__, white_red, white_green, white_blue);
- if (mdnie_mode == MDNIE_SCENARIO_MODE &&
- mdnie->props.mode == AUTO &&
- (mdnie->props.scenario == BROWSER_MODE ||
- mdnie->props.scenario == EBOOK_MODE)) {
+ if (IS_MDNIE_ENABLED(mdnie)) {
mutex_lock(&mdnie->lock);
mdnie->props.ssr_wrgb[0] = white_red;
mdnie->props.ssr_wrgb[1] = white_green;