Loading Documentation/devicetree/bindings/fb/mdss-dsi-panel.txt +5 −0 Original line number Diff line number Diff line Loading @@ -346,6 +346,10 @@ Optional properties: - qcom,cmd-to-video-mode-switch-commands: List of commands that need to be sent to panel in order to switch from command mode to video mode dynamically. Refer to "qcom,mdss-dsi-on-command" section for adding commands. - qcom,mdss-dsi-panel-orientation: String used to indicate orientation of panel "180" = panel is flipped in both horizontal and vertical directions "hflip" = panel is flipped in horizontal direction "vflip" = panel is flipped in vertical direction Note, if a given optional qcom,* binding is not present, then the driver will configure the default values specified. Loading Loading @@ -464,5 +468,6 @@ Example: qcom,mdss-dsi-horizontal-line-idle = <0 40 256>, <40 120 128>, <128 240 64>; qcom,mdss-dsi-panel-orientation = "180" }; }; drivers/video/msm/mdss/mdss_dsi_panel.c +11 −0 Original line number Diff line number Diff line Loading @@ -1179,6 +1179,17 @@ static int mdss_panel_parse_dt(struct device_node *np, rc = of_property_read_u32(np, "qcom,mdss-dsi-border-color", &tmp); pinfo->lcdc.border_clr = (!rc ? tmp : 0); data = of_get_property(np, "qcom,mdss-dsi-panel-orientation", NULL); if (data) { pr_debug("panel orientation is %s\n", data); if (!strcmp(data, "180")) pinfo->panel_orientation = MDP_ROT_180; else if (!strcmp(data, "hflip")) pinfo->panel_orientation = MDP_FLIP_LR; else if (!strcmp(data, "vflip")) pinfo->panel_orientation = MDP_FLIP_UD; } ctrl_pdata->bklt_ctrl = UNKNOWN_CTRL; data = of_get_property(np, "qcom,mdss-dsi-bl-pmic-control-type", NULL); if (data) { Loading drivers/video/msm/mdss/mdss_fb.h +1 −0 Original line number Diff line number Diff line Loading @@ -197,6 +197,7 @@ struct msm_fb_data_type { int op_enable; u32 fb_imgType; int panel_reconfig; u32 panel_orientation; u32 dst_format; int panel_power_on; Loading drivers/video/msm/mdss/mdss_mdp_overlay.c +17 −0 Original line number Diff line number Diff line Loading @@ -706,6 +706,9 @@ int mdss_mdp_overlay_pipe_setup(struct msm_fb_data_type *mfd, pipe->is_right_blend = false; } if (mfd->panel_orientation) req->flags ^= mfd->panel_orientation; pipe->flags = req->flags; if (bwc_enabled && !mdp5_data->mdata->has_bwc) { pr_err("BWC is not supported in MDP version %x\n", Loading @@ -725,6 +728,14 @@ int mdss_mdp_overlay_pipe_setup(struct msm_fb_data_type *mfd, pipe->dst.y = req->dst_rect.y; pipe->dst.w = req->dst_rect.w; pipe->dst.h = req->dst_rect.h; if (mfd->panel_orientation & MDP_FLIP_LR) pipe->dst.x = pipe->mixer_left->width - pipe->dst.x - pipe->dst.w; if (mfd->panel_orientation & MDP_FLIP_UD) pipe->dst.y = pipe->mixer_left->height - pipe->dst.y - pipe->dst.h; pipe->horz_deci = req->horz_deci; pipe->vert_deci = req->vert_deci; Loading Loading @@ -3706,6 +3717,12 @@ int mdss_mdp_overlay_init(struct msm_fb_data_type *mfd) if (rc) return rc; mfd->panel_orientation = mfd->panel_info->panel_orientation; if ((mfd->panel_info->panel_orientation & MDP_FLIP_LR) && (is_split_lm(mfd))) mdp5_data->mixer_swap = true; rc = sysfs_create_group(&dev->kobj, &mdp_overlay_sysfs_group); if (rc) { pr_err("vsync sysfs group creation failed, ret=%d\n", rc); Loading drivers/video/msm/mdss/mdss_panel.h +1 −0 Original line number Diff line number Diff line Loading @@ -369,6 +369,7 @@ struct mdss_panel_info { u32 panel_power_on; uint32_t panel_dead; u32 panel_orientation; bool dynamic_switch_pending; bool is_lpm_mode; bool is_split_display; Loading Loading
Documentation/devicetree/bindings/fb/mdss-dsi-panel.txt +5 −0 Original line number Diff line number Diff line Loading @@ -346,6 +346,10 @@ Optional properties: - qcom,cmd-to-video-mode-switch-commands: List of commands that need to be sent to panel in order to switch from command mode to video mode dynamically. Refer to "qcom,mdss-dsi-on-command" section for adding commands. - qcom,mdss-dsi-panel-orientation: String used to indicate orientation of panel "180" = panel is flipped in both horizontal and vertical directions "hflip" = panel is flipped in horizontal direction "vflip" = panel is flipped in vertical direction Note, if a given optional qcom,* binding is not present, then the driver will configure the default values specified. Loading Loading @@ -464,5 +468,6 @@ Example: qcom,mdss-dsi-horizontal-line-idle = <0 40 256>, <40 120 128>, <128 240 64>; qcom,mdss-dsi-panel-orientation = "180" }; };
drivers/video/msm/mdss/mdss_dsi_panel.c +11 −0 Original line number Diff line number Diff line Loading @@ -1179,6 +1179,17 @@ static int mdss_panel_parse_dt(struct device_node *np, rc = of_property_read_u32(np, "qcom,mdss-dsi-border-color", &tmp); pinfo->lcdc.border_clr = (!rc ? tmp : 0); data = of_get_property(np, "qcom,mdss-dsi-panel-orientation", NULL); if (data) { pr_debug("panel orientation is %s\n", data); if (!strcmp(data, "180")) pinfo->panel_orientation = MDP_ROT_180; else if (!strcmp(data, "hflip")) pinfo->panel_orientation = MDP_FLIP_LR; else if (!strcmp(data, "vflip")) pinfo->panel_orientation = MDP_FLIP_UD; } ctrl_pdata->bklt_ctrl = UNKNOWN_CTRL; data = of_get_property(np, "qcom,mdss-dsi-bl-pmic-control-type", NULL); if (data) { Loading
drivers/video/msm/mdss/mdss_fb.h +1 −0 Original line number Diff line number Diff line Loading @@ -197,6 +197,7 @@ struct msm_fb_data_type { int op_enable; u32 fb_imgType; int panel_reconfig; u32 panel_orientation; u32 dst_format; int panel_power_on; Loading
drivers/video/msm/mdss/mdss_mdp_overlay.c +17 −0 Original line number Diff line number Diff line Loading @@ -706,6 +706,9 @@ int mdss_mdp_overlay_pipe_setup(struct msm_fb_data_type *mfd, pipe->is_right_blend = false; } if (mfd->panel_orientation) req->flags ^= mfd->panel_orientation; pipe->flags = req->flags; if (bwc_enabled && !mdp5_data->mdata->has_bwc) { pr_err("BWC is not supported in MDP version %x\n", Loading @@ -725,6 +728,14 @@ int mdss_mdp_overlay_pipe_setup(struct msm_fb_data_type *mfd, pipe->dst.y = req->dst_rect.y; pipe->dst.w = req->dst_rect.w; pipe->dst.h = req->dst_rect.h; if (mfd->panel_orientation & MDP_FLIP_LR) pipe->dst.x = pipe->mixer_left->width - pipe->dst.x - pipe->dst.w; if (mfd->panel_orientation & MDP_FLIP_UD) pipe->dst.y = pipe->mixer_left->height - pipe->dst.y - pipe->dst.h; pipe->horz_deci = req->horz_deci; pipe->vert_deci = req->vert_deci; Loading Loading @@ -3706,6 +3717,12 @@ int mdss_mdp_overlay_init(struct msm_fb_data_type *mfd) if (rc) return rc; mfd->panel_orientation = mfd->panel_info->panel_orientation; if ((mfd->panel_info->panel_orientation & MDP_FLIP_LR) && (is_split_lm(mfd))) mdp5_data->mixer_swap = true; rc = sysfs_create_group(&dev->kobj, &mdp_overlay_sysfs_group); if (rc) { pr_err("vsync sysfs group creation failed, ret=%d\n", rc); Loading
drivers/video/msm/mdss/mdss_panel.h +1 −0 Original line number Diff line number Diff line Loading @@ -369,6 +369,7 @@ struct mdss_panel_info { u32 panel_power_on; uint32_t panel_dead; u32 panel_orientation; bool dynamic_switch_pending; bool is_lpm_mode; bool is_split_display; Loading