diff --git a/drivers/video/fbdev/msm/mdss_mdp.h b/drivers/video/fbdev/msm/mdss_mdp.h index 0935edcf6e2a..d1fcc5afa3ac 100644 --- a/drivers/video/fbdev/msm/mdss_mdp.h +++ b/drivers/video/fbdev/msm/mdss_mdp.h @@ -1050,7 +1050,8 @@ int mdss_mdp_ctl_split_display_setup(struct mdss_mdp_ctl *ctl, int mdss_mdp_ctl_destroy(struct mdss_mdp_ctl *ctl); int mdss_mdp_ctl_start(struct mdss_mdp_ctl *ctl, bool handoff); int mdss_mdp_ctl_stop(struct mdss_mdp_ctl *ctl, int panel_power_mode); -int mdss_mdp_ctl_intf_event(struct mdss_mdp_ctl *ctl, int event, void *arg); +int mdss_mdp_ctl_intf_event(struct mdss_mdp_ctl *ctl, int event, void *arg, + bool skip_broadcast); int mdss_mdp_get_prefetch_lines(struct mdss_mdp_ctl *ctl); int mdss_mdp_perf_bw_check(struct mdss_mdp_ctl *ctl, struct mdss_mdp_pipe **left_plist, int left_cnt, diff --git a/drivers/video/fbdev/msm/mdss_mdp_ctl.c b/drivers/video/fbdev/msm/mdss_mdp_ctl.c index 9a3ab5669e60..87a57df9c077 100644 --- a/drivers/video/fbdev/msm/mdss_mdp_ctl.c +++ b/drivers/video/fbdev/msm/mdss_mdp_ctl.c @@ -2973,7 +2973,7 @@ int mdss_mdp_ctl_destroy(struct mdss_mdp_ctl *ctl) struct mdss_mdp_ctl *sctl; int rc; - rc = mdss_mdp_ctl_intf_event(ctl, MDSS_EVENT_CLOSE, NULL); + rc = mdss_mdp_ctl_intf_event(ctl, MDSS_EVENT_CLOSE, NULL, false); WARN(rc, "unable to close panel for intf=%d\n", ctl->intf_num); sctl = mdss_mdp_get_split_ctl(ctl); @@ -2987,7 +2987,8 @@ int mdss_mdp_ctl_destroy(struct mdss_mdp_ctl *ctl) return 0; } -int mdss_mdp_ctl_intf_event(struct mdss_mdp_ctl *ctl, int event, void *arg) +int mdss_mdp_ctl_intf_event(struct mdss_mdp_ctl *ctl, int event, void *arg, + bool skip_broadcast) { struct mdss_panel_data *pdata; int rc = 0; @@ -3003,7 +3004,7 @@ int mdss_mdp_ctl_intf_event(struct mdss_mdp_ctl *ctl, int event, void *arg) if (pdata->event_handler) rc = pdata->event_handler(pdata, event, arg); pdata = pdata->next; - } while (rc == 0 && pdata); + } while (rc == 0 && pdata && !skip_broadcast); return rc; } @@ -3176,7 +3177,7 @@ int mdss_mdp_ctl_start(struct mdss_mdp_ctl *ctl, bool handoff) mdss_mdp_clk_ctrl(MDP_BLOCK_POWER_ON); - ret = mdss_mdp_ctl_intf_event(ctl, MDSS_EVENT_RESET, NULL); + ret = mdss_mdp_ctl_intf_event(ctl, MDSS_EVENT_RESET, NULL, false); if (ret) { pr_err("panel power on failed ctl=%d\n", ctl->num); goto error; @@ -4212,7 +4213,7 @@ int mdss_mdp_display_wait4pingpong(struct mdss_mdp_ctl *ctl, bool use_lock) mdss_mdp_ctl_reset(sctl); mdss_mdp_ctl_intf_event(ctl, - MDSS_EVENT_DSI_RESET_WRITE_PTR, NULL); + MDSS_EVENT_DSI_RESET_WRITE_PTR, NULL, false); pr_debug("pingpong timeout recovery finished\n"); } diff --git a/drivers/video/fbdev/msm/mdss_mdp_intf_cmd.c b/drivers/video/fbdev/msm/mdss_mdp_intf_cmd.c index da7e8c9a2835..6db71444fbb5 100644 --- a/drivers/video/fbdev/msm/mdss_mdp_intf_cmd.c +++ b/drivers/video/fbdev/msm/mdss_mdp_intf_cmd.c @@ -298,7 +298,7 @@ static inline void mdss_mdp_cmd_clk_on(struct mdss_mdp_cmd_ctx *ctx) mdss_mdp_clk_ctrl(MDP_BLOCK_POWER_ON); mdss_mdp_ctl_intf_event - (ctx->ctl, MDSS_EVENT_PANEL_CLK_CTRL, (void *)1); + (ctx->ctl, MDSS_EVENT_PANEL_CLK_CTRL, (void *)1, false); mdss_mdp_hist_intr_setup(&mdata->hist_intr, MDSS_IRQ_RESUME); } spin_lock_irqsave(&ctx->clk_lock, flags); @@ -337,7 +337,7 @@ static inline void mdss_mdp_cmd_clk_off(struct mdss_mdp_cmd_ctx *ctx) ctx->clk_enabled = 0; mdss_mdp_hist_intr_setup(&mdata->hist_intr, MDSS_IRQ_SUSPEND); mdss_mdp_ctl_intf_event - (ctx->ctl, MDSS_EVENT_PANEL_CLK_CTRL, (void *)0); + (ctx->ctl, MDSS_EVENT_PANEL_CLK_CTRL, (void *)0, false); mdss_iommu_ctrl(0); mdss_bus_bandwidth_ctrl(false); mdss_mdp_clk_ctrl(MDP_BLOCK_POWER_OFF); @@ -628,7 +628,8 @@ int mdss_mdp_cmd_reconfigure_splash_done(struct mdss_mdp_ctl *ctl, bool handoff) pdata = ctl->panel_data; - mdss_mdp_ctl_intf_event(ctl, MDSS_EVENT_PANEL_CLK_CTRL, (void *)0); + mdss_mdp_ctl_intf_event(ctl, MDSS_EVENT_PANEL_CLK_CTRL, (void *)0, + false); pdata->panel_info.cont_splash_enabled = 0; if (sctl) @@ -765,7 +766,7 @@ static int mdss_mdp_cmd_set_partial_roi(struct mdss_mdp_ctl *ctl) /* set panel col and page addr */ rc = mdss_mdp_ctl_intf_event(ctl, - MDSS_EVENT_ENABLE_PARTIAL_ROI, NULL); + MDSS_EVENT_ENABLE_PARTIAL_ROI, NULL, false); return rc; } @@ -778,7 +779,7 @@ static int mdss_mdp_cmd_set_stream_size(struct mdss_mdp_ctl *ctl) /* set dsi controller stream size */ rc = mdss_mdp_ctl_intf_event(ctl, - MDSS_EVENT_DSI_STREAM_SIZE, NULL); + MDSS_EVENT_DSI_STREAM_SIZE, NULL, false); return rc; } @@ -798,13 +799,16 @@ static int mdss_mdp_cmd_panel_on(struct mdss_mdp_ctl *ctl, sctx = (struct mdss_mdp_cmd_ctx *) sctl->intf_ctx[MASTER_CTX]; if (!__mdss_mdp_cmd_is_panel_power_on_interactive(ctx)) { - rc = mdss_mdp_ctl_intf_event(ctl, MDSS_EVENT_LINK_READY, NULL); + rc = mdss_mdp_ctl_intf_event(ctl, MDSS_EVENT_LINK_READY, NULL, + false); WARN(rc, "intf %d link ready error (%d)\n", ctl->intf_num, rc); - rc = mdss_mdp_ctl_intf_event(ctl, MDSS_EVENT_UNBLANK, NULL); + rc = mdss_mdp_ctl_intf_event(ctl, MDSS_EVENT_UNBLANK, NULL, + false); WARN(rc, "intf %d unblank error (%d)\n", ctl->intf_num, rc); - rc = mdss_mdp_ctl_intf_event(ctl, MDSS_EVENT_PANEL_ON, NULL); + rc = mdss_mdp_ctl_intf_event(ctl, MDSS_EVENT_PANEL_ON, NULL, + false); WARN(rc, "intf %d panel on error (%d)\n", ctl->intf_num, rc); rc = mdss_mdp_tearcheck_enable(ctl, true); @@ -817,7 +821,7 @@ static int mdss_mdp_cmd_panel_on(struct mdss_mdp_ctl *ctl, mdss_mdp_ctl_intf_event(ctl, MDSS_EVENT_REGISTER_RECOVERY_HANDLER, - (void *)&ctx->intf_recovery); + (void *)&ctx->intf_recovery, false); ctx->intf_stopped = 0; } else { @@ -987,7 +991,7 @@ int mdss_mdp_cmd_kickoff(struct mdss_mdp_ctl *ctl, void *arg) /* * tx dcs command if had any */ - mdss_mdp_ctl_intf_event(ctl, MDSS_EVENT_DSI_CMDLIST_KOFF, NULL); + mdss_mdp_ctl_intf_event(ctl, MDSS_EVENT_DSI_CMDLIST_KOFF, NULL, false); mdss_mdp_cmd_set_stream_size(ctl); @@ -1098,7 +1102,8 @@ int mdss_mdp_cmd_ctx_stop(struct mdss_mdp_ctl *ctl, if (!pend_switch) { mdss_mdp_ctl_intf_event(ctl, MDSS_EVENT_REGISTER_RECOVERY_HANDLER, - NULL); + NULL, + false); } mdss_mdp_cmd_clk_off(ctx); @@ -1283,11 +1288,11 @@ panel_events: (is_panel_split(ctl->mfd) && sctl)) && send_panel_events) { pr_debug("%s: send panel events\n", __func__); ret = mdss_mdp_ctl_intf_event(ctl, MDSS_EVENT_BLANK, - (void *) (long int) panel_power_state); + (void *) (long int) panel_power_state, false); WARN(ret, "intf %d unblank error (%d)\n", ctl->intf_num, ret); ret = mdss_mdp_ctl_intf_event(ctl, MDSS_EVENT_PANEL_OFF, - (void *) (long int) panel_power_state); + (void *) (long int) panel_power_state, false); WARN(ret, "intf %d unblank error (%d)\n", ctl->intf_num, ret); } @@ -1479,14 +1484,14 @@ void mdss_mdp_switch_to_vid_mode(struct mdss_mdp_ctl *ctl, int prep) * to properly enable vid mode compnents */ rc = mdss_mdp_ctl_intf_event - (ctl, MDSS_EVENT_PANEL_CLK_CTRL, (void *)1); + (ctl, MDSS_EVENT_PANEL_CLK_CTRL, (void *)1, false); ctx->pending_mode_switch = 1; return; } mdss_mdp_ctl_intf_event(ctl, MDSS_EVENT_DSI_RECONFIG_CMD, - (void *) mode); + (void *) mode, false); } int mdss_mdp_cmd_start(struct mdss_mdp_ctl *ctl) diff --git a/drivers/video/fbdev/msm/mdss_mdp_intf_video.c b/drivers/video/fbdev/msm/mdss_mdp_intf_video.c index fc43626ee3b9..a59152fae564 100644 --- a/drivers/video/fbdev/msm/mdss_mdp_intf_video.c +++ b/drivers/video/fbdev/msm/mdss_mdp_intf_video.c @@ -454,7 +454,8 @@ static int mdss_mdp_video_ctx_stop(struct mdss_mdp_ctl *ctl, mutex_lock(&ctl->offlock); if (ctx->timegen_en) { - rc = mdss_mdp_ctl_intf_event(ctl, MDSS_EVENT_BLANK, NULL); + rc = mdss_mdp_ctl_intf_event(ctl, MDSS_EVENT_BLANK, NULL, + false); if (rc == -EBUSY) { pr_debug("intf #%d busy don't turn off\n", ctl->intf_num); @@ -469,7 +470,8 @@ static int mdss_mdp_video_ctx_stop(struct mdss_mdp_ctl *ctl, frame_rate = (1000/frame_rate) + 1; mdss_mdp_turn_off_time_engine(ctl, ctx, frame_rate); - rc = mdss_mdp_ctl_intf_event(ctl, MDSS_EVENT_PANEL_OFF, NULL); + rc = mdss_mdp_ctl_intf_event(ctl, MDSS_EVENT_PANEL_OFF, NULL, + false); WARN(rc, "intf %d timegen off error (%d)\n", ctl->intf_num, rc); mdss_bus_bandwidth_ctrl(false); @@ -932,7 +934,8 @@ static int mdss_mdp_video_config_fps(struct mdss_mdp_ctl *ctl, } rc = mdss_mdp_ctl_intf_event(ctl, MDSS_EVENT_PANEL_UPDATE_FPS, - (void *) (unsigned long) new_fps); + (void *) (unsigned long) new_fps, + false); WARN(rc, "intf %d panel fps update error (%d)\n", ctl->intf_num, rc); } else if (pdata->panel_info.dfps_update @@ -980,7 +983,8 @@ static int mdss_mdp_video_config_fps(struct mdss_mdp_ctl *ctl, } rc = mdss_mdp_ctl_intf_event(ctl, MDSS_EVENT_PANEL_UPDATE_FPS, - (void *) (unsigned long) new_fps); + (void *) (unsigned long) new_fps, + false); WARN(rc, "intf %d panel fps update error (%d)\n", ctl->intf_num, rc); @@ -1013,7 +1017,8 @@ exit_dfps: } else { rc = mdss_mdp_ctl_intf_event(ctl, MDSS_EVENT_PANEL_UPDATE_FPS, - (void *) (unsigned long) new_fps); + (void *) (unsigned long) new_fps, + false); WARN(rc, "intf %d panel fps update error (%d)\n", ctl->intf_num, rc); } @@ -1047,7 +1052,8 @@ static int mdss_mdp_video_display(struct mdss_mdp_ctl *ctl, void *arg) MDSS_XLOG(ctl->num, ctl->underrun_cnt); if (!ctx->timegen_en) { - rc = mdss_mdp_ctl_intf_event(ctl, MDSS_EVENT_LINK_READY, NULL); + rc = mdss_mdp_ctl_intf_event(ctl, MDSS_EVENT_LINK_READY, NULL, + false); if (rc) { pr_warn("intf #%d link ready error (%d)\n", ctl->intf_num, rc); @@ -1056,7 +1062,8 @@ static int mdss_mdp_video_display(struct mdss_mdp_ctl *ctl, void *arg) return rc; } - rc = mdss_mdp_ctl_intf_event(ctl, MDSS_EVENT_UNBLANK, NULL); + rc = mdss_mdp_ctl_intf_event(ctl, MDSS_EVENT_UNBLANK, NULL, + false); WARN(rc, "intf %d unblank error (%d)\n", ctl->intf_num, rc); pr_debug("enabling timing gen for intf=%d\n", ctl->intf_num); @@ -1092,9 +1099,11 @@ static int mdss_mdp_video_display(struct mdss_mdp_ctl *ctl, void *arg) rc, ctl->num); ctx->timegen_en = true; - rc = mdss_mdp_ctl_intf_event(ctl, MDSS_EVENT_PANEL_ON, NULL); + rc = mdss_mdp_ctl_intf_event(ctl, MDSS_EVENT_PANEL_ON, NULL, + false); WARN(rc, "intf %d panel on error (%d)\n", ctl->intf_num, rc); - mdss_mdp_ctl_intf_event(ctl, MDSS_EVENT_POST_PANEL_ON, NULL); + mdss_mdp_ctl_intf_event(ctl, MDSS_EVENT_POST_PANEL_ON, NULL, + false); } return 0; @@ -1126,7 +1135,7 @@ int mdss_mdp_video_reconfigure_splash_done(struct mdss_mdp_ctl *ctl, if (!handoff) { ret = mdss_mdp_ctl_intf_event(ctl, MDSS_EVENT_CONT_SPLASH_BEGIN, - NULL); + NULL, false); if (ret) { pr_err("%s: Failed to handle 'CONT_SPLASH_BEGIN' event\n" , __func__); @@ -1152,7 +1161,7 @@ int mdss_mdp_video_reconfigure_splash_done(struct mdss_mdp_ctl *ctl, msleep(20); ret = mdss_mdp_ctl_intf_event(ctl, - MDSS_EVENT_CONT_SPLASH_FINISH, NULL); + MDSS_EVENT_CONT_SPLASH_FINISH, NULL, false); } return ret; @@ -1322,7 +1331,8 @@ static int mdss_mdp_video_ctx_setup(struct mdss_mdp_ctl *ctl, ctx->intf_recovery.data = ctl; if (mdss_mdp_ctl_intf_event(ctl, MDSS_EVENT_REGISTER_RECOVERY_HANDLER, - (void *)&ctx->intf_recovery)) { + (void *)&ctx->intf_recovery, + false)) { pr_err("Failed to register intf recovery handler\n"); return -EINVAL; } @@ -1498,7 +1508,7 @@ void mdss_mdp_switch_to_cmd_mode(struct mdss_mdp_ctl *ctl, int prep) if (!prep) { mdss_mdp_ctl_intf_event(ctl, MDSS_EVENT_DSI_RECONFIG_CMD, - (void *) mode); + (void *) mode, false); return; } @@ -1511,7 +1521,7 @@ void mdss_mdp_switch_to_cmd_mode(struct mdss_mdp_ctl *ctl, int prep) /* Start off by sending command to initial cmd mode */ rc = mdss_mdp_ctl_intf_event(ctl, - MDSS_EVENT_DSI_DYNAMIC_SWITCH, (void *) mode); + MDSS_EVENT_DSI_DYNAMIC_SWITCH, (void *) mode, false); if (rc) { pr_err("intf #%d busy don't turn off, rc=%d\n", ctl->intf_num, rc); diff --git a/drivers/video/fbdev/msm/mdss_mdp_overlay.c b/drivers/video/fbdev/msm/mdss_mdp_overlay.c index 2221258a0aa0..b795f7a23eef 100644 --- a/drivers/video/fbdev/msm/mdss_mdp_overlay.c +++ b/drivers/video/fbdev/msm/mdss_mdp_overlay.c @@ -1718,7 +1718,7 @@ int mdss_mode_switch_post(struct msm_fb_data_type *mfd, u32 mode) pr_debug("%s, start\n", __func__); rc = mdss_mdp_ctl_intf_event(ctl, MDSS_EVENT_DSI_DYNAMIC_SWITCH, - (void *) MIPI_VIDEO_PANEL); + (void *) MIPI_VIDEO_PANEL, false); pr_debug("%s, end\n", __func__); } else if (mode == MIPI_CMD_PANEL) { /* @@ -1727,7 +1727,8 @@ int mdss_mode_switch_post(struct msm_fb_data_type *mfd, u32 mode) * power collapse to work as intended. */ mdss_mdp_ctl_intf_event(ctl, - MDSS_EVENT_PANEL_CLK_CTRL, (void *)0); + MDSS_EVENT_PANEL_CLK_CTRL, (void *)0, + false); } return rc; } @@ -4773,7 +4774,7 @@ static int mdss_mdp_update_panel_info(struct msm_fb_data_type *mfd, struct mdss_mdp_ctl *sctl; ret = mdss_mdp_ctl_intf_event(ctl, MDSS_EVENT_DSI_UPDATE_PANEL_DATA, - (void *)(unsigned long)mode); + (void *)(unsigned long)mode, false); if (ret) pr_err("Dynamic switch to %s mode failed!\n", mode ? "command" : "video");