Loading drivers/video/msm/mdss/mdss_dsi_host.c +18 −4 Original line number Diff line number Diff line Loading @@ -746,6 +746,8 @@ static void mdss_dsi_ctl_phy_reset(struct mdss_dsi_ctrl_pdata *ctrl, u32 event) u32 data0, data1, mask = 0, data_lane_en = 0; struct mdss_dsi_ctrl_pdata *ctrl0, *ctrl1; u32 ln0, ln1, ln_ctrl0, ln_ctrl1, i; int rc = 0; /* * Add 2 ms delay suggested by HW team. * Check clk lane stop state after every 200 us Loading @@ -767,9 +769,15 @@ static void mdss_dsi_ctl_phy_reset(struct mdss_dsi_ctrl_pdata *ctrl, u32 event) ctrl0 = mdss_dsi_get_ctrl_by_index(DSI_CTRL_0); ctrl1 = mdss_dsi_get_ctrl_by_index(DSI_CTRL_1); if (ctrl0->recovery) ctrl0->recovery->fxn(ctrl0->recovery->data, if (ctrl0->recovery) { rc = ctrl0->recovery->fxn(ctrl0->recovery->data, MDP_INTF_DSI_VIDEO_FIFO_OVERFLOW); if (rc < 0) { pr_debug("%s: Target is in suspend/shutdown\n", __func__); return; } } /* * Disable PHY contention detection and receive. * Configure the strength ctrl 1 register. Loading Loading @@ -859,9 +867,15 @@ static void mdss_dsi_ctl_phy_reset(struct mdss_dsi_ctrl_pdata *ctrl, u32 event) */ udelay(200); } else { if (ctrl->recovery) ctrl->recovery->fxn(ctrl->recovery->data, if (ctrl->recovery) { rc = ctrl->recovery->fxn(ctrl->recovery->data, MDP_INTF_DSI_VIDEO_FIFO_OVERFLOW); if (rc < 0) { pr_debug("%s: Target is in suspend/shutdown\n", __func__); return; } } /* Disable PHY contention detection and receive */ MIPI_OUTP((ctrl->phy_io.base) + 0x0188, 0); Loading drivers/video/msm/mdss/mdss_mdp_intf_cmd.c +11 −9 Original line number Diff line number Diff line Loading @@ -1027,7 +1027,7 @@ static int mdss_mdp_cmd_wait4readptr(struct mdss_mdp_cmd_ctx *ctx) return rc; } static void mdss_mdp_cmd_intf_callback(void *data, int event) static int mdss_mdp_cmd_intf_callback(void *data, int event) { struct mdss_mdp_cmd_ctx *ctx = data; struct mdss_mdp_pp_tear_check *te = NULL; Loading @@ -1036,11 +1036,11 @@ static void mdss_mdp_cmd_intf_callback(void *data, int event) if (!data) { pr_err("%s: invalid ctx\n", __func__); return; return -EINVAL; } if (!ctx->ctl) return; return -EINVAL; switch (event) { case MDP_INTF_CALLBACK_DSI_WAIT: Loading @@ -1052,7 +1052,7 @@ static void mdss_mdp_cmd_intf_callback(void *data, int event) * just return */ if (ctx->intf_stopped || !is_pingpong_split(ctx->ctl->mfd)) return; return -EINVAL; atomic_inc(&ctx->rdptr_cnt); /* enable clks and rd_ptr interrupt */ Loading @@ -1061,7 +1061,7 @@ static void mdss_mdp_cmd_intf_callback(void *data, int event) mixer = mdss_mdp_mixer_get(ctx->ctl, MDSS_MDP_MIXER_MUX_LEFT); if (!mixer) { pr_err("%s: null mixer\n", __func__); return; return -EINVAL; } /* wait for read pointer */ Loading @@ -1085,6 +1085,7 @@ static void mdss_mdp_cmd_intf_callback(void *data, int event) pr_debug("%s: unhandled event=%d\n", __func__, event); break; } return 0; } static void mdss_mdp_cmd_lineptr_done(void *arg) Loading @@ -1110,7 +1111,7 @@ static void mdss_mdp_cmd_lineptr_done(void *arg) spin_unlock(&ctx->clk_lock); } static void mdss_mdp_cmd_intf_recovery(void *data, int event) static int mdss_mdp_cmd_intf_recovery(void *data, int event) { struct mdss_mdp_cmd_ctx *ctx = data; unsigned long flags; Loading @@ -1118,11 +1119,11 @@ static void mdss_mdp_cmd_intf_recovery(void *data, int event) if (!data) { pr_err("%s: invalid ctx\n", __func__); return; return -EINVAL; } if (!ctx->ctl) return; return -EINVAL; /* * Currently, only intf_fifo_underflow is Loading @@ -1132,7 +1133,7 @@ static void mdss_mdp_cmd_intf_recovery(void *data, int event) if (event != MDP_INTF_DSI_CMD_FIFO_UNDERFLOW) { pr_warn("%s: unsupported recovery event:%d\n", __func__, event); return; return -EPERM; } if (atomic_read(&ctx->koff_cnt)) { Loading @@ -1156,6 +1157,7 @@ static void mdss_mdp_cmd_intf_recovery(void *data, int event) if (notify_frame_timeout) mdss_mdp_ctl_notify(ctx->ctl, MDP_NOTIFY_FRAME_TIMEOUT); return 0; } static void mdss_mdp_cmd_pingpong_done(void *arg) Loading drivers/video/msm/mdss/mdss_mdp_intf_video.c +7 −7 Original line number Diff line number Diff line Loading @@ -310,7 +310,7 @@ int mdss_mdp_video_addr_setup(struct mdss_data_type *mdata, return 0; } static void mdss_mdp_video_intf_recovery(void *data, int event) static int mdss_mdp_video_intf_recovery(void *data, int event) { struct mdss_mdp_video_ctx *ctx; struct mdss_mdp_ctl *ctl = data; Loading @@ -322,7 +322,7 @@ static void mdss_mdp_video_intf_recovery(void *data, int event) if (!data) { pr_err("%s: invalid ctl\n", __func__); return; return -EINVAL; } /* Loading @@ -333,7 +333,7 @@ static void mdss_mdp_video_intf_recovery(void *data, int event) if (event != MDP_INTF_DSI_VIDEO_FIFO_OVERFLOW) { pr_warn("%s: unsupported recovery event:%d\n", __func__, event); return; return -EPERM; } ctx = ctl->intf_ctx[MASTER_CTX]; Loading @@ -348,7 +348,7 @@ static void mdss_mdp_video_intf_recovery(void *data, int event) clk_rate = DIV_ROUND_UP_ULL(clk_rate, 1000); /* in kHz */ if (!clk_rate) { pr_err("Unable to get proper clk_rate\n"); return; return -EINVAL; } /* * calculate clk_period as pico second to maintain good Loading @@ -358,7 +358,7 @@ static void mdss_mdp_video_intf_recovery(void *data, int event) clk_period = DIV_ROUND_UP_ULL(1000000000, clk_rate); if (!clk_period) { pr_err("Unable to calculate clock period\n"); return; return -EINVAL; } min_ln_cnt = pinfo->lcdc.v_back_porch + pinfo->lcdc.v_pulse_width; active_lns_cnt = pinfo->yres; Loading @@ -384,7 +384,7 @@ static void mdss_mdp_video_intf_recovery(void *data, int event) !ctx->timegen_en) { pr_warn("Target is in suspend or shutdown pending\n"); mutex_unlock(&ctl->offlock); return; return -EPERM; } line_cnt = mdss_mdp_video_line_count(ctl); Loading @@ -394,7 +394,7 @@ static void mdss_mdp_video_intf_recovery(void *data, int event) pr_debug("%s, Needed lines left line_cnt=%d\n", __func__, line_cnt); mutex_unlock(&ctl->offlock); return; return 0; } else { pr_warn("line count is less. line_cnt = %d\n", line_cnt); Loading drivers/video/msm/mdss/mdss_panel.h +1 −1 Original line number Diff line number Diff line Loading @@ -166,7 +166,7 @@ enum { }; struct mdss_intf_recovery { void (*fxn)(void *ctx, int event); int (*fxn)(void *ctx, int event); void *data; }; Loading Loading
drivers/video/msm/mdss/mdss_dsi_host.c +18 −4 Original line number Diff line number Diff line Loading @@ -746,6 +746,8 @@ static void mdss_dsi_ctl_phy_reset(struct mdss_dsi_ctrl_pdata *ctrl, u32 event) u32 data0, data1, mask = 0, data_lane_en = 0; struct mdss_dsi_ctrl_pdata *ctrl0, *ctrl1; u32 ln0, ln1, ln_ctrl0, ln_ctrl1, i; int rc = 0; /* * Add 2 ms delay suggested by HW team. * Check clk lane stop state after every 200 us Loading @@ -767,9 +769,15 @@ static void mdss_dsi_ctl_phy_reset(struct mdss_dsi_ctrl_pdata *ctrl, u32 event) ctrl0 = mdss_dsi_get_ctrl_by_index(DSI_CTRL_0); ctrl1 = mdss_dsi_get_ctrl_by_index(DSI_CTRL_1); if (ctrl0->recovery) ctrl0->recovery->fxn(ctrl0->recovery->data, if (ctrl0->recovery) { rc = ctrl0->recovery->fxn(ctrl0->recovery->data, MDP_INTF_DSI_VIDEO_FIFO_OVERFLOW); if (rc < 0) { pr_debug("%s: Target is in suspend/shutdown\n", __func__); return; } } /* * Disable PHY contention detection and receive. * Configure the strength ctrl 1 register. Loading Loading @@ -859,9 +867,15 @@ static void mdss_dsi_ctl_phy_reset(struct mdss_dsi_ctrl_pdata *ctrl, u32 event) */ udelay(200); } else { if (ctrl->recovery) ctrl->recovery->fxn(ctrl->recovery->data, if (ctrl->recovery) { rc = ctrl->recovery->fxn(ctrl->recovery->data, MDP_INTF_DSI_VIDEO_FIFO_OVERFLOW); if (rc < 0) { pr_debug("%s: Target is in suspend/shutdown\n", __func__); return; } } /* Disable PHY contention detection and receive */ MIPI_OUTP((ctrl->phy_io.base) + 0x0188, 0); Loading
drivers/video/msm/mdss/mdss_mdp_intf_cmd.c +11 −9 Original line number Diff line number Diff line Loading @@ -1027,7 +1027,7 @@ static int mdss_mdp_cmd_wait4readptr(struct mdss_mdp_cmd_ctx *ctx) return rc; } static void mdss_mdp_cmd_intf_callback(void *data, int event) static int mdss_mdp_cmd_intf_callback(void *data, int event) { struct mdss_mdp_cmd_ctx *ctx = data; struct mdss_mdp_pp_tear_check *te = NULL; Loading @@ -1036,11 +1036,11 @@ static void mdss_mdp_cmd_intf_callback(void *data, int event) if (!data) { pr_err("%s: invalid ctx\n", __func__); return; return -EINVAL; } if (!ctx->ctl) return; return -EINVAL; switch (event) { case MDP_INTF_CALLBACK_DSI_WAIT: Loading @@ -1052,7 +1052,7 @@ static void mdss_mdp_cmd_intf_callback(void *data, int event) * just return */ if (ctx->intf_stopped || !is_pingpong_split(ctx->ctl->mfd)) return; return -EINVAL; atomic_inc(&ctx->rdptr_cnt); /* enable clks and rd_ptr interrupt */ Loading @@ -1061,7 +1061,7 @@ static void mdss_mdp_cmd_intf_callback(void *data, int event) mixer = mdss_mdp_mixer_get(ctx->ctl, MDSS_MDP_MIXER_MUX_LEFT); if (!mixer) { pr_err("%s: null mixer\n", __func__); return; return -EINVAL; } /* wait for read pointer */ Loading @@ -1085,6 +1085,7 @@ static void mdss_mdp_cmd_intf_callback(void *data, int event) pr_debug("%s: unhandled event=%d\n", __func__, event); break; } return 0; } static void mdss_mdp_cmd_lineptr_done(void *arg) Loading @@ -1110,7 +1111,7 @@ static void mdss_mdp_cmd_lineptr_done(void *arg) spin_unlock(&ctx->clk_lock); } static void mdss_mdp_cmd_intf_recovery(void *data, int event) static int mdss_mdp_cmd_intf_recovery(void *data, int event) { struct mdss_mdp_cmd_ctx *ctx = data; unsigned long flags; Loading @@ -1118,11 +1119,11 @@ static void mdss_mdp_cmd_intf_recovery(void *data, int event) if (!data) { pr_err("%s: invalid ctx\n", __func__); return; return -EINVAL; } if (!ctx->ctl) return; return -EINVAL; /* * Currently, only intf_fifo_underflow is Loading @@ -1132,7 +1133,7 @@ static void mdss_mdp_cmd_intf_recovery(void *data, int event) if (event != MDP_INTF_DSI_CMD_FIFO_UNDERFLOW) { pr_warn("%s: unsupported recovery event:%d\n", __func__, event); return; return -EPERM; } if (atomic_read(&ctx->koff_cnt)) { Loading @@ -1156,6 +1157,7 @@ static void mdss_mdp_cmd_intf_recovery(void *data, int event) if (notify_frame_timeout) mdss_mdp_ctl_notify(ctx->ctl, MDP_NOTIFY_FRAME_TIMEOUT); return 0; } static void mdss_mdp_cmd_pingpong_done(void *arg) Loading
drivers/video/msm/mdss/mdss_mdp_intf_video.c +7 −7 Original line number Diff line number Diff line Loading @@ -310,7 +310,7 @@ int mdss_mdp_video_addr_setup(struct mdss_data_type *mdata, return 0; } static void mdss_mdp_video_intf_recovery(void *data, int event) static int mdss_mdp_video_intf_recovery(void *data, int event) { struct mdss_mdp_video_ctx *ctx; struct mdss_mdp_ctl *ctl = data; Loading @@ -322,7 +322,7 @@ static void mdss_mdp_video_intf_recovery(void *data, int event) if (!data) { pr_err("%s: invalid ctl\n", __func__); return; return -EINVAL; } /* Loading @@ -333,7 +333,7 @@ static void mdss_mdp_video_intf_recovery(void *data, int event) if (event != MDP_INTF_DSI_VIDEO_FIFO_OVERFLOW) { pr_warn("%s: unsupported recovery event:%d\n", __func__, event); return; return -EPERM; } ctx = ctl->intf_ctx[MASTER_CTX]; Loading @@ -348,7 +348,7 @@ static void mdss_mdp_video_intf_recovery(void *data, int event) clk_rate = DIV_ROUND_UP_ULL(clk_rate, 1000); /* in kHz */ if (!clk_rate) { pr_err("Unable to get proper clk_rate\n"); return; return -EINVAL; } /* * calculate clk_period as pico second to maintain good Loading @@ -358,7 +358,7 @@ static void mdss_mdp_video_intf_recovery(void *data, int event) clk_period = DIV_ROUND_UP_ULL(1000000000, clk_rate); if (!clk_period) { pr_err("Unable to calculate clock period\n"); return; return -EINVAL; } min_ln_cnt = pinfo->lcdc.v_back_porch + pinfo->lcdc.v_pulse_width; active_lns_cnt = pinfo->yres; Loading @@ -384,7 +384,7 @@ static void mdss_mdp_video_intf_recovery(void *data, int event) !ctx->timegen_en) { pr_warn("Target is in suspend or shutdown pending\n"); mutex_unlock(&ctl->offlock); return; return -EPERM; } line_cnt = mdss_mdp_video_line_count(ctl); Loading @@ -394,7 +394,7 @@ static void mdss_mdp_video_intf_recovery(void *data, int event) pr_debug("%s, Needed lines left line_cnt=%d\n", __func__, line_cnt); mutex_unlock(&ctl->offlock); return; return 0; } else { pr_warn("line count is less. line_cnt = %d\n", line_cnt); Loading
drivers/video/msm/mdss/mdss_panel.h +1 −1 Original line number Diff line number Diff line Loading @@ -166,7 +166,7 @@ enum { }; struct mdss_intf_recovery { void (*fxn)(void *ctx, int event); int (*fxn)(void *ctx, int event); void *data; }; Loading