diff options
| author | Linux Build Service Account <lnxbuild@quicinc.com> | 2017-07-25 00:36:00 -0700 |
|---|---|---|
| committer | Gerrit - the friendly Code Review server <code-review@localhost> | 2017-07-25 00:35:58 -0700 |
| commit | 223b0e823b814babb2d5d7725b53139880512250 (patch) | |
| tree | 891d8b3c1b1162157e65ea8ae350a21cb8348b32 | |
| parent | 61edb88454a9125f261bd5c90695a1b84332b0eb (diff) | |
| parent | a89db690ae44edadb432740cb7e0817efbbb4d6e (diff) | |
Merge "msm: mdss: dp: do not program audio registers when DP core is off"
| -rw-r--r-- | drivers/video/fbdev/msm/mdss_dp.c | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/drivers/video/fbdev/msm/mdss_dp.c b/drivers/video/fbdev/msm/mdss_dp.c index 89ec73c21630..a98e5a9007bd 100644 --- a/drivers/video/fbdev/msm/mdss_dp.c +++ b/drivers/video/fbdev/msm/mdss_dp.c @@ -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(); |
