summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJi Soo Shin <jisshin@google.com>2023-02-17 14:42:45 +0100
committerJi Soo Shin <jisshin@google.com>2023-02-17 15:37:54 +0100
commit825bbfa57cf01ff20ab6d2f8eaa32f1bef12effd (patch)
treea1c2dd5b94d982ec59b56f804b067b55fe4e3e93
parent4609bfa4d9d39210e953322fdc73dd4a3cd46c5c (diff)
downloadsamsung-825bbfa57cf01ff20ab6d2f8eaa32f1bef12effd.tar.gz
zuma: fix selftest regression
New widevine TA check_protection now returns HDCP_NO_DIGITAL_OUTPUT during authentication. Additionally, it requires authentication within 3 seconds which means declaring DP_CONNECT isn't fast enough (which waits 2.5 seconds before triggering HDCP auth). Bug: 243411142 Test: "echo 1 > /dev/hdcp2" Change-Id: I1c85a13213091979c1f280cfca5650f78c8ccb08 Signed-off-by: Ji Soo Shin <jisshin@google.com>
-rw-r--r--exynos-hdcp2-selftest.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/exynos-hdcp2-selftest.c b/exynos-hdcp2-selftest.c
index 8596a81..b831267 100644
--- a/exynos-hdcp2-selftest.c
+++ b/exynos-hdcp2-selftest.c
@@ -23,6 +23,9 @@
#include "exynos-hdcp2.h"
#include "exynos-hdcp2-log.h"
+#define HDCP_NO_DIGITAL_OUTPUT (0xff)
+#define HDCP_V2_2 (4)
+
static const uint8_t cert_rx[] = {
0x74, 0x5b, 0xb8, 0xbd, 0x04, 0xaf, 0xb5, 0xc5, 0xc6, 0x7b, 0xc5, 0x3a,
0x34, 0x90, 0xa9, 0x54, 0xc0, 0x8f, 0xb7, 0xeb, 0xa1, 0x54, 0xd2, 0x4f,
@@ -226,7 +229,7 @@ static int dp_hdcp_protocol_self_test_internal(void) {
size_t i;
int rc, version;
- hdcp_dplink_connect_state(DP_CONNECT);
+ hdcp_dplink_connect_state(DP_HDCP_READY);
rc = hdcp_tee_send_cmd(HDCP_CMD_AUTH_START);
if (rc) {
@@ -241,12 +244,12 @@ static int dp_hdcp_protocol_self_test_internal(void) {
hdcp_err("checking protection failed: %d", rc);
return rc;
}
- if (version != -1)
+ if (version != HDCP_NO_DIGITAL_OUTPUT)
break;
msleep(100);
}
- if (version != 4) {
+ if (version != HDCP_V2_2) {
hdcp_err("FAIL selftest: %d\n", version);
return -1;
}