hwc: Add setting to disable idleinvalidator

Added the ability to disable idleInvalidator when the
debug.mdpcomp.idletime property is set to "-1". The hwc test app
displays image on the screen with surface flinger turned off.
This causes timeout, so this change is to allow the testapp to
disable the timeout functionality by setting property.

Change-Id: I1adf28eea33ea73f3695644bec95056d16bd85f8
diff --git a/libhwcomposer/hwc_mdpcomp.cpp b/libhwcomposer/hwc_mdpcomp.cpp
index 2103cb4..f13a73a 100644
--- a/libhwcomposer/hwc_mdpcomp.cpp
+++ b/libhwcomposer/hwc_mdpcomp.cpp
@@ -119,14 +119,15 @@
             sMaxPipesPerMixer = min(val, MAX_PIPES_PER_MIXER);
     }
 
-    unsigned long idle_timeout = DEFAULT_IDLE_TIME;
+    long idle_timeout = DEFAULT_IDLE_TIME;
     if(property_get("debug.mdpcomp.idletime", property, NULL) > 0) {
         if(atoi(property) != 0)
             idle_timeout = atoi(property);
     }
 
-    //create Idle Invalidator
-    idleInvalidator = IdleInvalidator::getInstance();
+    //create Idle Invalidator only when not disabled through property
+    if(idle_timeout != -1)
+        idleInvalidator = IdleInvalidator::getInstance();
 
     if(idleInvalidator == NULL) {
         ALOGE("%s: failed to instantiate idleInvalidator object", __FUNCTION__);