Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 05a3c086 authored by Ajay Singh Parmar's avatar Ajay Singh Parmar
Browse files

drm/msm/dp: do not execute hdcp work if aborted



The HDCP sub-module responds with the authentication status
which is queued on a worker thread in DP display sub-module
for further processing. In case DP cable is disconnected or
the DP controller is powered off, it may result in unstable
state. Check for DP state before processing HDCP response
to avoid possible race condition which can lead to unstable
behavior.

Change-Id: I1b3f20da5a6fb35c70ad6e09652c6b236efd0e42
Signed-off-by: default avatarAjay Singh Parmar <aparmar@codeaurora.org>
parent b0e5566f
Loading
Loading
Loading
Loading
+7 −1
Original line number Diff line number Diff line
@@ -231,6 +231,10 @@ static void dp_display_hdcp_cb_work(struct work_struct *work)
	u32 hdcp_auth_state;

	dp = container_of(dw, struct dp_display_private, hdcp_cb_work);

	if (!dp->power_on || atomic_read(&dp->aborted))
		return;

	status = &dp->link->hdcp_status;

	if (status->hdcp_state == HDCP_STATE_INACTIVE) {
@@ -294,8 +298,10 @@ static void dp_display_notify_hdcp_status_cb(void *ptr,

	dp->link->hdcp_status.hdcp_state = state;

	if (dp->is_connected)
	mutex_lock(&dp->session_lock);
	if (dp->power_on && !atomic_read(&dp->aborted))
		queue_delayed_work(dp->wq, &dp->hdcp_cb_work, HZ/4);
	mutex_unlock(&dp->session_lock);
}

static void dp_display_check_source_hdcp_caps(struct dp_display_private *dp)