sdm: Add property to enable destination scalar during bootup.
Add property sdm.mixer_resolution to configure the layer mixer
resolution during boot up and switch back to requested mixer
resolution when a layer with higher resolution disappears.
Change-Id: I99f12d5f1a858daa41e41be1ff81833adbe3c651
CRs-Fixed: 1038976
diff --git a/sdm/libs/utils/debug.cpp b/sdm/libs/utils/debug.cpp
index cf60a37..4a8e070 100644
--- a/sdm/libs/utils/debug.cpp
+++ b/sdm/libs/utils/debug.cpp
@@ -30,6 +30,7 @@
#include <stdlib.h>
#include <utils/debug.h>
#include <utils/constants.h>
+#include <string>
namespace sdm {
@@ -161,6 +162,22 @@
return (value == 1);
}
+DisplayError Debug::GetMixerResolution(uint32_t *width, uint32_t *height) {
+ char value[64];
+
+ DisplayError error = debug_.debug_handler_->GetProperty("sdm.mixer_resolution", value);
+ if (error !=kErrorNone) {
+ return error;
+ }
+
+ std::string str(value);
+
+ *width = UINT32(stoi(str));
+ *height = UINT32(stoi(str.substr(str.find('x') + 1)));
+
+ return kErrorNone;
+}
+
bool Debug::GetProperty(const char* property_name, char* value) {
if (debug_.debug_handler_->GetProperty(property_name, value) != kErrorNone) {
return false;