qdutils : Retain the system property for default idle time.

Single idle time value is not working well on all targets as
power saving is dependent on specific GPU behavior on the device.
We need to come up with per target default idle time based on power
profiling. Retain the property to set default idle time per target.

Change-Id: I7ab4030f3e0078f96b504e5634cb7d96aeea60d5
diff --git a/libqdutils/idle_invalidator.cpp b/libqdutils/idle_invalidator.cpp
index 5850ce5..b8db0bf 100644
--- a/libqdutils/idle_invalidator.cpp
+++ b/libqdutils/idle_invalidator.cpp
@@ -32,6 +32,7 @@
 #include <poll.h>
 #include <string.h>
 #include <fcntl.h>
+#include <cutils/properties.h>
 
 #define II_DEBUG 0
 #define IDLE_NOTIFY_PATH "/sys/devices/virtual/graphics/fb0/idle_notify"
@@ -65,8 +66,12 @@
         return -1;
     }
 
-    enum {DEFAULT_IDLE_TIME = 70}; //ms
-    if(not setIdleTimeout(DEFAULT_IDLE_TIME)) {
+    int defaultIdleTime = 70; //ms
+    char property[PROPERTY_VALUE_MAX] = {0};
+    if((property_get("debug.mdpcomp.idletime", property, NULL) > 0)) {
+        defaultIdleTime = atoi(property);
+    }
+    if(not setIdleTimeout(defaultIdleTime)) {
         close(mTimeoutEventFd);
         mTimeoutEventFd = -1;
         return -1;