diff --git a/Documentation/devicetree/bindings/fb/mdss-dsi.txt b/Documentation/devicetree/bindings/fb/mdss-dsi.txt index 575e3f16ce0a..607bedb79fb6 100644 --- a/Documentation/devicetree/bindings/fb/mdss-dsi.txt +++ b/Documentation/devicetree/bindings/fb/mdss-dsi.txt @@ -110,6 +110,8 @@ Optional properties: controller. These pin configurations are installed in the pinctrl device node. Refer to pinctrl-bindings.txt - qcom,regulator-ldo-mode: Boolean to enable ldo mode for the dsi phy regulator +- qcom,null-insertion-enabled: Boolean to enable NULL packet insertion + feature for DSI controller. - qcom,dsi-irq-line: Boolean specifies if DSI has a different irq line than mdp. - qcom,lane-map: Specifies the data lane swap configuration. "lane_map_0123" = <0 1 2 3> (default value) @@ -222,6 +224,7 @@ Example: qcom,mmss-ulp-clamp-ctrl-offset = <0x20>; qcom,mmss-phyreset-ctrl-offset = <0x24>; qcom,regulator-ldo-mode; + qcom,null-insertion-enabled; pinctrl-names = "mdss_default", "mdss_sleep"; pinctrl-0 = <&mdss_dsi_active>; diff --git a/drivers/video/fbdev/msm/mdss_dsi.c b/drivers/video/fbdev/msm/mdss_dsi.c index 4c2d80e487bb..fab11f03aecb 100644 --- a/drivers/video/fbdev/msm/mdss_dsi.c +++ b/drivers/video/fbdev/msm/mdss_dsi.c @@ -3166,6 +3166,9 @@ static int mdss_dsi_parse_ctrl_params(struct platform_device *ctrl_pdev, struct mdss_panel_info *pinfo = &(ctrl_pdata->panel_data.panel_info); const char *data; + ctrl_pdata->null_insert_enabled = of_property_read_bool( + ctrl_pdev->dev.of_node, "qcom,null-insertion-enabled"); + data = of_get_property(ctrl_pdev->dev.of_node, "qcom,platform-strength-ctrl", &len); if (!data) { diff --git a/drivers/video/fbdev/msm/mdss_dsi.h b/drivers/video/fbdev/msm/mdss_dsi.h index a7f759d73485..d547bf45a891 100644 --- a/drivers/video/fbdev/msm/mdss_dsi.h +++ b/drivers/video/fbdev/msm/mdss_dsi.h @@ -459,6 +459,7 @@ struct mdss_dsi_ctrl_pdata { struct regulator *ibb; /* vreg handle */ struct mutex clk_lane_mutex; + bool null_insert_enabled; bool ulps; bool core_power; bool mmss_clamp; diff --git a/drivers/video/fbdev/msm/mdss_dsi_host.c b/drivers/video/fbdev/msm/mdss_dsi_host.c index ba19d8eadf31..c7d625645673 100644 --- a/drivers/video/fbdev/msm/mdss_dsi_host.c +++ b/drivers/video/fbdev/msm/mdss_dsi_host.c @@ -1178,7 +1178,8 @@ static void mdss_dsi_mode_setup(struct mdss_panel_data *pdata) } /* DSI_COMMAND_MODE_NULL_INSERTION_CTRL */ - if (ctrl_pdata->shared_data->hw_rev >= MDSS_DSI_HW_REV_104) { + if ((ctrl_pdata->shared_data->hw_rev >= MDSS_DSI_HW_REV_104) + && ctrl_pdata->null_insert_enabled) { data = (mipi->vc << 1); /* Virtual channel ID */ data |= 0 << 16; /* Word count of the NULL packet */ data |= 0x1; /* Enable Null insertion */