hwc: Enable downscale feature through system property
Add support to turn the MDP downscale feature ON through the
use of a system property. 'sys.hwc.mdp_downscale_enabled' shall be
set to 'true' in build.prop file to enable this functionality.
This is required for OEMs that might have privacy concerns over panel
size information being exposed.
Change-Id: I354b25b1fdabe5786aed7552f2afccda35412467
diff --git a/libexternal/external.cpp b/libexternal/external.cpp
index 1268b0f..65628aa 100644
--- a/libexternal/external.cpp
+++ b/libexternal/external.cpp
@@ -585,7 +585,8 @@
mHwcContext->dpyAttr[HWC_DISPLAY_EXTERNAL].xres = width;
mHwcContext->dpyAttr[HWC_DISPLAY_EXTERNAL].yres = height;
mHwcContext->dpyAttr[HWC_DISPLAY_EXTERNAL].mDownScaleMode = false;
- if(!qdutils::MDPVersion::getInstance().is8x26()) {
+ if(!qdutils::MDPVersion::getInstance().is8x26()
+ && mHwcContext->mMDPDownscaleEnabled) {
int priW = mHwcContext->dpyAttr[HWC_DISPLAY_PRIMARY].xres;
int priH = mHwcContext->dpyAttr[HWC_DISPLAY_PRIMARY].yres;
// if primary resolution is more than the hdmi resolution