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

Commit a8c536a4 authored by Govinda Rajulu Chenna's avatar Govinda Rajulu Chenna Committed by Gerrit - the friendly Code Review server
Browse files

drm/msm/dp: fix mst audio register/deregister issue



The existing implementation registers with msm-ext-disp
module at dp_audio_get function with dp_panel stream-id.
The stream-id is invalid at this point as stream-id assignment
happens during the bridge_pre_enable. This change moves the
register/deregister calls into audio_on/audio_off functions
at the point where dp_panel holds the valid stream-id.

CRs-Fixed: 2325207
Change-Id: I415debb1e0431ff60729282d6afb41fa8fa6f1bf
Signed-off-by: default avatarGovinda Rajulu Chenna <gchenna@codeaurora.org>
parent 65d04cc7
Loading
Loading
Loading
Loading
+4 −4
Original line number Diff line number Diff line
@@ -738,6 +738,8 @@ static int dp_audio_on(struct dp_audio *dp_audio)
		return -EINVAL;
	}

	dp_audio_register_ext_disp(audio);

	ext = &audio->ext_audio_data;

	audio->session_on = true;
@@ -785,6 +787,8 @@ static int dp_audio_off(struct dp_audio *dp_audio)
	audio->session_on = false;
	audio->engine_on  = false;

	dp_audio_deregister_ext_disp(audio);

	return rc;
}

@@ -858,8 +862,6 @@ struct dp_audio *dp_audio_get(struct platform_device *pdev,

	catalog->init(catalog);

	dp_audio_register_ext_disp(audio);

	return dp_audio;

error_notify_workqueue:
@@ -877,8 +879,6 @@ void dp_audio_put(struct dp_audio *dp_audio)

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

	dp_audio_deregister_ext_disp(audio);

	mutex_destroy(&audio->ops_lock);

	dp_audio_destroy_notify_workqueue(audio);
+7 −1
Original line number Diff line number Diff line
@@ -2676,9 +2676,15 @@ static int dp_panel_read_sink_sts(struct dp_panel *dp_panel, u8 *sts, u32 size)

static int dp_panel_update_edid(struct dp_panel *dp_panel, struct edid *edid)
{
	int rc;

	dp_panel->edid_ctrl->edid = edid;
	sde_parse_edid(dp_panel->edid_ctrl);
	return _sde_edid_update_modes(dp_panel->connector, dp_panel->edid_ctrl);

	rc = _sde_edid_update_modes(dp_panel->connector, dp_panel->edid_ctrl);
	dp_panel->audio_supported = drm_detect_monitor_audio(edid);

	return rc;
}

static bool dp_panel_read_mst_cap(struct dp_panel *dp_panel)