Skip to content

Commit ccd30e4

Browse files
ljia5sysopenci
authored andcommitted
Refine hdcpd and hdcpTestutily
1. Remove unsed source code 2. Rename USES_IA_HWCOMPOSER define Tracked-On: OAM-130842 Signed-off-by: Jia, Lin A <lin.a.jia@intel.com>
1 parent dbd9299 commit ccd30e4

6 files changed

Lines changed: 12 additions & 66 deletions

File tree

daemon/Android.bp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ cc_binary {
2424

2525
cppflags: [
2626
"-DANDROID",
27-
"-DUSES_IA_HWCOMPOSER",
27+
"-DUSES_HDCP_HWCOMPOSER",
2828
"-DANDROID_VERSION=800",
2929
"-DLOG_TAG=\"HDCPD\"",
3030
] + ["-DLOG_CONSOLE"] + [ // LOG_CONSOLE will print ALOGI, ALOGE, ALOGW in Android. Enable on debug build

daemon/portmanager.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1449,7 +1449,7 @@ int32_t PortManagerHWComposer::SetPortProperty(
14491449

14501450
android::ProcessState::initWithDriver(BINDER_IPC);
14511451

1452-
#ifdef USES_IA_HWCOMPOSER
1452+
#ifdef USES_HDCP_HWCOMPOSER
14531453
HDCP_NORMALMESSAGE("PortManagerHWComposer::SetPortProperty hwcService_Connect");
14541454
// Connect to HWC service
14551455
HWCSHANDLE hwcs = HwcService_Connect();

daemon/portmanager.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,15 +37,15 @@
3737

3838
#ifdef ANDROID
3939

40-
#ifdef USES_IA_HWCOMPOSER
40+
#ifdef USES_HDCP_HWCOMPOSER
4141
#include <hwcserviceapi.h>
4242
#endif
4343

4444
#include <log/log.h>
4545
#include <binder/IServiceManager.h>
4646
#include <binder/ProcessState.h>
4747

48-
#ifdef USES_IA_HWCOMPOSER
48+
#ifdef USES_HDCP_HWCOMPOSER
4949
#include <iservice.h>
5050
#endif
5151

daemon/portmanager_android.cpp

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -31,15 +31,15 @@
3131
#include "portmanager.h"
3232
#include "portmanager_android.h"
3333

34-
#ifdef USES_IA_HWCOMPOSER
34+
#ifdef USES_HDCP_HWCOMPOSER
3535
#include <hwcserviceapi.h>
3636
#endif
3737

3838
#include <log/log.h>
3939
#include <binder/IServiceManager.h>
4040
#include <binder/ProcessState.h>
4141

42-
#ifdef USES_IA_HWCOMPOSER
42+
#ifdef USES_HDCP_HWCOMPOSER
4343
#include <iservice.h>
4444
#endif
4545

@@ -131,7 +131,7 @@ int32_t setPortProperty_hwcservice(int32_t m_DrmFd,
131131

132132
android::ProcessState::initWithDriver("/dev/vndbinder");
133133

134-
#ifdef USES_IA_HWCOMPOSER
134+
#ifdef USES_HDCP_HWCOMPOSER
135135
// Connect to HWC service
136136
HWCSHANDLE hwcs = HwcService_Connect();
137137
if (hwcs == NULL) {
@@ -156,18 +156,16 @@ int32_t setPortProperty_hwcservice(int32_t m_DrmFd,
156156
for (uint32_t i = 0; i < numRetry; ++i)
157157
{
158158

159-
#ifdef USES_IA_HWCOMPOSER
159+
#ifdef USES_HDCP_HWCOMPOSER
160160
if(propId == drmObject->GetPropertyId(CONTENT_PROTECTION))
161161
{
162-
HDCP_ASSERTMESSAGE("Attempting HDCP Enable, value =%d", value);
163-
HDCP_ASSERTMESSAGE("Attempting HDCP Enable, propValue =%d", propValue);
162+
HDCP_ASSERTMESSAGE("Attempting HDCP Enable, value =%d, propValue =%d", value, propValue);
164163
ret = HwcService_Video_EnableHDCPSession_ForDisplay(
165164
hwcs, drmId, (EHwcsContentType)propValue);
166165
} else if(propId == drmObject->GetPropertyId(CP_CONTENT_TYPE))
167166
{
168167
//This is only for HDCP2.2
169-
HDCP_ASSERTMESSAGE("Attempting HDCP Enable Type, value =%d", value);
170-
HDCP_ASSERTMESSAGE("Attempting HDCP Enable Type, propValue =%d", propValue);
168+
HDCP_ASSERTMESSAGE("Attempting HDCP Enable, value =%d, propValue =%d", value, propValue);
171169
ret = HwcService_Video_EnableHDCPSession_ForDisplay(
172170
hwcs, drmId, (EHwcsContentType)propValue);
173171
} else if(propId == drmObject->GetPropertyId(CP_SRM))
@@ -212,15 +210,15 @@ int32_t setPortProperty_hwcservice(int32_t m_DrmFd,
212210

213211
if (SUCCESS != ret)
214212
{
215-
#ifdef USES_IA_HWCOMPOSER
213+
#ifdef USES_HDCP_HWCOMPOSER
216214
HwcService_Disconnect(hwcs);
217215
#endif
218216
HDCP_ASSERTMESSAGE("Failed to Enable HDCP");
219217
HDCP_FUNCTION_EXIT(EBUSY);
220218
return EBUSY;
221219
}
222220

223-
#ifdef USES_IA_HWCOMPOSER
221+
#ifdef USES_HDCP_HWCOMPOSER
224222
HwcService_Disconnect(hwcs);
225223
#endif
226224
HDCP_FUNCTION_EXIT(SUCCESS);

test/CMakeLists.txt

Lines changed: 0 additions & 22 deletions
This file was deleted.

test/hdcpTestUtility/CMakeLists.txt

Lines changed: 0 additions & 30 deletions
This file was deleted.

0 commit comments

Comments
 (0)