overlay: Add support for using scalar calculations

Add support for using scalar calculations from custom library.
The calculation will override pipe configurations if required on
basis of format, scaling, split display etc.

Change-Id: I53c73431b70b5b339ad09c19ac8792f0fc96aaaa
diff --git a/liboverlay/pipes/overlayGenPipe.cpp b/liboverlay/pipes/overlayGenPipe.cpp
index 35f686c..06e8257 100644
--- a/liboverlay/pipes/overlayGenPipe.cpp
+++ b/liboverlay/pipes/overlayGenPipe.cpp
@@ -28,7 +28,6 @@
 */
 
 #include "overlayGenPipe.h"
-#include "overlay.h"
 #include "mdp_version.h"
 
 namespace overlay {
@@ -47,20 +46,12 @@
     ALOGE_IF(DEBUG_OVERLAY, "GenericPipe init");
     mRotDownscaleOpt = false;
 
-    int fbNum = Overlay::getFbForDpy(mDpy);
-    if( fbNum < 0 ) {
-        ALOGE("%s: Invalid FB for the display: %d",__FUNCTION__, mDpy);
-        return false;
-    }
-
-    ALOGD_IF(DEBUG_OVERLAY,"%s: mFbNum:%d",__FUNCTION__, fbNum);
-
-    if(!mCtrlData.ctrl.init(fbNum)) {
+    if(!mCtrlData.ctrl.init(mDpy)) {
         ALOGE("GenericPipe failed to init ctrl");
         return false;
     }
 
-    if(!mCtrlData.data.init(fbNum)) {
+    if(!mCtrlData.data.init(mDpy)) {
         ALOGE("GenericPipe failed to init data");
         return false;
     }