Merge "display: Change the place to set color mode" into display.lnx.6.0
diff --git a/sdm/libs/core/color_manager.cpp b/sdm/libs/core/color_manager.cpp
index bc74cf0..b9a33e8 100644
--- a/sdm/libs/core/color_manager.cpp
+++ b/sdm/libs/core/color_manager.cpp
@@ -461,17 +461,13 @@
     }
   }
 
-  if (apply_mode_ || updates) {
+  if (apply_mode_) {
     update_mode_Hwassets = true;
-    if (apply_mode_) {
-      apply_mode_ = false;
-      ret = color_intf_->ColorIntfSetDisplayMode(&pp_features_,
-                     static_cast<uint32_t>(display_id_), cur_mode_id_);
-      if (ret != kErrorNone) {
-        DLOGE("ApplyDisplayMode(mode_id = %d) failed, ret = %d.", cur_mode_id_, ret);
-        return kErrorNone;
-      }
-    }
+    apply_mode_ = false;
+  }
+
+  if (updates) {
+    update_mode_Hwassets = true;
   }
 
   if (hdr_present || hdr_plus_present) {
diff --git a/sdm/libs/core/display_base.cpp b/sdm/libs/core/display_base.cpp
index e454188..e2c2dab 100644
--- a/sdm/libs/core/display_base.cpp
+++ b/sdm/libs/core/display_base.cpp
@@ -1041,6 +1041,13 @@
   if (!str_render_intent.empty()) {
     render_intent = std::stoi(str_render_intent);
   }
+
+  error = color_mgr_->ColorMgrSetMode(sde_display_mode->id);
+  if (error != kErrorNone) {
+    DLOGE("Failed for mode id = %d", sde_display_mode->id);
+    return error;
+  }
+
   error = color_mgr_->ColorMgrSetModeWithRenderIntent(sde_display_mode->id, pt, render_intent);
   if (error != kErrorNone) {
     DLOGE("Failed for mode id = %d", sde_display_mode->id);