Merge "msm: mdss: dp: do not program audio registers when DP core is off"

This commit is contained in:
Linux Build Service Account 2017-07-25 00:36:00 -07:00 committed by Gerrit - the friendly Code Review server
commit 223b0e823b

View file

@ -1094,8 +1094,14 @@ static int dp_audio_info_setup(struct platform_device *pdev,
struct mdss_dp_drv_pdata *dp_ctrl = platform_get_drvdata(pdev);
if (!dp_ctrl || !params) {
DEV_ERR("%s: invalid input\n", __func__);
return -ENODEV;
pr_err("invalid input\n");
rc = -ENODEV;
goto end;
}
if (!dp_ctrl->power_on) {
pr_debug("DP is already power off\n");
goto end;
}
mdss_dp_audio_setup_sdps(&dp_ctrl->ctrl_io, params->num_of_channels);
@ -1103,6 +1109,7 @@ static int dp_audio_info_setup(struct platform_device *pdev,
mdss_dp_set_safe_to_exit_level(&dp_ctrl->ctrl_io, dp_ctrl->lane_cnt);
mdss_dp_audio_enable(&dp_ctrl->ctrl_io, true);
end:
return rc;
} /* dp_audio_info_setup */
@ -1134,6 +1141,11 @@ static void dp_audio_teardown_done(struct platform_device *pdev)
return;
}
if (!dp->power_on) {
pr_err("DP is already power off\n");
return;
}
mdss_dp_audio_enable(&dp->ctrl_io, false);
/* Make sure the DP audio engine is disabled */
wmb();