sdm: Do not allow decimation on UBWC framebuffer

MDP hardware cannot apply decimation on UBWC tiled framebuffer.

CRs-Fixed: 867832

Change-Id: I6f2f37955ac9e2b4a6d7888c146930dd3863f385
diff --git a/sdm/libs/utils/debug.cpp b/sdm/libs/utils/debug.cpp
index 4df63d9..33f94b9 100644
--- a/sdm/libs/utils/debug.cpp
+++ b/sdm/libs/utils/debug.cpp
@@ -120,5 +120,18 @@
   return (value == 1);
 }
 
+bool Debug::IsUbwcTiledFrameBuffer() {
+  int ubwc_disabled = 0;
+  int ubwc_framebuffer = 0;
+
+  debug_.debug_handler_->GetProperty("debug.gralloc.gfx_ubwc_disable", &ubwc_disabled);
+
+  if (!ubwc_disabled) {
+    debug_.debug_handler_->GetProperty("debug.gralloc.enable_fb_ubwc", &ubwc_framebuffer);
+  }
+
+  return (ubwc_framebuffer == 1);
+}
+
 }  // namespace sdm