Merge "drm: msm: dp: turn off audio before dp lane status toggling"
This commit is contained in:
commit
c0642217b3
@ -1010,6 +1010,30 @@ 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;
|
||||
@ -1197,19 +1221,33 @@ static void dp_display_attention_work(struct work_struct *work)
|
||||
goto mst_attention;
|
||||
}
|
||||
|
||||
if (dp->link->sink_request & DP_TEST_LINK_PHY_TEST_PATTERN) {
|
||||
dp->ctrl->process_phy_test_request(dp->ctrl);
|
||||
goto mst_attention;
|
||||
if (dp->link->sink_request & (DP_TEST_LINK_PHY_TEST_PATTERN |
|
||||
DP_TEST_LINK_TRAINING | DP_LINK_STATUS_UPDATED)) {
|
||||
|
||||
mutex_lock(&dp->session_lock);
|
||||
dp_audio_enable(dp, false);
|
||||
mutex_unlock(&dp->session_lock);
|
||||
|
||||
if (dp->link->sink_request & DP_TEST_LINK_PHY_TEST_PATTERN)
|
||||
dp->ctrl->process_phy_test_request(dp->ctrl);
|
||||
|
||||
if (dp->link->sink_request & DP_TEST_LINK_TRAINING) {
|
||||
dp->link->send_test_response(dp->link);
|
||||
dp->ctrl->link_maintenance(dp->ctrl);
|
||||
}
|
||||
|
||||
if (dp->link->sink_request & DP_LINK_STATUS_UPDATED)
|
||||
dp->ctrl->link_maintenance(dp->ctrl);
|
||||
|
||||
mutex_lock(&dp->session_lock);
|
||||
dp_audio_enable(dp, true);
|
||||
mutex_unlock(&dp->session_lock);
|
||||
|
||||
if (dp->link->sink_request & (DP_TEST_LINK_PHY_TEST_PATTERN |
|
||||
DP_TEST_LINK_TRAINING))
|
||||
goto mst_attention;
|
||||
}
|
||||
|
||||
if (dp->link->sink_request & DP_TEST_LINK_TRAINING) {
|
||||
dp->link->send_test_response(dp->link);
|
||||
dp->ctrl->link_maintenance(dp->ctrl);
|
||||
goto mst_attention;
|
||||
}
|
||||
|
||||
if (dp->link->sink_request & DP_LINK_STATUS_UPDATED)
|
||||
dp->ctrl->link_maintenance(dp->ctrl);
|
||||
cp_irq:
|
||||
if (dp_display_is_hdcp_enabled(dp) && dp->hdcp.ops->cp_irq)
|
||||
dp->hdcp.ops->cp_irq(dp->hdcp.data);
|
||||
|
Loading…
Reference in New Issue
Block a user