libexternal: Restrict external mdp downscale to 1080p
Enable MDP downscale feature on External display upto 1080p.
If primary is 2560x1600 and hdmi is 1080p, do not perform
MDP downscale for hdmi.
Change-Id: Ie835a71c293ca3f56c4ab62de96e38b51ded0dd7
diff --git a/libexternal/external.cpp b/libexternal/external.cpp
index 609f9c1..045edd8 100644
--- a/libexternal/external.cpp
+++ b/libexternal/external.cpp
@@ -588,7 +588,9 @@
// if primary resolution is more than the hdmi resolution
// configure dpy attr to primary resolution and set
// downscale mode
- if((priW * priH) > (width * height)) {
+ // Restrict this upto 1080p resolution max
+ if(((priW * priH) > (width * height)) &&
+ (priW <= qdutils::MAX_DISPLAY_DIM )) {
mHwcContext->dpyAttr[HWC_DISPLAY_EXTERNAL].xres = priW;
mHwcContext->dpyAttr[HWC_DISPLAY_EXTERNAL].yres = priH;
// HDMI is always in landscape, so always assign the higher