Merge "display: update SetColorModeWithRenderIntent for virtual display"
diff --git a/composer/hwc_display_builtin.cpp b/composer/hwc_display_builtin.cpp
index a8e559b..0047b1d 100644
--- a/composer/hwc_display_builtin.cpp
+++ b/composer/hwc_display_builtin.cpp
@@ -1581,11 +1581,15 @@
       }
     }
 
-    // For long term large composition hint, release the acquired handle after a consecutive number
-    // of basic frames to avoid resending hints in animation launch use cases and others.
-    num_basic_frames_++;
+    // For long term large composition hint, release the acquired handle after 100 milliseconds
+    // to avoid resending hints in animation launch use cases and others.
+    if (hint_release_start_time_ == 0) {
+      hint_release_start_time_ = systemTime(SYSTEM_TIME_MONOTONIC);
+    }
 
-    if (num_basic_frames_ >= active_refresh_rate_) {
+    nsecs_t current_time = systemTime(SYSTEM_TIME_MONOTONIC);
+    if (nanoseconds_to_milliseconds(current_time - hint_release_start_time_) >=
+        elapse_time_threshold_) {
       cpu_hint_->ReqHintRelease();
     }
     return;
@@ -1600,7 +1604,8 @@
     cpu_hint_->ReqHintsOffload(kPerfHintLargeCompCycle, 0);
   }
 
-  num_basic_frames_ = 0;
+  // Reset time when large composition hint is active
+  hint_release_start_time_ = 0;
 }
 
 void HWCDisplayBuiltIn::ReqPerfHintRelease() {
diff --git a/composer/hwc_display_builtin.h b/composer/hwc_display_builtin.h
index 1ddbb5a..5cd318b 100644
--- a/composer/hwc_display_builtin.h
+++ b/composer/hwc_display_builtin.h
@@ -228,8 +228,9 @@
 
   // Long term large composition hint
   int hwc_tid_ = 0;
-  uint32_t num_basic_frames_ = 0;
   uint32_t large_comp_hint_threshold_ = 0;
+  nsecs_t hint_release_start_time_ = 0;
+  nsecs_t elapse_time_threshold_ = 100;  // Time is in milliseconds
 };
 
 }  // namespace sdm
diff --git a/config/display-product.mk b/config/display-product.mk
index 41df82f..9c59bbc 100644
--- a/config/display-product.mk
+++ b/config/display-product.mk
@@ -123,7 +123,13 @@
 PRODUCT_DEFAULT_PROPERTY_OVERRIDES += ro.surface_flinger.force_hwc_copy_for_virtual_displays=true
 PRODUCT_DEFAULT_PROPERTY_OVERRIDES += ro.surface_flinger.max_frame_buffer_acquired_buffers=3
 PRODUCT_DEFAULT_PROPERTY_OVERRIDES += ro.surface_flinger.max_virtual_display_dimension=4096
+
+#BG blur support
+ifeq ($(TARGET_BOARD_PLATFORM),kalama)
 PRODUCT_DEFAULT_PROPERTY_OVERRIDES += ro.surface_flinger.supports_background_blur=1
+else
+PRODUCT_DEFAULT_PROPERTY_OVERRIDES += ro.surface_flinger.supports_background_blur=0
+endif
 
 ifneq (,$(filter userdebug eng, $(TARGET_BUILD_VARIANT)))
 # Recovery is enabled, logging is enabled
diff --git a/init/init.qti.display_boot.sh b/init/init.qti.display_boot.sh
index e18a1dc..dbc9db3 100644
--- a/init/init.qti.display_boot.sh
+++ b/init/init.qti.display_boot.sh
@@ -96,7 +96,7 @@
        608)
         #SOC ID for Crow is 608
         setprop vendor.display.enable_fb_scaling 0
-        setprop vendor.display.target.version 4
+        setprop vendor.display.target.version 5
         setprop vendor.gralloc.use_dma_buf_heaps 1
         setprop vendor.display.enable_posted_start_dyn 2
         setprop vendor.display.enable_allow_idle_fallback 1
diff --git a/sdm/libs/core/display_builtin.cpp b/sdm/libs/core/display_builtin.cpp
index 1a853be..af0a67c 100644
--- a/sdm/libs/core/display_builtin.cpp
+++ b/sdm/libs/core/display_builtin.cpp
@@ -673,15 +673,6 @@
     }
   }
 
-  if (vsync_enable_) {
-    DTRACE_BEGIN("RegisterVsync");
-    // wait for previous frame's retire fence to signal.
-    Fence::Wait(retire_fence_);
-
-    // Register for vsync and then commit the frame.
-    hw_events_intf_->SetEventState(HWEvent::VSYNC, true);
-    DTRACE_END();
-  }
   // effectively drmModeAtomicAddProperty for SDE_DSPP_HIST_IRQ_V1
   if (histogramSetup) {
     SetDppsFeatureLocked(&histogramIRQ, sizeof(histogramIRQ));