sdm: Parse UBWC feature from MDP caps

1. Parse "ubwc" string in MDP caps feature list.
2. Add support to read system prop "sdm.debug.rotator_disable_ubwc".

Change-Id: Ie43b81237960e6c1e8784801b10cd39df069cddc
diff --git a/sdm/include/utils/debug.h b/sdm/include/utils/debug.h
index a5a10cd..0bd0429 100644
--- a/sdm/include/utils/debug.h
+++ b/sdm/include/utils/debug.h
@@ -68,6 +68,7 @@
   static bool IsPartialUpdateEnabled();
   static int GetMaxPipesPerMixer(DisplayType display_type);
   static bool IsVideoModeEnabled();
+  static bool IsRotatorUbwcDisabled();
 
  private:
   Debug();
diff --git a/sdm/libs/core/fb/hw_info.cpp b/sdm/libs/core/fb/hw_info.cpp
index 5fcfd70..7ed3d36 100644
--- a/sdm/libs/core/fb/hw_info.cpp
+++ b/sdm/libs/core/fb/hw_info.cpp
@@ -147,6 +147,8 @@
         for (uint32_t i = 0; i < token_count; i++) {
           if (!strncmp(tokens[i], "bwc", strlen("bwc"))) {
             hw_resource->has_bwc = true;
+          } else if (!strncmp(tokens[i], "ubwc", strlen("ubwc"))) {
+            hw_resource->has_ubwc = true;
           } else if (!strncmp(tokens[i], "decimation", strlen("decimation"))) {
             hw_resource->has_decimation = true;
           } else if (!strncmp(tokens[i], "tile_format", strlen("tile_format"))) {
@@ -170,9 +172,9 @@
         hw_resource->num_vig_pipe, hw_resource->num_dma_pipe, hw_resource->num_cursor_pipe);
   DLOGI("Upscale Ratio = %d, Downscale Ratio = %d, Blending Stages = %d", hw_resource->max_scale_up,
         hw_resource->max_scale_down, hw_resource->num_blending_stages);
-  DLOGI("BWC = %d, Decimation = %d, Tile Format = %d, Rotator Downscale = %d", hw_resource->has_bwc,
-        hw_resource->has_decimation, hw_resource->has_macrotile,
-        hw_resource->has_rotator_downscale);
+  DLOGI("BWC = %d, UBWC = %d, Decimation = %d, Tile Format = %d, Rotator Downscale = %d",
+        hw_resource->has_bwc, hw_resource->has_ubwc, hw_resource->has_decimation,
+        hw_resource->has_macrotile, hw_resource->has_rotator_downscale);
   DLOGI("SourceSplit = %d", hw_resource->is_src_split);
   DLOGI("MaxLowBw = %" PRIu64 " , MaxHighBw = % " PRIu64 "", hw_resource->max_bandwidth_low,
         hw_resource->max_bandwidth_high);
diff --git a/sdm/libs/utils/debug.cpp b/sdm/libs/utils/debug.cpp
index 8676546..ada17cd 100644
--- a/sdm/libs/utils/debug.cpp
+++ b/sdm/libs/utils/debug.cpp
@@ -106,5 +106,12 @@
   return (value == 1);
 }
 
+bool Debug::IsRotatorUbwcDisabled() {
+  int value = 0;
+  debug_.debug_handler_->GetProperty("sdm.debug.rotator_disable_ubwc", &value);
+
+  return (value == 1);
+}
+
 }  // namespace sdm