From 86d69e2cc0d72fd57b36c1e6f7443f0d0101a1c6 Mon Sep 17 00:00:00 2001 From: Ingrid Gallardo Date: Wed, 16 Nov 2016 09:24:32 -0800 Subject: msm: mdss: dsi: add support to set state for mode switch commands Some panels need to send the dcs commands for mode switch in HS mode instead the default LP mode due time constraints. Add entries so the panels can be configured to HS mode if required for the mode switch. Change-Id: Ie41ad1965384b131db343c54f888ade82fc45e31 Signed-off-by: Ingrid Gallardo --- Documentation/devicetree/bindings/fb/mdss-dsi-panel.txt | 6 ++++++ drivers/video/fbdev/msm/mdss_dsi_panel.c | 6 ++++-- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/Documentation/devicetree/bindings/fb/mdss-dsi-panel.txt b/Documentation/devicetree/bindings/fb/mdss-dsi-panel.txt index 56ad8c361219..ce6c64cc1cb2 100644 --- a/Documentation/devicetree/bindings/fb/mdss-dsi-panel.txt +++ b/Documentation/devicetree/bindings/fb/mdss-dsi-panel.txt @@ -436,6 +436,11 @@ the fps window. - 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,mode-switch-commands-state: String that specifies the ctrl state for sending commands to switch + the panel mode, it applies for both switches, from command to video and + from video to command. + "dsi_lp_mode" = DSI low power mode (default) + "dsi_hs_mode" = DSI high speed mode - qcom,send-pps-before-switch: Boolean propety to indicate when PPS commands should be sent, either before or after switch commands during dynamic resolution switch in DSC panels. If the property is not present, the default @@ -660,6 +665,7 @@ Example: qcom,video-to-cmd-mode-switch-commands = [15 01 00 00 00 00 02 C2 0B 15 01 00 00 00 00 02 C2 08]; qcom,cmd-to-video-mode-switch-commands = [15 01 00 00 00 00 02 C2 03]; + qcom,mode-switch-commands-state = "dsi_hs_mode"; qcom,send-pps-before-switch; qcom,panel-ack-disabled; qcom,mdss-dsi-horizontal-line-idle = <0 40 256>, diff --git a/drivers/video/fbdev/msm/mdss_dsi_panel.c b/drivers/video/fbdev/msm/mdss_dsi_panel.c index 7c36bb627043..d9e94ffb12e5 100644 --- a/drivers/video/fbdev/msm/mdss_dsi_panel.c +++ b/drivers/video/fbdev/msm/mdss_dsi_panel.c @@ -1703,10 +1703,12 @@ static void mdss_dsi_parse_dms_config(struct device_node *np, pr_debug("%s: default dms suspend/resume\n", __func__); mdss_dsi_parse_dcs_cmds(np, &ctrl->video2cmd, - "qcom,video-to-cmd-mode-switch-commands", NULL); + "qcom,video-to-cmd-mode-switch-commands", + "qcom,mode-switch-commands-state"); mdss_dsi_parse_dcs_cmds(np, &ctrl->cmd2video, - "qcom,cmd-to-video-mode-switch-commands", NULL); + "qcom,cmd-to-video-mode-switch-commands", + "qcom,mode-switch-commands-state"); mdss_dsi_parse_dcs_cmds(np, &ctrl->post_dms_on_cmds, "qcom,mdss-dsi-post-mode-switch-on-command", -- cgit v1.2.3 From ddbbff45aef934dd4b84e2f6c16bb2af5ae9d362 Mon Sep 17 00:00:00 2001 From: Ingrid Gallardo Date: Wed, 16 Nov 2016 09:27:02 -0800 Subject: ARM: dts: msm: set dcs commands in hs for mode switch in jdi panel For jdi panel, mode switch commands take time to be sent to the panel. This results in fifo overflow errors when there is no sufficient time to send the commands to the panel to do the switch. Fix this problem by sending commands in HS mode. Change-Id: I02adc707524d4858f92e5979acca137e4864a2f8 Signed-off-by: Ingrid Gallardo --- arch/arm/boot/dts/qcom/dsi-panel-jdi-dualmipi-cmd.dtsi | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/arch/arm/boot/dts/qcom/dsi-panel-jdi-dualmipi-cmd.dtsi b/arch/arm/boot/dts/qcom/dsi-panel-jdi-dualmipi-cmd.dtsi index 9c309973f5d0..50c4c728fd4a 100644 --- a/arch/arm/boot/dts/qcom/dsi-panel-jdi-dualmipi-cmd.dtsi +++ b/arch/arm/boot/dts/qcom/dsi-panel-jdi-dualmipi-cmd.dtsi @@ -1,4 +1,4 @@ -/* Copyright (c) 2013-2015, The Linux Foundation. All rights reserved. +/* Copyright (c) 2013-2016, The Linux Foundation. All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 and @@ -123,6 +123,7 @@ qcom,mdss-dsi-off-command-state = "dsi_hs_mode"; qcom,dynamic-mode-switch-enabled; qcom,dynamic-mode-switch-type = "dynamic-switch-immediate"; + qcom,mode-switch-commands-state = "dsi_hs_mode"; qcom,video-to-cmd-mode-switch-commands = [23 00 00 00 00 00 02 b0 00 29 00 00 00 00 00 02 b3 0c -- cgit v1.2.3