hwc: Add support for configuring maximum mdp layers on secondary

Add support for configuring the maximum mdp layers on secondary
via persist.hwc.maxseclayers property. The default value is 1.

Move the check for max allowed layers to postHeuristicsHandling
rather than it being a part of strategies itself.

Change-Id: Icae6cb7e400fd95f60e0b3eb64e6b768e4dbd861
diff --git a/libhwcomposer/hwc_mdpcomp.h b/libhwcomposer/hwc_mdpcomp.h
index 7fa6674..8929c40 100644
--- a/libhwcomposer/hwc_mdpcomp.h
+++ b/libhwcomposer/hwc_mdpcomp.h
@@ -58,8 +58,6 @@
     static void setMaxPipesPerMixer(const uint32_t value);
 
 protected:
-    enum { MAX_SEC_LAYERS = 1 }; //TODO add property support
-
     enum ePipeType {
         MDPCOMP_OV_RGB = ovutils::OV_MDP_PIPE_RGB,
         MDPCOMP_OV_VG = ovutils::OV_MDP_PIPE_VG,
@@ -258,6 +256,7 @@
     static int sMaxPipesPerMixer;
     static bool sSrcSplitEnabled;
     static IdleInvalidator *sIdleInvalidator;
+    static int sMaxSecLayers;
     struct FrameInfo mCurrentFrame;
     struct LayerCache mCachedFrame;
     //Enable 4kx2k yuv layer split