Loading drivers/video/msm/mdss/mdss_mdp.h +1 −1 Original line number Diff line number Diff line Loading @@ -536,7 +536,7 @@ int mdss_mdp_ctl_setup(struct mdss_mdp_ctl *ctl); int mdss_mdp_ctl_split_display_setup(struct mdss_mdp_ctl *ctl, struct mdss_panel_data *pdata); int mdss_mdp_ctl_destroy(struct mdss_mdp_ctl *ctl); int mdss_mdp_ctl_start(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 mdss_mdp_ctl_intf_event(struct mdss_mdp_ctl *ctl, int event, void *arg); int mdss_mdp_perf_calc_pipe(struct mdss_mdp_pipe *pipe, Loading drivers/video/msm/mdss/mdss_mdp_ctl.c +29 −16 Original line number Diff line number Diff line Loading @@ -1089,25 +1089,33 @@ int mdss_mdp_ctl_intf_event(struct mdss_mdp_ctl *ctl, int event, void *arg) return rc; } static int mdss_mdp_ctl_start_sub(struct mdss_mdp_ctl *ctl) static int mdss_mdp_ctl_start_sub(struct mdss_mdp_ctl *ctl, bool handoff) { struct mdss_mdp_mixer *mixer; u32 outsize, temp; int ret = 0; int i, nmixers; pr_debug("ctl_num=%d\n", ctl->num); /* * Need start_fnc in 2 cases: * (1) handoff * (2) continuous splash finished. */ if (handoff || !ctl->panel_data->panel_info.cont_splash_enabled) { if (ctl->start_fnc) ret = ctl->start_fnc(ctl); else pr_warn("no start function for ctl=%d type=%d\n", ctl->num, pr_warn("no start function for ctl=%d type=%d\n", ctl->num, ctl->panel_data->panel_info.type); if (ret) { pr_err("unable to start intf\n"); return ret; } pr_debug("ctl_num=%d\n", ctl->num); } if (!ctl->panel_data->panel_info.cont_splash_enabled) { nmixers = MDSS_MDP_INTF_MAX_LAYERMIXER + Loading Loading @@ -1135,7 +1143,7 @@ static int mdss_mdp_ctl_start_sub(struct mdss_mdp_ctl *ctl) return ret; } int mdss_mdp_ctl_start(struct mdss_mdp_ctl *ctl) int mdss_mdp_ctl_start(struct mdss_mdp_ctl *ctl, bool handoff) { struct mdss_mdp_ctl *sctl; struct mdss_data_type *mdata = mdss_mdp_get_mdata(); Loading @@ -1150,12 +1158,17 @@ int mdss_mdp_ctl_start(struct mdss_mdp_ctl *ctl) if (ret) return ret; sctl = mdss_mdp_get_split_ctl(ctl); mutex_lock(&ctl->lock); /* * keep power_on false during handoff to avoid unexpected * operations to overlay. */ if (!handoff) ctl->power_on = true; ctl->bus_ab_quota = 0; ctl->bus_ib_quota = 0; ctl->clk_rate = 0; Loading @@ -1168,10 +1181,10 @@ int mdss_mdp_ctl_start(struct mdss_mdp_ctl *ctl) goto error; } ret = mdss_mdp_ctl_start_sub(ctl); ret = mdss_mdp_ctl_start_sub(ctl, handoff); if (ret == 0) { if (sctl) { /* split display is available */ ret = mdss_mdp_ctl_start_sub(sctl); ret = mdss_mdp_ctl_start_sub(sctl, handoff); if (!ret) mdss_mdp_ctl_split_display_enable(1, ctl, sctl); } else if (ctl->mixer_right) { Loading drivers/video/msm/mdss/mdss_mdp_overlay.c +14 −6 Original line number Diff line number Diff line Loading @@ -867,7 +867,7 @@ static int mdss_mdp_overlay_start(struct msm_fb_data_type *mfd) mdss_hw_init(mdss_res); } rc = mdss_mdp_ctl_start(ctl); rc = mdss_mdp_ctl_start(ctl, false); if (rc == 0) { atomic_inc(&ov_active_panels); Loading Loading @@ -1582,8 +1582,8 @@ int mdss_mdp_overlay_vsync_ctrl(struct msm_fb_data_type *mfd, int en) return -ENODEV; if (!ctl->add_vsync_handler || !ctl->remove_vsync_handler) return -EOPNOTSUPP; if (!ctl->power_on) { if (!ctl->panel_data->panel_info.cont_splash_enabled && !ctl->power_on) { pr_debug("fb%d vsync pending first update en=%d\n", mfd->index, en); return -EPERM; Loading Loading @@ -1700,7 +1700,9 @@ static ssize_t mdss_mdp_vsync_show_event(struct device *dev, u64 vsync_ticks; int ret; if (!mdp5_data->ctl || !mdp5_data->ctl->power_on) if (!mdp5_data->ctl || (!mdp5_data->ctl->panel_data->panel_info.cont_splash_enabled && !mdp5_data->ctl->power_on)) return -EAGAIN; vsync_ticks = ktime_to_ns(mdp5_data->vsync_time); Loading Loading @@ -2548,9 +2550,15 @@ static int mdss_mdp_overlay_handoff(struct msm_fb_data_type *mfd) mdp5_data->ctl = ctl; } rc = mdss_mdp_ctl_setup(ctl); if (rc) /* * vsync interrupt needs on during continuous splash, this is * to initialize necessary ctl members here. */ rc = mdss_mdp_ctl_start(ctl, true); if (rc) { pr_err("Failed to initialize ctl\n"); goto error; } ctl->clk_rate = mdss_mdp_get_clk_rate(MDSS_CLK_MDP_SRC); pr_debug("Set the ctl clock rate to %d Hz\n", ctl->clk_rate); Loading Loading
drivers/video/msm/mdss/mdss_mdp.h +1 −1 Original line number Diff line number Diff line Loading @@ -536,7 +536,7 @@ int mdss_mdp_ctl_setup(struct mdss_mdp_ctl *ctl); int mdss_mdp_ctl_split_display_setup(struct mdss_mdp_ctl *ctl, struct mdss_panel_data *pdata); int mdss_mdp_ctl_destroy(struct mdss_mdp_ctl *ctl); int mdss_mdp_ctl_start(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 mdss_mdp_ctl_intf_event(struct mdss_mdp_ctl *ctl, int event, void *arg); int mdss_mdp_perf_calc_pipe(struct mdss_mdp_pipe *pipe, Loading
drivers/video/msm/mdss/mdss_mdp_ctl.c +29 −16 Original line number Diff line number Diff line Loading @@ -1089,25 +1089,33 @@ int mdss_mdp_ctl_intf_event(struct mdss_mdp_ctl *ctl, int event, void *arg) return rc; } static int mdss_mdp_ctl_start_sub(struct mdss_mdp_ctl *ctl) static int mdss_mdp_ctl_start_sub(struct mdss_mdp_ctl *ctl, bool handoff) { struct mdss_mdp_mixer *mixer; u32 outsize, temp; int ret = 0; int i, nmixers; pr_debug("ctl_num=%d\n", ctl->num); /* * Need start_fnc in 2 cases: * (1) handoff * (2) continuous splash finished. */ if (handoff || !ctl->panel_data->panel_info.cont_splash_enabled) { if (ctl->start_fnc) ret = ctl->start_fnc(ctl); else pr_warn("no start function for ctl=%d type=%d\n", ctl->num, pr_warn("no start function for ctl=%d type=%d\n", ctl->num, ctl->panel_data->panel_info.type); if (ret) { pr_err("unable to start intf\n"); return ret; } pr_debug("ctl_num=%d\n", ctl->num); } if (!ctl->panel_data->panel_info.cont_splash_enabled) { nmixers = MDSS_MDP_INTF_MAX_LAYERMIXER + Loading Loading @@ -1135,7 +1143,7 @@ static int mdss_mdp_ctl_start_sub(struct mdss_mdp_ctl *ctl) return ret; } int mdss_mdp_ctl_start(struct mdss_mdp_ctl *ctl) int mdss_mdp_ctl_start(struct mdss_mdp_ctl *ctl, bool handoff) { struct mdss_mdp_ctl *sctl; struct mdss_data_type *mdata = mdss_mdp_get_mdata(); Loading @@ -1150,12 +1158,17 @@ int mdss_mdp_ctl_start(struct mdss_mdp_ctl *ctl) if (ret) return ret; sctl = mdss_mdp_get_split_ctl(ctl); mutex_lock(&ctl->lock); /* * keep power_on false during handoff to avoid unexpected * operations to overlay. */ if (!handoff) ctl->power_on = true; ctl->bus_ab_quota = 0; ctl->bus_ib_quota = 0; ctl->clk_rate = 0; Loading @@ -1168,10 +1181,10 @@ int mdss_mdp_ctl_start(struct mdss_mdp_ctl *ctl) goto error; } ret = mdss_mdp_ctl_start_sub(ctl); ret = mdss_mdp_ctl_start_sub(ctl, handoff); if (ret == 0) { if (sctl) { /* split display is available */ ret = mdss_mdp_ctl_start_sub(sctl); ret = mdss_mdp_ctl_start_sub(sctl, handoff); if (!ret) mdss_mdp_ctl_split_display_enable(1, ctl, sctl); } else if (ctl->mixer_right) { Loading
drivers/video/msm/mdss/mdss_mdp_overlay.c +14 −6 Original line number Diff line number Diff line Loading @@ -867,7 +867,7 @@ static int mdss_mdp_overlay_start(struct msm_fb_data_type *mfd) mdss_hw_init(mdss_res); } rc = mdss_mdp_ctl_start(ctl); rc = mdss_mdp_ctl_start(ctl, false); if (rc == 0) { atomic_inc(&ov_active_panels); Loading Loading @@ -1582,8 +1582,8 @@ int mdss_mdp_overlay_vsync_ctrl(struct msm_fb_data_type *mfd, int en) return -ENODEV; if (!ctl->add_vsync_handler || !ctl->remove_vsync_handler) return -EOPNOTSUPP; if (!ctl->power_on) { if (!ctl->panel_data->panel_info.cont_splash_enabled && !ctl->power_on) { pr_debug("fb%d vsync pending first update en=%d\n", mfd->index, en); return -EPERM; Loading Loading @@ -1700,7 +1700,9 @@ static ssize_t mdss_mdp_vsync_show_event(struct device *dev, u64 vsync_ticks; int ret; if (!mdp5_data->ctl || !mdp5_data->ctl->power_on) if (!mdp5_data->ctl || (!mdp5_data->ctl->panel_data->panel_info.cont_splash_enabled && !mdp5_data->ctl->power_on)) return -EAGAIN; vsync_ticks = ktime_to_ns(mdp5_data->vsync_time); Loading Loading @@ -2548,9 +2550,15 @@ static int mdss_mdp_overlay_handoff(struct msm_fb_data_type *mfd) mdp5_data->ctl = ctl; } rc = mdss_mdp_ctl_setup(ctl); if (rc) /* * vsync interrupt needs on during continuous splash, this is * to initialize necessary ctl members here. */ rc = mdss_mdp_ctl_start(ctl, true); if (rc) { pr_err("Failed to initialize ctl\n"); goto error; } ctl->clk_rate = mdss_mdp_get_clk_rate(MDSS_CLK_MDP_SRC); pr_debug("Set the ctl clock rate to %d Hz\n", ctl->clk_rate); Loading