Merge "sdm: Add support to parse ubwc version."
diff --git a/libdrmutils/drm_interface.h b/libdrmutils/drm_interface.h
index 1fecf77..f7f6bdc 100644
--- a/libdrmutils/drm_interface.h
+++ b/libdrmutils/drm_interface.h
@@ -531,6 +531,7 @@
   uint32_t mnoc_bus_width;
   bool use_baselayer_for_stage = false;
   bool has_micro_idle = false;
+  uint32_t ubwc_version = 1;
 };
 
 enum struct DRMPlaneType {
diff --git a/sde-drm/drm_crtc.cpp b/sde-drm/drm_crtc.cpp
index 1760337..69f9828 100644
--- a/sde-drm/drm_crtc.cpp
+++ b/sde-drm/drm_crtc.cpp
@@ -368,6 +368,7 @@
   string limit_constraint = "limit_usecase=";
   string limit_value = "limit_value=";
   string use_baselayer_for_stage = "use_baselayer_for_stage=";
+  string ubwc_version = "UBWC version=";
 
   while (std::getline(stream, line)) {
     if (line.find(max_blendstages) != string::npos) {
@@ -482,6 +483,8 @@
     } else if (line.find(use_baselayer_for_stage) != string::npos) {
       crtc_info_.use_baselayer_for_stage =
                          std::stoi(string(line, use_baselayer_for_stage.length()));
+    } else if (line.find(ubwc_version) != string::npos) {
+      crtc_info_.ubwc_version = (std::stoi(string(line, ubwc_version.length()))) >> 28;
     }
   }
   drmModeFreePropertyBlob(blob);
diff --git a/sdm/include/private/hw_info_types.h b/sdm/include/private/hw_info_types.h
index df581c2..a11484a 100644
--- a/sdm/include/private/hw_info_types.h
+++ b/sdm/include/private/hw_info_types.h
@@ -349,6 +349,7 @@
   uint32_t mnoc_bus_width = 32;
   bool use_baselayer_for_stage = false;
   bool has_micro_idle = false;
+  uint32_t ubwc_version = 1;
 };
 
 struct HWSplitInfo {
diff --git a/sdm/libs/core/drm/hw_info_drm.cpp b/sdm/libs/core/drm/hw_info_drm.cpp
index 50489d5..9f5331d 100644
--- a/sdm/libs/core/drm/hw_info_drm.cpp
+++ b/sdm/libs/core/drm/hw_info_drm.cpp
@@ -344,6 +344,7 @@
   hw_resource->num_mnocports = info.num_mnocports ? info.num_mnocports : 2;
   hw_resource->mnoc_bus_width = info.mnoc_bus_width ? info.mnoc_bus_width : 32;
   hw_resource->use_baselayer_for_stage = info.use_baselayer_for_stage;
+  hw_resource->ubwc_version = info.ubwc_version;
 }
 
 void HWInfoDRM::GetHWPlanesInfo(HWResourceInfo *hw_resource) {