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

Commit 5a70dd3b authored by Christopher Braga's avatar Christopher Braga
Browse files

drm/msm/dp: update HDCP worker to wait for sink synchronization



Prevent HDCP worker from operating when sink synchronization has not
been achieved to prevent HDCP authentication issues with some sinks.

Change-Id: Id7948f53c60c5417306f7615c00e8a0ff7cbdeca
Signed-off-by: default avatarChristopher Braga <cbraga@codeaurora.org>
parent 2bdc98a7
Loading
Loading
Loading
Loading
+9 −0
Original line number Diff line number Diff line
@@ -307,12 +307,21 @@ static void dp_display_hdcp_cb_work(struct work_struct *work)
	void *data;
	int rc = 0;
	u32 hdcp_auth_state;
	u8 sink_status = 0;

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

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

	drm_dp_dpcd_readb(dp->aux->drm_aux, DP_SINK_STATUS, &sink_status);
	sink_status &= (DP_RECEIVE_PORT_0_STATUS | DP_RECEIVE_PORT_1_STATUS);
	if (sink_status < 1) {
		pr_debug("Sink not synchronized. Queuing again then exiting\n");
		queue_delayed_work(dp->wq, &dp->hdcp_cb_work, HZ);
		return;
	}

	status = &dp->link->hdcp_status;

	if (status->hdcp_state == HDCP_STATE_INACTIVE) {