sdm: Add support to simulate reduced configuration
Add support to simulate reduce plane configuration.
Change-Id: Ic4633668ff255840af3a175a66d553ee017bb27b
CRs-Fixed: 2071452
diff --git a/sdm/libs/utils/debug.cpp b/sdm/libs/utils/debug.cpp
index 95b4e3b..592be68 100644
--- a/sdm/libs/utils/debug.cpp
+++ b/sdm/libs/utils/debug.cpp
@@ -1,5 +1,5 @@
/*
-* Copyright (c) 2014 - 2016, The Linux Foundation. All rights reserved.
+* Copyright (c) 2014 - 2017, The Linux Foundation. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
@@ -190,6 +190,22 @@
return kErrorNone;
}
+DisplayError Debug::GetReducedConfig(uint32_t *num_vig_pipes, uint32_t *num_dma_pipes) {
+ char value[64] = {};
+
+ DisplayError error = debug_.debug_handler_->GetProperty("sdm.debug.reduced_config", value);
+ if (error != kErrorNone) {
+ return error;
+ }
+
+ std::string str(value);
+
+ *num_vig_pipes = UINT32(stoi(str));
+ *num_dma_pipes = UINT32(stoi(str.substr(str.find('x') + 1)));
+
+ return kErrorNone;
+}
+
int Debug::GetExtMaxlayers() {
int max_external_layers = 0;
debug_.debug_handler_->GetProperty("sdm.max_external_layers", &max_external_layers);