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

Commit f3811fef authored by Shubham Talekar's avatar Shubham Talekar
Browse files

msm: drm/dp: enable HDCP in DisplayPort driver



enable HDCP in DisplayPort driver.
use static variable to prevent repeatative call
to drm bootsplash.

Change-Id: I1a7aa68c3be3cea5b0ce8195cc8b871a4a0ed80a
Signed-off-by: default avatarShubham Talekar <quic_stalekar@quicinc.com>
parent 9ee09db4
Loading
Loading
Loading
Loading
+12 −9
Original line number Diff line number Diff line
@@ -146,13 +146,6 @@ static void dp_display_hdcp_cb_work(struct work_struct *work)

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

	dp_display_update_hdcp_info(dp);

	if (!dp_display_is_hdcp_enabled(dp))
		return;

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

	rc = dp->catalog->ctrl.read_hdcp_status(&dp->catalog->ctrl);
	if (rc >= 0) {
		hdcp_auth_state = (rc >> 20) & 0x3;
@@ -474,13 +467,15 @@ static int dp_display_send_hpd_notification(struct dp_display_private *dp,
		bool hpd)
{
	int ret = 0;
	static int bootsplash_count;

	dp->dp_display.is_connected = hpd;

	if (!dp_display_framework_ready(dp)) {
		pr_err("%s: dp display framework not ready\n", __func__);
		if (!dp->dp_display.is_bootsplash_en) {
		if (!dp->dp_display.is_bootsplash_en && !bootsplash_count) {
			dp->dp_display.is_bootsplash_en = true;
			bootsplash_count++;
			drm_client_dev_register(dp->dp_display.drm_dev);
		}
		return ret;
@@ -1150,6 +1145,11 @@ static int dp_display_post_enable(struct dp_display *dp_display)
		goto end;
	}

	if (dp->dp_display.is_bootsplash_en) {
		dp->dp_display.is_bootsplash_en = false;
		goto end;
	}

	dp->panel->spd_config(dp->panel);

	if (dp->audio_supported) {
@@ -1158,9 +1158,12 @@ static int dp_display_post_enable(struct dp_display *dp_display)
		dp->audio_status = dp->audio->on(dp->audio);
	}

	if (dp->hdcp.feature_enabled && 0) { /* bootsplash check */
	dp_display_update_hdcp_info(dp);

	if (dp_display_is_hdcp_enabled(dp)) {
		cancel_delayed_work_sync(&dp->hdcp_cb_work);

		dp->link->hdcp_status.hdcp_state = HDCP_STATE_AUTHENTICATING;
		queue_delayed_work(dp->wq, &dp->hdcp_cb_work, HZ / 2);
	}