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

Commit 4ac43e21 authored by qctecmdr's avatar qctecmdr Committed by Gerrit - the friendly Code Review server
Browse files

Merge "disp: msm: dp: fix for screen freeze on dp disconnect"

parents 2e739cad 83de56ec
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -766,6 +766,12 @@ static int dp_audio_off(struct dp_audio *dp_audio)
	}

	audio = container_of(dp_audio, struct dp_audio_private, dp_audio);

	if (!atomic_read(&audio->session_on)) {
		DP_DEBUG("audio already off\n");
		return rc;
	}

	ext = &audio->ext_audio_data;

	work_pending = cancel_delayed_work_sync(&audio->notify_delayed_work);
+25 −25
Original line number Diff line number Diff line
@@ -245,6 +245,30 @@ static bool dp_display_is_ready(struct dp_display_private *dp)
		dp->hpd->alt_mode_cfg_done;
}

static void dp_audio_enable(struct dp_display_private *dp, bool enable)
{
	struct dp_panel *dp_panel;
	int idx;

	for (idx = DP_STREAM_0; idx < DP_STREAM_MAX; idx++) {
		if (!dp->active_panels[idx])
			continue;
		dp_panel = dp->active_panels[idx];

		if (dp_panel->audio_supported) {
			if (enable) {
				dp_panel->audio->bw_code =
					dp->link->link_params.bw_code;
				dp_panel->audio->lane_count =
					dp->link->link_params.lane_count;
				dp_panel->audio->on(dp_panel->audio);
			} else {
				dp_panel->audio->off(dp_panel->audio);
			}
		}
	}
}

static void dp_display_update_hdcp_status(struct dp_display_private *dp,
					bool reset)
{
@@ -1022,7 +1046,7 @@ static int dp_display_process_hpd_low(struct dp_display_private *dp)

	dp_display_state_remove(DP_STATE_CONNECTED);
	dp->process_hpd_connect = false;

	dp_audio_enable(dp, false);
	dp_display_process_mst_hpd_low(dp);

	if ((dp_display_state_is(DP_STATE_CONNECT_NOTIFIED) ||
@@ -1107,30 +1131,6 @@ static void dp_display_stream_disable(struct dp_display_private *dp,
	dp->active_stream_cnt--;
}

static void dp_audio_enable(struct dp_display_private *dp, bool enable)
{
	struct dp_panel *dp_panel;
	int idx;

	for (idx = DP_STREAM_0; idx < DP_STREAM_MAX; idx++) {
		if (!dp->active_panels[idx])
			continue;
		dp_panel = dp->active_panels[idx];

		if (dp_panel->audio_supported) {
			if (enable) {
				dp_panel->audio->bw_code =
					dp->link->link_params.bw_code;
				dp_panel->audio->lane_count =
					dp->link->link_params.lane_count;
				dp_panel->audio->on(dp_panel->audio);
			} else {
				dp_panel->audio->off(dp_panel->audio);
			}
		}
	}
}

static void dp_display_clean(struct dp_display_private *dp)
{
	int idx;