summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorlychen <li.y.chen@intel.com>2014-12-04 11:38:32 -0800
committerPatrick Tjin <pattjin@google.com>2014-12-08 21:44:39 -0800
commit338356d75562d043b80bbc9b1c8c545ab2bc656d (patch)
treeb394eaf80ca4471637f4f800c994b83c678fafc0
parent3dd3c7bfa5bfb28bf5eaca814f3070c387ba358e (diff)
downloadhwcomposer-lollipop-mr1-dev.tar.gz
reduce the log spam attributed to HDCP statuslollipop-mr1-dev
Bug: 18535185 BZ: 229991 Change-Id: I8e2a6f5f5f83bcb51fc4b180a855420b2fd15175 Signed-off-by: lychen <li.y.chen@intel.com>
-rw-r--r--ips/common/HdcpControl.cpp19
-rw-r--r--ips/common/HdcpControl.h1
2 files changed, 17 insertions, 3 deletions
diff --git a/ips/common/HdcpControl.cpp b/ips/common/HdcpControl.cpp
index b250ece..c574f03 100644
--- a/ips/common/HdcpControl.cpp
+++ b/ips/common/HdcpControl.cpp
@@ -36,7 +36,8 @@ HdcpControl::HdcpControl()
mStopped(true),
mAuthenticated(false),
mActionDelay(0),
- mAuthRetryCount(0)
+ mAuthRetryCount(0),
+ mEnableAuthenticationLog(true)
{
}
@@ -173,9 +174,17 @@ bool HdcpControl::enableAuthentication()
int fd = Hwcomposer::getInstance().getDrm()->getDrmFd();
int ret = drmCommandNone(fd, DRM_PSB_ENABLE_HDCP);
if (ret != 0) {
- ELOGTRACE("failed to enable HDCP authentication");
+ if (mEnableAuthenticationLog) {
+ ELOGTRACE("failed to enable HDCP authentication");
+ } else {
+ VLOGTRACE("failed to enable HDCP authentication");
+ }
+
+ mEnableAuthenticationLog = false;
return false;
}
+
+ mEnableAuthenticationLog = true;
return true;
}
@@ -275,7 +284,11 @@ bool HdcpControl::runHdcp()
}
if (!enableAuthentication()) {
- ELOGTRACE("HDCP authentication failed. Retry");
+ if (mAuthenticated)
+ ELOGTRACE("HDCP authentication failed. Retry");
+ else
+ VLOGTRACE("HDCP authentication failed. Retry");
+
mAuthenticated = false;
ret = true;
} else {
diff --git a/ips/common/HdcpControl.h b/ips/common/HdcpControl.h
index 301ee96..350260c 100644
--- a/ips/common/HdcpControl.h
+++ b/ips/common/HdcpControl.h
@@ -76,6 +76,7 @@ protected:
bool mAuthenticated;
int mActionDelay; // in milliseconds
uint32_t mAuthRetryCount;
+ bool mEnableAuthenticationLog;
private:
DECLARE_THREAD(HdcpControlThread, HdcpControl);