CHROMIUM: drm/rockchip: Improve cdn hdcp error messages

Add a message for start hdcp transfer failure (instead of using the same
one below the loop), and print the errors in hex as opposed to decimal.

BUG=b:63816472
TEST=Try enabling HDCP on kevin with busted firmware, get the correct msg

Signed-off-by: Sean Paul <seanpaul@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/657937
Commit-Ready: Sean Paul <seanpaul@google.com>
Tested-by: Sean Paul <seanpaul@google.com>
Reviewed-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Kristian H. Kristensen <hoegsberg@chromium.org>

Change-Id: I746574e26b200d746a7a228c868dd22e1b82cae8
Signed-off-by: Wyon Bi <bivvy.bi@rock-chips.com>
This commit is contained in:
Sean Paul
2017-09-07 14:27:21 -04:00
committed by Tao Huang
parent effb787b85
commit b26e4d8db2

View File

@@ -214,6 +214,11 @@ static int cdn_dp_start_hdcp1x_auth(struct cdn_dp_device *dp)
arm_smccc_smc(RK_SIP_HDCP_CONTROL, HDCP_KEY_DATA_START_TRANSFER,
0, 0, 0, 0, 0, 0, &res);
if (res.a0) {
dev_err(dp->dev, "start hdcp transfer failed: %#lx\n", res.a0);
ret = -EIO;
goto out;
}
BUILD_BUG_ON(sizeof(dp->key) % 6);
for (buf = (uint64_t *)&dp->key;
@@ -223,7 +228,7 @@ static int cdn_dp_start_hdcp1x_auth(struct cdn_dp_device *dp)
buf[2], buf[3], buf[4], buf[5], 0, &res);
if (res.a0) {
dev_err(dp->dev, "send hdcp keys failed: %ld\n", res.a0);
dev_err(dp->dev, "send hdcp keys failed: %#lx\n", res.a0);
ret = -EIO;
goto out;
}
@@ -1235,7 +1240,7 @@ static bool cdn_dp_hdcp_authorize(struct cdn_dp_device *dp)
if (ret)
goto out;
if (HDCP_TX_STATUS_ERROR(tx_status)) {
dev_err(dp->dev, "hdcp status error: %x\n",
dev_err(dp->dev, "hdcp status error: %#x\n",
HDCP_TX_STATUS_ERROR(tx_status));
goto out;
} else if (tx_status & HDCP_TX_STATUS_AUTHENTICATED) {