disp: msm: dp: Add event logs for HDCP sessions
Add event logs to capture HDCP state transitions and errors. Change-Id: Id82049b93eb2e8bf84faddebaa0959f8cda1c91f Signed-off-by: poyewu <poyewu@codeaurora.org>
This commit is contained in:
@@ -415,6 +415,7 @@ static void dp_display_hdcp_process_delayed_off(struct dp_display_private *dp)
|
|||||||
static int dp_display_hdcp_process_sink_sync(struct dp_display_private *dp)
|
static int dp_display_hdcp_process_sink_sync(struct dp_display_private *dp)
|
||||||
{
|
{
|
||||||
u8 sink_status = 0;
|
u8 sink_status = 0;
|
||||||
|
SDE_EVT32_EXTERNAL(SDE_EVTLOG_FUNC_ENTRY);
|
||||||
|
|
||||||
if (dp->debug->hdcp_wait_sink_sync) {
|
if (dp->debug->hdcp_wait_sink_sync) {
|
||||||
drm_dp_dpcd_readb(dp->aux->drm_aux, DP_SINK_STATUS,
|
drm_dp_dpcd_readb(dp->aux->drm_aux, DP_SINK_STATUS,
|
||||||
@@ -433,6 +434,7 @@ static int dp_display_hdcp_process_sink_sync(struct dp_display_private *dp)
|
|||||||
*/
|
*/
|
||||||
msleep(6000);
|
msleep(6000);
|
||||||
}
|
}
|
||||||
|
SDE_EVT32_EXTERNAL(SDE_EVTLOG_FUNC_EXIT);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
@@ -579,6 +581,8 @@ static void dp_display_notify_hdcp_status_cb(void *ptr,
|
|||||||
enum sde_hdcp_state state)
|
enum sde_hdcp_state state)
|
||||||
{
|
{
|
||||||
struct dp_display_private *dp = ptr;
|
struct dp_display_private *dp = ptr;
|
||||||
|
SDE_EVT32_EXTERNAL(SDE_EVTLOG_FUNC_ENTRY,
|
||||||
|
dp->link->hdcp_status.hdcp_state);
|
||||||
|
|
||||||
if (!dp) {
|
if (!dp) {
|
||||||
DP_ERR("invalid input\n");
|
DP_ERR("invalid input\n");
|
||||||
@@ -588,6 +592,8 @@ static void dp_display_notify_hdcp_status_cb(void *ptr,
|
|||||||
dp->link->hdcp_status.hdcp_state = state;
|
dp->link->hdcp_status.hdcp_state = state;
|
||||||
|
|
||||||
queue_delayed_work(dp->wq, &dp->hdcp_cb_work, HZ/4);
|
queue_delayed_work(dp->wq, &dp->hdcp_cb_work, HZ/4);
|
||||||
|
SDE_EVT32_EXTERNAL(SDE_EVTLOG_FUNC_EXIT,
|
||||||
|
dp->link->hdcp_status.hdcp_state);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void dp_display_deinitialize_hdcp(struct dp_display_private *dp)
|
static void dp_display_deinitialize_hdcp(struct dp_display_private *dp)
|
||||||
|
@@ -178,6 +178,7 @@ static int dp_hdcp2p2_wakeup(struct hdcp_transport_wakeup_data *data)
|
|||||||
{
|
{
|
||||||
struct dp_hdcp2p2_ctrl *ctrl;
|
struct dp_hdcp2p2_ctrl *ctrl;
|
||||||
|
|
||||||
|
SDE_EVT32_EXTERNAL(SDE_EVTLOG_FUNC_ENTRY);
|
||||||
if (!data) {
|
if (!data) {
|
||||||
DP_ERR("invalid input\n");
|
DP_ERR("invalid input\n");
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
@@ -211,6 +212,7 @@ static int dp_hdcp2p2_wakeup(struct hdcp_transport_wakeup_data *data)
|
|||||||
}
|
}
|
||||||
|
|
||||||
exit:
|
exit:
|
||||||
|
SDE_EVT32_EXTERNAL(SDE_EVTLOG_FUNC_EXIT, data->cmd);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -387,6 +389,10 @@ static int dp_hdcp2p2_aux_read_message(struct dp_hdcp2p2_ctrl *ctrl)
|
|||||||
if (bytes_read != read_size) {
|
if (bytes_read != read_size) {
|
||||||
DP_ERR("fail: offset(0x%x), size(0x%x), rc(0x%x)\n",
|
DP_ERR("fail: offset(0x%x), size(0x%x), rc(0x%x)\n",
|
||||||
offset, read_size, bytes_read);
|
offset, read_size, bytes_read);
|
||||||
|
SDE_EVT32_EXTERNAL(SDE_EVTLOG_FUNC_ENTRY,
|
||||||
|
offset,
|
||||||
|
read_size,
|
||||||
|
bytes_read);
|
||||||
rc = -EINVAL;
|
rc = -EINVAL;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@@ -423,6 +429,10 @@ static int dp_hdcp2p2_aux_write_message(struct dp_hdcp2p2_ctrl *ctrl,
|
|||||||
if (bytes_written != write_size) {
|
if (bytes_written != write_size) {
|
||||||
DP_ERR("fail: offset(0x%x), size(0x%x), rc(0x%x)\n",
|
DP_ERR("fail: offset(0x%x), size(0x%x), rc(0x%x)\n",
|
||||||
offset, write_size, bytes_written);
|
offset, write_size, bytes_written);
|
||||||
|
SDE_EVT32_EXTERNAL(SDE_EVTLOG_FUNC_ENTRY,
|
||||||
|
offset,
|
||||||
|
write_size,
|
||||||
|
bytes_written);
|
||||||
rc = -EINVAL;
|
rc = -EINVAL;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@@ -474,6 +484,7 @@ static void dp_hdcp2p2_send_msg(struct dp_hdcp2p2_ctrl *ctrl)
|
|||||||
int rc = 0;
|
int rc = 0;
|
||||||
struct sde_hdcp_2x_wakeup_data cdata = {HDCP_2X_CMD_INVALID};
|
struct sde_hdcp_2x_wakeup_data cdata = {HDCP_2X_CMD_INVALID};
|
||||||
|
|
||||||
|
SDE_EVT32_EXTERNAL(SDE_EVTLOG_FUNC_ENTRY);
|
||||||
if (!ctrl) {
|
if (!ctrl) {
|
||||||
DP_ERR("invalid input\n");
|
DP_ERR("invalid input\n");
|
||||||
rc = -EINVAL;
|
rc = -EINVAL;
|
||||||
@@ -509,6 +520,7 @@ exit:
|
|||||||
cdata.cmd = HDCP_2X_CMD_MSG_SEND_FAILED;
|
cdata.cmd = HDCP_2X_CMD_MSG_SEND_FAILED;
|
||||||
|
|
||||||
dp_hdcp2p2_wakeup_lib(ctrl, &cdata);
|
dp_hdcp2p2_wakeup_lib(ctrl, &cdata);
|
||||||
|
SDE_EVT32_EXTERNAL(SDE_EVTLOG_FUNC_EXIT, cdata.cmd);
|
||||||
}
|
}
|
||||||
|
|
||||||
static int dp_hdcp2p2_get_msg_from_sink(struct dp_hdcp2p2_ctrl *ctrl)
|
static int dp_hdcp2p2_get_msg_from_sink(struct dp_hdcp2p2_ctrl *ctrl)
|
||||||
@@ -663,6 +675,7 @@ static int dp_hdcp2p2_cp_irq(void *input)
|
|||||||
{
|
{
|
||||||
int rc;
|
int rc;
|
||||||
struct dp_hdcp2p2_ctrl *ctrl = input;
|
struct dp_hdcp2p2_ctrl *ctrl = input;
|
||||||
|
SDE_EVT32_EXTERNAL(SDE_EVTLOG_FUNC_ENTRY);
|
||||||
|
|
||||||
rc = dp_hdcp2p2_valid_handle(ctrl);
|
rc = dp_hdcp2p2_valid_handle(ctrl);
|
||||||
if (rc)
|
if (rc)
|
||||||
@@ -691,6 +704,7 @@ static int dp_hdcp2p2_cp_irq(void *input)
|
|||||||
|
|
||||||
kfifo_put(&ctrl->cmd_q, HDCP_TRANSPORT_CMD_LINK_CHECK);
|
kfifo_put(&ctrl->cmd_q, HDCP_TRANSPORT_CMD_LINK_CHECK);
|
||||||
wake_up(&ctrl->wait_q);
|
wake_up(&ctrl->wait_q);
|
||||||
|
SDE_EVT32_EXTERNAL(SDE_EVTLOG_FUNC_EXIT);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@@ -151,6 +151,7 @@ static const struct sde_hdcp_2x_msg_data
|
|||||||
static int sde_hdcp_2x_get_next_message(struct sde_hdcp_2x_ctrl *hdcp,
|
static int sde_hdcp_2x_get_next_message(struct sde_hdcp_2x_ctrl *hdcp,
|
||||||
struct hdcp_transport_wakeup_data *data)
|
struct hdcp_transport_wakeup_data *data)
|
||||||
{
|
{
|
||||||
|
SDE_EVT32_EXTERNAL(SDE_EVTLOG_FUNC_ENTRY, hdcp->last_msg);
|
||||||
switch (hdcp->last_msg) {
|
switch (hdcp->last_msg) {
|
||||||
case INVALID_MESSAGE:
|
case INVALID_MESSAGE:
|
||||||
return AKE_INIT;
|
return AKE_INIT;
|
||||||
@@ -202,6 +203,7 @@ static int sde_hdcp_2x_get_next_message(struct sde_hdcp_2x_ctrl *hdcp,
|
|||||||
pr_err("Unknown message ID (%d)\n", hdcp->last_msg);
|
pr_err("Unknown message ID (%d)\n", hdcp->last_msg);
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
}
|
}
|
||||||
|
SDE_EVT32_EXTERNAL(SDE_EVTLOG_FUNC_EXIT);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void sde_hdcp_2x_wait_for_response(struct sde_hdcp_2x_ctrl *hdcp)
|
static void sde_hdcp_2x_wait_for_response(struct sde_hdcp_2x_ctrl *hdcp)
|
||||||
@@ -351,6 +353,7 @@ static void sde_hdcp_2x_clean(struct sde_hdcp_2x_ctrl *hdcp)
|
|||||||
struct sde_hdcp_stream *stream_entry;
|
struct sde_hdcp_stream *stream_entry;
|
||||||
struct hdcp_transport_wakeup_data cdata = {HDCP_TRANSPORT_CMD_INVALID};
|
struct hdcp_transport_wakeup_data cdata = {HDCP_TRANSPORT_CMD_INVALID};
|
||||||
|
|
||||||
|
SDE_EVT32_EXTERNAL(SDE_EVTLOG_FUNC_ENTRY, hdcp->authenticated);
|
||||||
hdcp->authenticated = false;
|
hdcp->authenticated = false;
|
||||||
|
|
||||||
cdata.context = hdcp->client_data;
|
cdata.context = hdcp->client_data;
|
||||||
@@ -372,6 +375,7 @@ static void sde_hdcp_2x_clean(struct sde_hdcp_2x_ctrl *hdcp)
|
|||||||
sde_hdcp_2x_wakeup_client(hdcp, &cdata);
|
sde_hdcp_2x_wakeup_client(hdcp, &cdata);
|
||||||
|
|
||||||
hdcp2_app_comm(hdcp->hdcp2_ctx, HDCP2_CMD_STOP, &hdcp->app_data);
|
hdcp2_app_comm(hdcp->hdcp2_ctx, HDCP2_CMD_STOP, &hdcp->app_data);
|
||||||
|
SDE_EVT32_EXTERNAL(SDE_EVTLOG_FUNC_EXIT, hdcp->authenticated);
|
||||||
}
|
}
|
||||||
|
|
||||||
static u8 sde_hdcp_2x_stream_type(u8 min_enc_level)
|
static u8 sde_hdcp_2x_stream_type(u8 min_enc_level)
|
||||||
@@ -474,6 +478,8 @@ static void sde_hdcp_2x_msg_sent(struct sde_hdcp_2x_ctrl *hdcp)
|
|||||||
HDCP_TRANSPORT_CMD_INVALID,
|
HDCP_TRANSPORT_CMD_INVALID,
|
||||||
hdcp->client_data};
|
hdcp->client_data};
|
||||||
|
|
||||||
|
SDE_EVT32_EXTERNAL(SDE_EVTLOG_FUNC_ENTRY, hdcp->authenticated,
|
||||||
|
hdcp->app_data.response.data[0]);
|
||||||
switch (hdcp->app_data.response.data[0]) {
|
switch (hdcp->app_data.response.data[0]) {
|
||||||
case SKE_SEND_TYPE_ID:
|
case SKE_SEND_TYPE_ID:
|
||||||
if (!hdcp2_app_comm(hdcp->hdcp2_ctx,
|
if (!hdcp2_app_comm(hdcp->hdcp2_ctx,
|
||||||
@@ -525,6 +531,7 @@ static void sde_hdcp_2x_msg_sent(struct sde_hdcp_2x_ctrl *hdcp)
|
|||||||
}
|
}
|
||||||
|
|
||||||
sde_hdcp_2x_wakeup_client(hdcp, &cdata);
|
sde_hdcp_2x_wakeup_client(hdcp, &cdata);
|
||||||
|
SDE_EVT32_EXTERNAL(SDE_EVTLOG_FUNC_EXIT, hdcp->authenticated);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void sde_hdcp_2x_init(struct sde_hdcp_2x_ctrl *hdcp)
|
static void sde_hdcp_2x_init(struct sde_hdcp_2x_ctrl *hdcp)
|
||||||
@@ -539,6 +546,7 @@ static void sde_hdcp_2x_start_auth(struct sde_hdcp_2x_ctrl *hdcp)
|
|||||||
{
|
{
|
||||||
int rc;
|
int rc;
|
||||||
|
|
||||||
|
SDE_EVT32_EXTERNAL(SDE_EVTLOG_FUNC_ENTRY, hdcp->authenticated);
|
||||||
rc = hdcp2_app_comm(hdcp->hdcp2_ctx, HDCP2_CMD_START_AUTH,
|
rc = hdcp2_app_comm(hdcp->hdcp2_ctx, HDCP2_CMD_START_AUTH,
|
||||||
&hdcp->app_data);
|
&hdcp->app_data);
|
||||||
if (rc) {
|
if (rc) {
|
||||||
@@ -550,6 +558,7 @@ static void sde_hdcp_2x_start_auth(struct sde_hdcp_2x_ctrl *hdcp)
|
|||||||
sde_hdcp_2x_message_name(hdcp->app_data.response.data[0]));
|
sde_hdcp_2x_message_name(hdcp->app_data.response.data[0]));
|
||||||
|
|
||||||
sde_hdcp_2x_send_message(hdcp);
|
sde_hdcp_2x_send_message(hdcp);
|
||||||
|
SDE_EVT32_EXTERNAL(SDE_EVTLOG_FUNC_EXIT, hdcp->authenticated);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void sde_hdcp_2x_timeout(struct sde_hdcp_2x_ctrl *hdcp)
|
static void sde_hdcp_2x_timeout(struct sde_hdcp_2x_ctrl *hdcp)
|
||||||
@@ -584,6 +593,7 @@ static void sde_hdcp_2x_msg_recvd(struct sde_hdcp_2x_ctrl *hdcp)
|
|||||||
u32 request_length, out_msg;
|
u32 request_length, out_msg;
|
||||||
struct hdcp_transport_wakeup_data cdata = {HDCP_TRANSPORT_CMD_INVALID};
|
struct hdcp_transport_wakeup_data cdata = {HDCP_TRANSPORT_CMD_INVALID};
|
||||||
|
|
||||||
|
SDE_EVT32_EXTERNAL(SDE_EVTLOG_FUNC_ENTRY, hdcp->authenticated);
|
||||||
if (atomic_read(&hdcp->hdcp_off)) {
|
if (atomic_read(&hdcp->hdcp_off)) {
|
||||||
pr_debug("invalid state, hdcp off\n");
|
pr_debug("invalid state, hdcp off\n");
|
||||||
return;
|
return;
|
||||||
@@ -688,6 +698,7 @@ exit:
|
|||||||
|
|
||||||
if (rc && !atomic_read(&hdcp->hdcp_off))
|
if (rc && !atomic_read(&hdcp->hdcp_off))
|
||||||
sde_hdcp_2x_clean(hdcp);
|
sde_hdcp_2x_clean(hdcp);
|
||||||
|
SDE_EVT32_EXTERNAL(SDE_EVTLOG_FUNC_EXIT, hdcp->authenticated);
|
||||||
}
|
}
|
||||||
|
|
||||||
static struct list_head *sde_hdcp_2x_stream_present(
|
static struct list_head *sde_hdcp_2x_stream_present(
|
||||||
|
Reference in New Issue
Block a user