Loading drivers/video/fbdev/msm/mdss_dp.c +14 −2 Original line number Diff line number Diff line Loading @@ -1145,6 +1145,7 @@ static int dp_audio_info_setup(struct platform_device *pdev, mdss_dp_config_audio_acr_ctrl(&dp_ctrl->ctrl_io, dp_ctrl->link_rate); mdss_dp_set_safe_to_exit_level(&dp_ctrl->ctrl_io, dp_ctrl->lane_cnt); mdss_dp_audio_enable(&dp_ctrl->ctrl_io, true); dp_ctrl->audio_en = true; end: return rc; Loading Loading @@ -1186,7 +1187,8 @@ static void dp_audio_teardown_done(struct platform_device *pdev) mdss_dp_audio_enable(&dp->ctrl_io, false); /* Make sure the DP audio engine is disabled */ wmb(); dp->audio_en = false; complete_all(&dp->audio_comp); pr_debug("audio engine disabled\n"); } /* dp_audio_teardown_done */ Loading Loading @@ -1879,7 +1881,7 @@ static int mdss_dp_off_irq(struct mdss_dp_drv_pdata *dp_drv) mdss_dp_audio_enable(&dp_drv->ctrl_io, false); /* Make sure DP mainlink and audio engines are disabled */ wmb(); dp_drv->audio_en = false; /* * If downstream device is a brige which no longer has any * downstream devices connected to it, then we should reset Loading Loading @@ -1912,6 +1914,7 @@ static int mdss_dp_off_hpd(struct mdss_dp_drv_pdata *dp_drv) mdss_dp_aux_ctrl(&dp_drv->ctrl_io, false); mdss_dp_audio_enable(&dp_drv->ctrl_io, false); dp_drv->audio_en = false; mdss_dp_host_deinit(dp_drv); Loading Loading @@ -2316,6 +2319,14 @@ static int mdss_dp_notify_clients(struct mdss_dp_drv_pdata *dp, ret = mdss_dp_send_video_notification(dp, true); } else { mdss_dp_send_audio_notification(dp, false); if (dp->audio_en) { reinit_completion(&dp->audio_comp); ret = wait_for_completion_timeout(&dp->audio_comp, msecs_to_jiffies(2000)); if (ret <= 0) pr_err("%s Wait for Audio Comp timed out\n", __func__); } ret = mdss_dp_send_video_notification(dp, false); } Loading Loading @@ -4525,6 +4536,7 @@ static int mdss_dp_probe(struct platform_device *pdev) init_completion(&dp_drv->aux_comp); init_completion(&dp_drv->idle_comp); init_completion(&dp_drv->video_comp); init_completion(&dp_drv->audio_comp); if (mdss_dp_usbpd_setup(dp_drv)) { pr_err("Error usbpd setup!\n"); Loading drivers/video/fbdev/msm/mdss_dp.h +2 −0 Original line number Diff line number Diff line Loading @@ -625,12 +625,14 @@ struct mdss_dp_drv_pdata { struct completion aux_comp; struct completion idle_comp; struct completion video_comp; struct completion audio_comp; struct completion notification_comp; struct mutex aux_mutex; struct mutex train_mutex; struct mutex attention_lock; struct mutex hdcp_mutex; bool cable_connected; bool audio_en; u32 s3d_mode; u32 aux_cmd_busy; u32 aux_cmd_i2c; Loading Loading
drivers/video/fbdev/msm/mdss_dp.c +14 −2 Original line number Diff line number Diff line Loading @@ -1145,6 +1145,7 @@ static int dp_audio_info_setup(struct platform_device *pdev, mdss_dp_config_audio_acr_ctrl(&dp_ctrl->ctrl_io, dp_ctrl->link_rate); mdss_dp_set_safe_to_exit_level(&dp_ctrl->ctrl_io, dp_ctrl->lane_cnt); mdss_dp_audio_enable(&dp_ctrl->ctrl_io, true); dp_ctrl->audio_en = true; end: return rc; Loading Loading @@ -1186,7 +1187,8 @@ static void dp_audio_teardown_done(struct platform_device *pdev) mdss_dp_audio_enable(&dp->ctrl_io, false); /* Make sure the DP audio engine is disabled */ wmb(); dp->audio_en = false; complete_all(&dp->audio_comp); pr_debug("audio engine disabled\n"); } /* dp_audio_teardown_done */ Loading Loading @@ -1879,7 +1881,7 @@ static int mdss_dp_off_irq(struct mdss_dp_drv_pdata *dp_drv) mdss_dp_audio_enable(&dp_drv->ctrl_io, false); /* Make sure DP mainlink and audio engines are disabled */ wmb(); dp_drv->audio_en = false; /* * If downstream device is a brige which no longer has any * downstream devices connected to it, then we should reset Loading Loading @@ -1912,6 +1914,7 @@ static int mdss_dp_off_hpd(struct mdss_dp_drv_pdata *dp_drv) mdss_dp_aux_ctrl(&dp_drv->ctrl_io, false); mdss_dp_audio_enable(&dp_drv->ctrl_io, false); dp_drv->audio_en = false; mdss_dp_host_deinit(dp_drv); Loading Loading @@ -2316,6 +2319,14 @@ static int mdss_dp_notify_clients(struct mdss_dp_drv_pdata *dp, ret = mdss_dp_send_video_notification(dp, true); } else { mdss_dp_send_audio_notification(dp, false); if (dp->audio_en) { reinit_completion(&dp->audio_comp); ret = wait_for_completion_timeout(&dp->audio_comp, msecs_to_jiffies(2000)); if (ret <= 0) pr_err("%s Wait for Audio Comp timed out\n", __func__); } ret = mdss_dp_send_video_notification(dp, false); } Loading Loading @@ -4525,6 +4536,7 @@ static int mdss_dp_probe(struct platform_device *pdev) init_completion(&dp_drv->aux_comp); init_completion(&dp_drv->idle_comp); init_completion(&dp_drv->video_comp); init_completion(&dp_drv->audio_comp); if (mdss_dp_usbpd_setup(dp_drv)) { pr_err("Error usbpd setup!\n"); Loading
drivers/video/fbdev/msm/mdss_dp.h +2 −0 Original line number Diff line number Diff line Loading @@ -625,12 +625,14 @@ struct mdss_dp_drv_pdata { struct completion aux_comp; struct completion idle_comp; struct completion video_comp; struct completion audio_comp; struct completion notification_comp; struct mutex aux_mutex; struct mutex train_mutex; struct mutex attention_lock; struct mutex hdcp_mutex; bool cable_connected; bool audio_en; u32 s3d_mode; u32 aux_cmd_busy; u32 aux_cmd_i2c; Loading