Loading drivers/video/msm/mdss/mdss_dsi.c +3 −4 Original line number Original line Diff line number Diff line Loading @@ -658,9 +658,6 @@ static int mdss_dsi_reconfig(struct mdss_panel_data *pdata, int mode) mdss_dsi_clk_ctrl(ctrl_pdata, DSI_ALL_CLKS, 0); mdss_dsi_clk_ctrl(ctrl_pdata, DSI_ALL_CLKS, 0); } } if (mode == MIPI_CMD_PANEL) mdss_dsi_clk_ctrl(ctrl_pdata, DSI_ALL_CLKS, 0); pr_debug("%s, end\n", __func__); pr_debug("%s, end\n", __func__); return 0; return 0; } } Loading @@ -675,11 +672,13 @@ static int mdss_dsi_update_panel_config(struct mdss_dsi_ctrl_pdata *ctrl_pdata, pinfo->type = MIPI_CMD_PANEL; pinfo->type = MIPI_CMD_PANEL; pinfo->mipi.vsync_enable = 1; pinfo->mipi.vsync_enable = 1; pinfo->mipi.hw_vsync_mode = 1; pinfo->mipi.hw_vsync_mode = 1; pinfo->partial_update_enabled = pinfo->partial_update_supported; } else { /*video mode*/ } else { /*video mode*/ pinfo->mipi.mode = DSI_VIDEO_MODE; pinfo->mipi.mode = DSI_VIDEO_MODE; pinfo->type = MIPI_VIDEO_PANEL; pinfo->type = MIPI_VIDEO_PANEL; pinfo->mipi.vsync_enable = 0; pinfo->mipi.vsync_enable = 0; pinfo->mipi.hw_vsync_mode = 0; pinfo->mipi.hw_vsync_mode = 0; pinfo->partial_update_enabled = 0; } } ctrl_pdata->panel_mode = pinfo->mipi.mode; ctrl_pdata->panel_mode = pinfo->mipi.mode; Loading Loading @@ -1320,7 +1319,7 @@ static int mdss_dsi_set_stream_size(struct mdss_panel_data *pdata) pinfo = &pdata->panel_info; pinfo = &pdata->panel_info; if (!pinfo->partial_update_enabled) if (!pinfo->partial_update_supported) return -EINVAL; return -EINVAL; roi = &pinfo->roi; roi = &pinfo->roi; Loading drivers/video/msm/mdss/mdss_dsi_panel.c +3 −2 Original line number Original line Diff line number Diff line Loading @@ -1265,9 +1265,10 @@ static int mdss_dsi_parse_panel_features(struct device_node *np, pinfo->cont_splash_enabled = of_property_read_bool(np, pinfo->cont_splash_enabled = of_property_read_bool(np, "qcom,cont-splash-enabled"); "qcom,cont-splash-enabled"); if (pinfo->mipi.mode == DSI_CMD_MODE) { pinfo->partial_update_supported = of_property_read_bool(np, pinfo->partial_update_enabled = of_property_read_bool(np, "qcom,partial-update-enabled"); "qcom,partial-update-enabled"); if (pinfo->mipi.mode == DSI_CMD_MODE) { pinfo->partial_update_enabled = pinfo->partial_update_supported; pr_info("%s: partial_update_enabled=%d\n", __func__, pr_info("%s: partial_update_enabled=%d\n", __func__, pinfo->partial_update_enabled); pinfo->partial_update_enabled); if (pinfo->partial_update_enabled) { if (pinfo->partial_update_enabled) { Loading drivers/video/msm/mdss/mdss_mdp.h +1 −0 Original line number Original line Diff line number Diff line Loading @@ -881,6 +881,7 @@ int mdss_mdp_overlay_start(struct msm_fb_data_type *mfd); int mdss_mdp_video_addr_setup(struct mdss_data_type *mdata, int mdss_mdp_video_addr_setup(struct mdss_data_type *mdata, u32 *offsets, u32 count); u32 *offsets, u32 count); int mdss_mdp_video_start(struct mdss_mdp_ctl *ctl); int mdss_mdp_video_start(struct mdss_mdp_ctl *ctl); void mdss_mdp_switch_roi_reset(struct mdss_mdp_ctl *ctl); void mdss_mdp_switch_to_cmd_mode(struct mdss_mdp_ctl *ctl, int prep); void mdss_mdp_switch_to_cmd_mode(struct mdss_mdp_ctl *ctl, int prep); void mdss_mdp_switch_to_vid_mode(struct mdss_mdp_ctl *ctl, int prep); void mdss_mdp_switch_to_vid_mode(struct mdss_mdp_ctl *ctl, int prep); void *mdss_mdp_get_intf_base_addr(struct mdss_data_type *mdata, void *mdss_mdp_get_intf_base_addr(struct mdss_data_type *mdata, Loading drivers/video/msm/mdss/mdss_mdp_intf_cmd.c +17 −2 Original line number Original line Diff line number Diff line Loading @@ -709,7 +709,7 @@ static int mdss_mdp_cmd_set_partial_roi(struct mdss_mdp_ctl *ctl) { { int rc = 0; int rc = 0; if (!ctl->panel_data->panel_info.partial_update_enabled) if (!ctl->panel_data->panel_info.partial_update_supported) return rc; return rc; /* set panel col and page addr */ /* set panel col and page addr */ Loading @@ -722,7 +722,7 @@ static int mdss_mdp_cmd_set_stream_size(struct mdss_mdp_ctl *ctl) { { int rc = 0; int rc = 0; if (!ctl->panel_data->panel_info.partial_update_enabled) if (!ctl->panel_data->panel_info.partial_update_supported) return rc; return rc; /* set dsi controller stream size */ /* set dsi controller stream size */ Loading Loading @@ -1385,6 +1385,21 @@ static int mdss_mdp_cmd_intfs_setup(struct mdss_mdp_ctl *ctl, return 0; return 0; } } void mdss_mdp_switch_roi_reset(struct mdss_mdp_ctl *ctl) { struct mdss_mdp_ctl *sctl = mdss_mdp_get_split_ctl(ctl); if (!ctl->panel_data || !ctl->panel_data->panel_info.partial_update_supported) return; ctl->panel_data->panel_info.roi = ctl->roi; if (sctl && sctl->panel_data) sctl->panel_data->panel_info.roi = sctl->roi; mdss_mdp_cmd_set_partial_roi(ctl); } void mdss_mdp_switch_to_vid_mode(struct mdss_mdp_ctl *ctl, int prep) void mdss_mdp_switch_to_vid_mode(struct mdss_mdp_ctl *ctl, int prep) { { struct mdss_mdp_cmd_ctx *ctx = ctl->intf_ctx[MASTER_CTX]; struct mdss_mdp_cmd_ctx *ctx = ctl->intf_ctx[MASTER_CTX]; Loading drivers/video/msm/mdss/mdss_mdp_overlay.c +23 −0 Original line number Original line Diff line number Diff line Loading @@ -1616,6 +1616,7 @@ void mdss_pend_mode_switch(struct msm_fb_data_type *mfd, bool pend_switch) int mdss_mode_switch(struct msm_fb_data_type *mfd, u32 mode) int mdss_mode_switch(struct msm_fb_data_type *mfd, u32 mode) { { struct mdp_display_commit temp_data; struct mdss_mdp_ctl *ctl = mfd_to_ctl(mfd); struct mdss_mdp_ctl *ctl = mfd_to_ctl(mfd); int rc; int rc; Loading @@ -1623,6 +1624,20 @@ int mdss_mode_switch(struct msm_fb_data_type *mfd, u32 mode) /* No need for mode validation. It has been done in ioctl call */ /* No need for mode validation. It has been done in ioctl call */ if (mode == MIPI_CMD_PANEL) { if (mode == MIPI_CMD_PANEL) { /* * Need to reset roi if there was partial update in previous * Command frame */ temp_data.l_roi = (struct mdp_rect){0, 0, ctl->mixer_left->width, ctl->mixer_left->height}; if (ctl->mixer_right) { temp_data.r_roi = (struct mdp_rect) {0, 0, ctl->mixer_right->width, ctl->mixer_right->height}; } mdss_mdp_set_roi(ctl, &temp_data); mdss_mdp_switch_roi_reset(ctl); mdss_mdp_switch_to_cmd_mode(ctl, 1); mdss_mdp_switch_to_cmd_mode(ctl, 1); mdss_mdp_update_panel_info(mfd, 1, 0); mdss_mdp_update_panel_info(mfd, 1, 0); mdss_mdp_switch_to_cmd_mode(ctl, 0); mdss_mdp_switch_to_cmd_mode(ctl, 0); Loading Loading @@ -1671,6 +1686,14 @@ int mdss_mode_switch_post(struct msm_fb_data_type *mfd, u32 mode) MDSS_EVENT_DSI_DYNAMIC_SWITCH, MDSS_EVENT_DSI_DYNAMIC_SWITCH, (void *) MIPI_VIDEO_PANEL); (void *) MIPI_VIDEO_PANEL); pr_debug("%s, end\n", __func__); pr_debug("%s, end\n", __func__); } else if (mode == MIPI_CMD_PANEL) { /* * Needed to balance out clk refcount when going * from video to command. This allows for idle * power collapse to work as intended. */ mdss_mdp_ctl_intf_event(ctl, MDSS_EVENT_PANEL_CLK_CTRL, (void *)0); } } return rc; return rc; } } Loading Loading
drivers/video/msm/mdss/mdss_dsi.c +3 −4 Original line number Original line Diff line number Diff line Loading @@ -658,9 +658,6 @@ static int mdss_dsi_reconfig(struct mdss_panel_data *pdata, int mode) mdss_dsi_clk_ctrl(ctrl_pdata, DSI_ALL_CLKS, 0); mdss_dsi_clk_ctrl(ctrl_pdata, DSI_ALL_CLKS, 0); } } if (mode == MIPI_CMD_PANEL) mdss_dsi_clk_ctrl(ctrl_pdata, DSI_ALL_CLKS, 0); pr_debug("%s, end\n", __func__); pr_debug("%s, end\n", __func__); return 0; return 0; } } Loading @@ -675,11 +672,13 @@ static int mdss_dsi_update_panel_config(struct mdss_dsi_ctrl_pdata *ctrl_pdata, pinfo->type = MIPI_CMD_PANEL; pinfo->type = MIPI_CMD_PANEL; pinfo->mipi.vsync_enable = 1; pinfo->mipi.vsync_enable = 1; pinfo->mipi.hw_vsync_mode = 1; pinfo->mipi.hw_vsync_mode = 1; pinfo->partial_update_enabled = pinfo->partial_update_supported; } else { /*video mode*/ } else { /*video mode*/ pinfo->mipi.mode = DSI_VIDEO_MODE; pinfo->mipi.mode = DSI_VIDEO_MODE; pinfo->type = MIPI_VIDEO_PANEL; pinfo->type = MIPI_VIDEO_PANEL; pinfo->mipi.vsync_enable = 0; pinfo->mipi.vsync_enable = 0; pinfo->mipi.hw_vsync_mode = 0; pinfo->mipi.hw_vsync_mode = 0; pinfo->partial_update_enabled = 0; } } ctrl_pdata->panel_mode = pinfo->mipi.mode; ctrl_pdata->panel_mode = pinfo->mipi.mode; Loading Loading @@ -1320,7 +1319,7 @@ static int mdss_dsi_set_stream_size(struct mdss_panel_data *pdata) pinfo = &pdata->panel_info; pinfo = &pdata->panel_info; if (!pinfo->partial_update_enabled) if (!pinfo->partial_update_supported) return -EINVAL; return -EINVAL; roi = &pinfo->roi; roi = &pinfo->roi; Loading
drivers/video/msm/mdss/mdss_dsi_panel.c +3 −2 Original line number Original line Diff line number Diff line Loading @@ -1265,9 +1265,10 @@ static int mdss_dsi_parse_panel_features(struct device_node *np, pinfo->cont_splash_enabled = of_property_read_bool(np, pinfo->cont_splash_enabled = of_property_read_bool(np, "qcom,cont-splash-enabled"); "qcom,cont-splash-enabled"); if (pinfo->mipi.mode == DSI_CMD_MODE) { pinfo->partial_update_supported = of_property_read_bool(np, pinfo->partial_update_enabled = of_property_read_bool(np, "qcom,partial-update-enabled"); "qcom,partial-update-enabled"); if (pinfo->mipi.mode == DSI_CMD_MODE) { pinfo->partial_update_enabled = pinfo->partial_update_supported; pr_info("%s: partial_update_enabled=%d\n", __func__, pr_info("%s: partial_update_enabled=%d\n", __func__, pinfo->partial_update_enabled); pinfo->partial_update_enabled); if (pinfo->partial_update_enabled) { if (pinfo->partial_update_enabled) { Loading
drivers/video/msm/mdss/mdss_mdp.h +1 −0 Original line number Original line Diff line number Diff line Loading @@ -881,6 +881,7 @@ int mdss_mdp_overlay_start(struct msm_fb_data_type *mfd); int mdss_mdp_video_addr_setup(struct mdss_data_type *mdata, int mdss_mdp_video_addr_setup(struct mdss_data_type *mdata, u32 *offsets, u32 count); u32 *offsets, u32 count); int mdss_mdp_video_start(struct mdss_mdp_ctl *ctl); int mdss_mdp_video_start(struct mdss_mdp_ctl *ctl); void mdss_mdp_switch_roi_reset(struct mdss_mdp_ctl *ctl); void mdss_mdp_switch_to_cmd_mode(struct mdss_mdp_ctl *ctl, int prep); void mdss_mdp_switch_to_cmd_mode(struct mdss_mdp_ctl *ctl, int prep); void mdss_mdp_switch_to_vid_mode(struct mdss_mdp_ctl *ctl, int prep); void mdss_mdp_switch_to_vid_mode(struct mdss_mdp_ctl *ctl, int prep); void *mdss_mdp_get_intf_base_addr(struct mdss_data_type *mdata, void *mdss_mdp_get_intf_base_addr(struct mdss_data_type *mdata, Loading
drivers/video/msm/mdss/mdss_mdp_intf_cmd.c +17 −2 Original line number Original line Diff line number Diff line Loading @@ -709,7 +709,7 @@ static int mdss_mdp_cmd_set_partial_roi(struct mdss_mdp_ctl *ctl) { { int rc = 0; int rc = 0; if (!ctl->panel_data->panel_info.partial_update_enabled) if (!ctl->panel_data->panel_info.partial_update_supported) return rc; return rc; /* set panel col and page addr */ /* set panel col and page addr */ Loading @@ -722,7 +722,7 @@ static int mdss_mdp_cmd_set_stream_size(struct mdss_mdp_ctl *ctl) { { int rc = 0; int rc = 0; if (!ctl->panel_data->panel_info.partial_update_enabled) if (!ctl->panel_data->panel_info.partial_update_supported) return rc; return rc; /* set dsi controller stream size */ /* set dsi controller stream size */ Loading Loading @@ -1385,6 +1385,21 @@ static int mdss_mdp_cmd_intfs_setup(struct mdss_mdp_ctl *ctl, return 0; return 0; } } void mdss_mdp_switch_roi_reset(struct mdss_mdp_ctl *ctl) { struct mdss_mdp_ctl *sctl = mdss_mdp_get_split_ctl(ctl); if (!ctl->panel_data || !ctl->panel_data->panel_info.partial_update_supported) return; ctl->panel_data->panel_info.roi = ctl->roi; if (sctl && sctl->panel_data) sctl->panel_data->panel_info.roi = sctl->roi; mdss_mdp_cmd_set_partial_roi(ctl); } void mdss_mdp_switch_to_vid_mode(struct mdss_mdp_ctl *ctl, int prep) void mdss_mdp_switch_to_vid_mode(struct mdss_mdp_ctl *ctl, int prep) { { struct mdss_mdp_cmd_ctx *ctx = ctl->intf_ctx[MASTER_CTX]; struct mdss_mdp_cmd_ctx *ctx = ctl->intf_ctx[MASTER_CTX]; Loading
drivers/video/msm/mdss/mdss_mdp_overlay.c +23 −0 Original line number Original line Diff line number Diff line Loading @@ -1616,6 +1616,7 @@ void mdss_pend_mode_switch(struct msm_fb_data_type *mfd, bool pend_switch) int mdss_mode_switch(struct msm_fb_data_type *mfd, u32 mode) int mdss_mode_switch(struct msm_fb_data_type *mfd, u32 mode) { { struct mdp_display_commit temp_data; struct mdss_mdp_ctl *ctl = mfd_to_ctl(mfd); struct mdss_mdp_ctl *ctl = mfd_to_ctl(mfd); int rc; int rc; Loading @@ -1623,6 +1624,20 @@ int mdss_mode_switch(struct msm_fb_data_type *mfd, u32 mode) /* No need for mode validation. It has been done in ioctl call */ /* No need for mode validation. It has been done in ioctl call */ if (mode == MIPI_CMD_PANEL) { if (mode == MIPI_CMD_PANEL) { /* * Need to reset roi if there was partial update in previous * Command frame */ temp_data.l_roi = (struct mdp_rect){0, 0, ctl->mixer_left->width, ctl->mixer_left->height}; if (ctl->mixer_right) { temp_data.r_roi = (struct mdp_rect) {0, 0, ctl->mixer_right->width, ctl->mixer_right->height}; } mdss_mdp_set_roi(ctl, &temp_data); mdss_mdp_switch_roi_reset(ctl); mdss_mdp_switch_to_cmd_mode(ctl, 1); mdss_mdp_switch_to_cmd_mode(ctl, 1); mdss_mdp_update_panel_info(mfd, 1, 0); mdss_mdp_update_panel_info(mfd, 1, 0); mdss_mdp_switch_to_cmd_mode(ctl, 0); mdss_mdp_switch_to_cmd_mode(ctl, 0); Loading Loading @@ -1671,6 +1686,14 @@ int mdss_mode_switch_post(struct msm_fb_data_type *mfd, u32 mode) MDSS_EVENT_DSI_DYNAMIC_SWITCH, MDSS_EVENT_DSI_DYNAMIC_SWITCH, (void *) MIPI_VIDEO_PANEL); (void *) MIPI_VIDEO_PANEL); pr_debug("%s, end\n", __func__); pr_debug("%s, end\n", __func__); } else if (mode == MIPI_CMD_PANEL) { /* * Needed to balance out clk refcount when going * from video to command. This allows for idle * power collapse to work as intended. */ mdss_mdp_ctl_intf_event(ctl, MDSS_EVENT_PANEL_CLK_CTRL, (void *)0); } } return rc; return rc; } } Loading