hwc/qdutils/qservice: Add dynamic idle timeout support
Add support for dynamically setting idle timeout values.
Move default idle timeout setting to IdleInvalidator.
Fix static var naming, handle errors from IdleInvalidator in hwc.
Property debug.hwc.idletime is removed with this change.
Example:
1) Set idle timeout to 100ms
adb shell service call display.qservice 16 i32 100
16 is the code for SET_IDLE_TIMEOUT, 100 is time in ms
2) Disable idle timeout
adb shell service call display.qservice 16 i32 0
Change-Id: I60e15a3ac869b4e9f4015b3be50a35c90d00d404
diff --git a/libhwcomposer/hwc_mdpcomp.h b/libhwcomposer/hwc_mdpcomp.h
index e43c4f4..268e9aa 100644
--- a/libhwcomposer/hwc_mdpcomp.h
+++ b/libhwcomposer/hwc_mdpcomp.h
@@ -25,7 +25,6 @@
#include <cutils/properties.h>
#include <overlay.h>
-#define DEFAULT_IDLE_TIME 70
#define MAX_PIPES_PER_MIXER 4
namespace overlay {
@@ -57,6 +56,7 @@
static void resetIdleFallBack() { sIdleFallBack = false; }
static bool isIdleFallback() { return sIdleFallBack; }
static void dynamicDebug(bool enable){ sDebugLogs = enable; }
+ static void setIdleTimeout(const uint32_t& timeout);
protected:
enum { MAX_SEC_LAYERS = 1 }; //TODO add property support
@@ -255,7 +255,7 @@
static bool sHandleTimeout;
static int sMaxPipesPerMixer;
static bool sSrcSplitEnabled;
- static IdleInvalidator *idleInvalidator;
+ static IdleInvalidator *sIdleInvalidator;
struct FrameInfo mCurrentFrame;
struct LayerCache mCachedFrame;
//Enable 4kx2k yuv layer split