Merge "sdm: limit mutex lock scope to update refresh variable"
diff --git a/init/init.qti.display_boot.sh b/init/init.qti.display_boot.sh
index 35d8cb6..8f879f6 100644
--- a/init/init.qti.display_boot.sh
+++ b/init/init.qti.display_boot.sh
@@ -88,6 +88,23 @@
             setprop vendor.display.disable_system_load_check 1
         fi
         ;;
+        608)
+        #SOC ID for Crow is 608
+        setprop vendor.display.enable_fb_scaling 0
+        setprop vendor.display.target.version 4
+        setprop vendor.gralloc.use_dma_buf_heaps 1
+        setprop vendor.display.enable_posted_start_dyn 2
+        setprop vendor.display.enable_allow_idle_fallback 1
+        setprop vendor.display.enable_perf_hint_large_comp_cycle 1
+        setprop vendor.display.enable_rotator_ui 1
+        setprop vendor.display.enable_spec_fence 1
+        setprop vendor.display.thermal.version 1
+        setprop vendor.display.enable_rc_support 1
+        setprop vendor.display.enable_latch_media_content 1
+        setprop vendor.display.enable_inline_writeback 0
+        setprop vendor.display.timed_render_enable 1
+        setprop debug.sf.disable_client_composition_cache 0
+        ;;
     esac
     ;;
     "taro")
diff --git a/sdm/include/core/dpps_interface.h b/sdm/include/core/dpps_interface.h
index af5dc81..2d68f08 100644
--- a/sdm/include/core/dpps_interface.h
+++ b/sdm/include/core/dpps_interface.h
@@ -27,13 +27,18 @@
 * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 */
 
+/*
+* Changes from Qualcomm Innovation Center are provided under the following license:
+*
+* Copyright (c) 2023 Qualcomm Innovation Center, Inc. All rights reserved.
+* SPDX-License-Identifier: BSD-3-Clause-Clear
+*/
+
 #ifndef __DPPS_INTERFACE_H__
 #define __DPPS_INTERFACE_H__
 
 #include <core/sdm_types.h>
-#if !defined(LINUX_COMPILE) && !defined(WIN32) && !defined(_WIN64) && !defined(__APPLE__)
 #include <core/display_interface.h>
-#endif
 #include <color_metadata.h>
 
 #include <string>
@@ -95,7 +100,8 @@
 
 class DppsInterface {
  public:
-  virtual int Init(DppsPropIntf* intf, const std::string &panel_name) = 0;
+  virtual int Init(DppsPropIntf *intf, const std::string &panel_name,
+                   DisplayInterface *display_intf) = 0;
   virtual int Deinit() = 0;
   virtual int DppsNotifyOps(enum DppsNotifyOps op, void *payload, size_t size) = 0;
 
@@ -105,9 +111,11 @@
 
 class DppsDummyImpl : public DppsInterface {
  public:
-  int Init(DppsPropIntf* intf, const std::string &panel_name) {
+  int Init(DppsPropIntf *intf, const std::string &panel_name,
+           DisplayInterface *display_intf = nullptr) {
     (void)intf;
     (void)panel_name;
+    (void)display_intf;
     return 0;
   }
   int Deinit() {
diff --git a/sdm/libs/core/display_builtin.cpp b/sdm/libs/core/display_builtin.cpp
index a0ce1be..13fa618 100644
--- a/sdm/libs/core/display_builtin.cpp
+++ b/sdm/libs/core/display_builtin.cpp
@@ -990,7 +990,7 @@
     dpps_pu_nofiy_pending_ = false;
     dpps_pu_lock_.Broadcast();
   }
-  dpps_info_.Init(this, hw_panel_info_.panel_name);
+  dpps_info_.Init(this, hw_panel_info_.panel_name, this);
 
   if (demuratn_)
     EnableDemuraTn(true);
@@ -1927,12 +1927,13 @@
 DppsInterface* DppsInfo::dpps_intf_ = NULL;
 std::vector<int32_t> DppsInfo::display_id_ = {};
 
-void DppsInfo::Init(DppsPropIntf *intf, const std::string &panel_name) {
+void DppsInfo::Init(DppsPropIntf *intf, const std::string &panel_name,
+                    DisplayInterface *display_intf) {
   std::lock_guard<std::mutex> guard(lock_);
   int error = 0;
 
-  if (!intf) {
-    DLOGE("Invalid intf is null");
+  if (!intf || !display_intf) {
+    DLOGE("Invalid intf %pK display_intf %pK", intf, display_intf);
     return;
   }
 
@@ -1967,7 +1968,7 @@
       goto exit;
     }
   }
-  error = dpps_intf_->Init(intf, panel_name);
+  error = dpps_intf_->Init(intf, panel_name, display_intf);
   if (error) {
     DLOGE("DPPS Interface init failure with err %d", error);
     goto exit;
diff --git a/sdm/libs/core/display_builtin.h b/sdm/libs/core/display_builtin.h
index 758e8db..b2fe25c 100644
--- a/sdm/libs/core/display_builtin.h
+++ b/sdm/libs/core/display_builtin.h
@@ -94,7 +94,7 @@
 
 class DppsInfo {
  public:
-  void Init(DppsPropIntf *intf, const std::string &panel_name);
+  void Init(DppsPropIntf *intf, const std::string &panel_name, DisplayInterface *display_intf);
   void Deinit();
   void DppsNotifyOps(enum DppsNotifyOps op, void *payload, size_t size);
   bool disable_pu_ = false;