From 3c1b6b9787c7ee062fd73ded05c82eaac19cb4cb Mon Sep 17 00:00:00 2001 From: zhaoyuan Date: Wed, 5 Apr 2017 16:24:02 +0800 Subject: msm: mdss: remove HDMI connected flags There's no need to check whether the device has been connected when disconnect it, for we'll always do disconnect after the device has been connected. Even if we do disconnect incorrectly, it'll not affect. Now we have both ASYNC_AUDIO/VIDEO flag and SYNC_AUDIO/ VIDEO flag. Sometimes SYNC flag would be set when device is connected, while ASYNC flag is set when disconnect, the two flags are not match. If we check here, that would return false. So we could remove the flags. CRs-Fixed: 2033810 Change-Id: I305f64352815cd38a4c9618bcd22a4d103c14818 Signed-off-by: zhaoyuan --- drivers/platform/msm/msm_ext_display.c | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) diff --git a/drivers/platform/msm/msm_ext_display.c b/drivers/platform/msm/msm_ext_display.c index 6f9a13040cd5..6ebe3edd5feb 100644 --- a/drivers/platform/msm/msm_ext_display.c +++ b/drivers/platform/msm/msm_ext_display.c @@ -39,7 +39,6 @@ struct msm_ext_disp { struct list_head display_list; struct mutex lock; struct completion hpd_comp; - u32 flags; }; static int msm_ext_disp_get_intf_data(struct msm_ext_disp *ext_disp, @@ -288,7 +287,6 @@ static bool msm_ext_disp_validate_connect(struct msm_ext_disp *ext_disp, if (ext_disp->current_disp != type) return false; end: - ext_disp->flags |= flags; ext_disp->current_disp = type; return true; } @@ -304,13 +302,7 @@ static bool msm_ext_disp_validate_disconnect(struct msm_ext_disp *ext_disp, if (ext_disp->current_disp != type) return false; - /* allow only an already connected type */ - if (ext_disp->flags & flags) { - ext_disp->flags &= ~flags; - return true; - } - - return false; + return true; } static int msm_ext_disp_hpd(struct platform_device *pdev, @@ -378,8 +370,7 @@ static int msm_ext_disp_hpd(struct platform_device *pdev, msm_ext_disp_update_audio_ops(ext_disp, type, state, flags); msm_ext_disp_process_display(ext_disp, type, state, flags); - if (!ext_disp->flags) - ext_disp->current_disp = EXT_DISPLAY_TYPE_MAX; + ext_disp->current_disp = EXT_DISPLAY_TYPE_MAX; } pr_debug("Hpd (%d) for display (%s)\n", state, -- cgit v1.2.3