sdm: hwc2: Use mixer resolution

- Use SDM's mixer/FB interface to get the corresponding
  resolution and use in HWC2
- Support API to change layer mixer resolution

Change-Id: I79b43e3d04d97fc7de1bc9df75dce2c955accafd
Crs-fixed: 1026007
diff --git a/sdm/libs/hwc2/hwc_display_primary.cpp b/sdm/libs/hwc2/hwc_display_primary.cpp
index ea2e862..9e2fcce 100644
--- a/sdm/libs/hwc2/hwc_display_primary.cpp
+++ b/sdm/libs/hwc2/hwc_display_primary.cpp
@@ -60,7 +60,7 @@
     return status;
   }
 
-  hwc_display_primary->GetPanelResolution(&primary_width, &primary_height);
+  hwc_display_primary->GetMixerResolution(&primary_width, &primary_height);
   int width = 0, height = 0;
   HWCDebugHandler::Get()->GetProperty("sdm.fb_size_width", &width);
   HWCDebugHandler::Get()->GetProperty("sdm.fb_size_height", &height);
@@ -537,4 +537,12 @@
 }
 
 
+DisplayError HWCDisplayPrimary::SetMixerResolution(uint32_t width, uint32_t height) {
+  return display_intf_->SetMixerResolution(width, height);
+}
+
+DisplayError HWCDisplayPrimary::GetMixerResolution(uint32_t *width, uint32_t *height) {
+  return display_intf_->GetMixerResolution(width, height);
+}
+
 }  // namespace sdm