Limit #ROT-SESSIONS to 4 in LayerRotMap and RotMgr

* Limit the number of rotator sessions to 4 both in
LayerRotMap and RotMgr structures

* Make use of MDPVersion getter fuctions to check
for maxMixerWidth and maxDownScale supported by MDP

Change-Id: I27dac877807fbb4ed6fcb3500a3a318a2ef5d8b2
diff --git a/libhwcomposer/hwc_utils.cpp b/libhwcomposer/hwc_utils.cpp
index 3696c05..8bed0fb 100644
--- a/libhwcomposer/hwc_utils.cpp
+++ b/libhwcomposer/hwc_utils.cpp
@@ -879,7 +879,7 @@
             ctx->listStats[dpy].yuvIndices[yuvCount] = (int)i;
             yuvCount++;
 
-            if(UNLIKELY(is4kx2kYuvBuffer(hnd))){
+            if(UNLIKELY(isYUVSplitNeeded(hnd))){
                 int& yuv4k2kCount = ctx->listStats[dpy].yuv4k2kCount;
                 ctx->listStats[dpy].yuv4k2kIndices[yuv4k2kCount] = (int)i;
                 yuv4k2kCount++;
@@ -2211,14 +2211,14 @@
 }
 
 void LayerRotMap::add(hwc_layer_1_t* layer, Rotator *rot) {
-    if(mCount >= MAX_SESS) return;
+    if(mCount >= RotMgr::MAX_ROT_SESS) return;
     mLayer[mCount] = layer;
     mRot[mCount] = rot;
     mCount++;
 }
 
 void LayerRotMap::reset() {
-    for (int i = 0; i < MAX_SESS; i++) {
+    for (int i = 0; i < RotMgr::MAX_ROT_SESS; i++) {
         mLayer[i] = 0;
         mRot[i] = 0;
     }