mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-10 22:40:54 -04:00
Merge "disp: msm: Ensure clean slate when starting and stopping HDCP"
This commit is contained in:
commit
e683dcbce3
3 changed files with 16 additions and 5 deletions
|
|
@ -387,12 +387,12 @@ static void dp_display_hdcp_cb_work(struct work_struct *work)
|
|||
return;
|
||||
}
|
||||
dp_display_hdcp_register_streams(dp);
|
||||
status->hdcp_state = HDCP_STATE_AUTHENTICATING;
|
||||
if (ops && ops->reauthenticate) {
|
||||
rc = ops->reauthenticate(data);
|
||||
if (rc)
|
||||
pr_err("failed rc=%d\n", rc);
|
||||
}
|
||||
status->hdcp_state = HDCP_STATE_AUTHENTICATING;
|
||||
} else {
|
||||
pr_debug("not reauthenticating, cable disconnected\n");
|
||||
}
|
||||
|
|
|
|||
|
|
@ -196,16 +196,20 @@ static int dp_hdcp2p2_wakeup(struct hdcp_transport_wakeup_data *data)
|
|||
switch (data->cmd) {
|
||||
case HDCP_TRANSPORT_CMD_STATUS_SUCCESS:
|
||||
atomic_set(&ctrl->auth_state, HDCP_STATE_AUTHENTICATED);
|
||||
kfifo_put(&ctrl->cmd_q, data->cmd);
|
||||
wake_up(&ctrl->wait_q);
|
||||
break;
|
||||
case HDCP_TRANSPORT_CMD_STATUS_FAILED:
|
||||
atomic_set(&ctrl->auth_state, HDCP_STATE_AUTH_FAIL);
|
||||
kfifo_put(&ctrl->cmd_q, data->cmd);
|
||||
kthread_park(ctrl->thread);
|
||||
break;
|
||||
default:
|
||||
kfifo_put(&ctrl->cmd_q, data->cmd);
|
||||
wake_up(&ctrl->wait_q);
|
||||
break;
|
||||
}
|
||||
|
||||
kfifo_put(&ctrl->cmd_q, data->cmd);
|
||||
wake_up(&ctrl->wait_q);
|
||||
exit:
|
||||
return 0;
|
||||
}
|
||||
|
|
@ -310,6 +314,8 @@ static int dp_hdcp2p2_authenticate(void *input)
|
|||
ctrl->sink_status = SINK_CONNECTED;
|
||||
atomic_set(&ctrl->auth_state, HDCP_STATE_AUTHENTICATING);
|
||||
|
||||
kthread_park(ctrl->thread);
|
||||
kfifo_reset(&ctrl->cmd_q);
|
||||
kthread_unpark(ctrl->thread);
|
||||
|
||||
cdata.context = input;
|
||||
|
|
|
|||
|
|
@ -832,9 +832,16 @@ static int sde_hdcp_2x_wakeup(struct sde_hdcp_2x_wakeup_data *data)
|
|||
if (!atomic_cmpxchg(&hdcp->enable_pending, 0, 1)) {
|
||||
hdcp->device_type = data->device_type;
|
||||
kfifo_put(&hdcp->cmd_q, data->cmd);
|
||||
kthread_unpark(hdcp->thread);
|
||||
wake_up(&hdcp->wait_q);
|
||||
}
|
||||
break;
|
||||
case HDCP_2X_CMD_DISABLE:
|
||||
if (!atomic_xchg(&hdcp->hdcp_off, 1))
|
||||
kfifo_put(&hdcp->cmd_q, HDCP_2X_CMD_STOP);
|
||||
kfifo_put(&hdcp->cmd_q, data->cmd);
|
||||
kthread_park(hdcp->thread);
|
||||
break;
|
||||
case HDCP_2X_CMD_STOP:
|
||||
atomic_set(&hdcp->hdcp_off, 1);
|
||||
|
||||
|
|
@ -929,8 +936,6 @@ static int sde_hdcp_2x_main(void *data)
|
|||
atomic_set(&hdcp->enable_pending, 0);
|
||||
break;
|
||||
case HDCP_2X_CMD_DISABLE:
|
||||
if (!atomic_xchg(&hdcp->hdcp_off, 1))
|
||||
sde_hdcp_2x_clean(hdcp);
|
||||
sde_hdcp_2x_disable(hdcp);
|
||||
break;
|
||||
case HDCP_2X_CMD_START:
|
||||
|
|
|
|||
Loading…
Reference in a new issue