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

Commit 39f5d21e authored by Ajay Singh Parmar's avatar Ajay Singh Parmar Committed by Abhijith Desai
Browse files

drm/msm/dp: fix suspend/resume audio issue



On suspend, DP is powered off which erases EDID. On resume,
DP checks for audio support from EDID which has already
been reset. Retain audio information across DP power cycles
to avoid issues like this. In case the cable is removed and
connected again, EDID is read again and audio status is updated.

Change-Id: I82e84dee67507e825f4b4134db6d1e779d0324ce
CRs-Fixed: 2325990
Signed-off-by: default avatarAjay Singh Parmar <aparmar@codeaurora.org>
Signed-off-by: default avatarAbhijith Desai <desaia@codeaurora.org>
parent 8a19ed57
Loading
Loading
Loading
Loading
+1 −7
Original line number Diff line number Diff line
@@ -721,10 +721,8 @@ static int dp_display_process_hpd_low(struct dp_display_private *dp)

		dp_panel = dp->active_panels[idx];

		if (dp_panel->audio_supported) {
		if (dp_panel->audio_supported)
			dp_panel->audio->off(dp_panel->audio);
			dp_panel->audio_supported = false;
		}
	}

	mutex_unlock(&dp->session_lock);
@@ -1422,7 +1420,6 @@ static int dp_display_post_enable(struct dp_display *dp_display, void *panel)
{
	struct dp_display_private *dp;
	struct dp_panel *dp_panel;
	struct edid *edid;

	if (!dp_display || !panel) {
		pr_err("invalid input\n");
@@ -1449,9 +1446,6 @@ static int dp_display_post_enable(struct dp_display *dp_display, void *panel)

	dp_display_stream_post_enable(dp, dp_panel);

	edid = dp_panel->edid_ctrl->edid;
	dp_panel->audio_supported = drm_detect_monitor_audio(edid);

	if (dp_panel->audio_supported) {
		dp_panel->audio->bw_code = dp->link->link_params.bw_code;
		dp_panel->audio->lane_count = dp->link->link_params.lane_count;
+5 −2
Original line number Diff line number Diff line
@@ -835,11 +835,11 @@ static int dp_panel_read_edid(struct dp_panel *dp_panel,
{
	int ret = 0;
	struct dp_panel_private *panel;
	struct edid *edid;

	if (!dp_panel) {
		pr_err("invalid input\n");
		ret = -EINVAL;
		goto end;
		return -EINVAL;
	}

	panel = container_of(dp_panel, struct dp_panel_private, dp_panel);
@@ -857,6 +857,9 @@ static int dp_panel_read_edid(struct dp_panel *dp_panel,
		goto end;
	}
end:
	edid = dp_panel->edid_ctrl->edid;
	dp_panel->audio_supported = drm_detect_monitor_audio(edid);

	return ret;
}