diff options
| author | Ray Zhang <rayz@codeaurora.org> | 2017-01-06 16:25:15 +0800 |
|---|---|---|
| committer | zhaoyuan <yzhao@codeaurora.org> | 2017-03-24 17:46:58 +0800 |
| commit | d679cf981bd35f67b38d82e03507e2c869d14842 (patch) | |
| tree | 63922943fed4a5b28a5a1f12b34f5f2d065eca00 /drivers/platform/msm | |
| parent | 687a4eb82be5905f5400678dcaff4e98dad72e3c (diff) | |
msm: mdss: make hpd call asynchronous for HDMI in certain cases
In some cases the hpd call cannot be blocked. For example, in
case of framework restart, both display and audio HALs are not
available, so nobody will notify and unblock hpd call. Another
case is continuous splash in which unblank is delayed till the
first display kickoff, so hpd cannot blocking wait for such a
late notification.
Change-Id: I6ed58c3ac35efdaeac2e73d36d78b7fd64a74f42
Signed-off-by: Ray Zhang <rayz@codeaurora.org>
Diffstat (limited to 'drivers/platform/msm')
| -rw-r--r-- | drivers/platform/msm/msm_ext_display.c | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/drivers/platform/msm/msm_ext_display.c b/drivers/platform/msm/msm_ext_display.c index a35ed1afc720..6f9a13040cd5 100644 --- a/drivers/platform/msm/msm_ext_display.c +++ b/drivers/platform/msm/msm_ext_display.c @@ -215,7 +215,8 @@ static int msm_ext_disp_process_display(struct msm_ext_disp *ext_disp, { int ret = 0; - if (!(flags & MSM_EXT_DISP_HPD_VIDEO)) { + if (!(flags & (MSM_EXT_DISP_HPD_VIDEO + | MSM_EXT_DISP_HPD_ASYNC_VIDEO))) { pr_debug("skipping video setup for display (%s)\n", msm_ext_disp_name(type)); goto end; @@ -224,7 +225,8 @@ static int msm_ext_disp_process_display(struct msm_ext_disp *ext_disp, ret = msm_ext_disp_send_cable_notification(ext_disp, state); /* positive ret value means audio node was switched */ - if (IS_ERR_VALUE(ret) || !ret) { + if ((ret <= 0) || + (flags & MSM_EXT_DISP_HPD_ASYNC_VIDEO)) { pr_debug("not waiting for display\n"); goto end; } @@ -237,9 +239,8 @@ static int msm_ext_disp_process_display(struct msm_ext_disp *ext_disp, goto end; } - ret = 0; end: - return ret; + return (ret >= 0) ? 0 : -EINVAL; } static int msm_ext_disp_process_audio(struct msm_ext_disp *ext_disp, @@ -248,7 +249,8 @@ static int msm_ext_disp_process_audio(struct msm_ext_disp *ext_disp, { int ret = 0; - if (!(flags & MSM_EXT_DISP_HPD_AUDIO)) { + if (!(flags & (MSM_EXT_DISP_HPD_AUDIO + | MSM_EXT_DISP_HPD_ASYNC_AUDIO))) { pr_debug("skipping audio setup for display (%s)\n", msm_ext_disp_name(type)); goto end; @@ -257,7 +259,8 @@ static int msm_ext_disp_process_audio(struct msm_ext_disp *ext_disp, ret = msm_ext_disp_send_audio_notification(ext_disp, state); /* positive ret value means audio node was switched */ - if (IS_ERR_VALUE(ret) || !ret || !ext_disp->ack_enabled) { + if ((ret <= 0) || !ext_disp->ack_enabled || + (flags & MSM_EXT_DISP_HPD_ASYNC_AUDIO)) { pr_debug("not waiting for audio\n"); goto end; } @@ -270,9 +273,8 @@ static int msm_ext_disp_process_audio(struct msm_ext_disp *ext_disp, goto end; } - ret = 0; end: - return ret; + return (ret >= 0) ? 0 : -EINVAL; } static bool msm_ext_disp_validate_connect(struct msm_ext_disp *ext_disp, |
