From f472340bf77bf6d86f9a7a4aa0a4104979cea8d1 Mon Sep 17 00:00:00 2001 From: Sandeep Panda Date: Sat, 7 Nov 2015 00:49:57 +0530 Subject: [PATCH] msm: mdss: separate out DBA and CEC functionality from DSI Currently, DBA (Display Bridge Abstract) related functionality is being used in DSI files. Carve out DBA related functionality into a new file which serves as a utility module and can be used by any MDSS driver. Define CEC on/enable functions in DBA (Display Bridge Abstract) so that clients can enable disable CEC based on other dependent CEC modules. Separate out CEC abstract data with CEC driver data and initialize and release corresponding modules properly. Change-Id: I84f53d99547dcd4ce0b8275401b03ed8e96e14d5 Signed-off-by: Ajay Singh Parmar Signed-off-by: Sandeep Panda --- .../devicetree/bindings/fb/adv7533.txt | 13 +- .../devicetree/bindings/fb/mdss-dsi-panel.txt | 3 + drivers/video/fbdev/msm/Makefile | 1 + drivers/video/fbdev/msm/mdss_dba_utils.c | 768 ++++++++ drivers/video/fbdev/msm/mdss_dba_utils.h | 47 + drivers/video/fbdev/msm/mdss_dsi.c | 87 +- drivers/video/fbdev/msm/mdss_dsi.h | 17 +- drivers/video/fbdev/msm/mdss_dsi_panel.c | 182 +- drivers/video/fbdev/msm/mdss_fb.c | 6 +- drivers/video/fbdev/msm/mdss_hdmi_cec.c | 8 + drivers/video/fbdev/msm/mdss_hdmi_cec.h | 28 + drivers/video/fbdev/msm/mdss_hdmi_edid.c | 8 +- drivers/video/fbdev/msm/mdss_hdmi_edid.h | 2 +- drivers/video/fbdev/msm/mdss_hdmi_tx.c | 56 +- drivers/video/fbdev/msm/mdss_hdmi_tx.h | 4 + drivers/video/fbdev/msm/mdss_panel.h | 4 + drivers/video/fbdev/msm/msm_dba/adv7533.c | 1731 +++++++++++++---- include/video/msm_dba.h | 17 +- 18 files changed, 2376 insertions(+), 606 deletions(-) create mode 100644 drivers/video/fbdev/msm/mdss_dba_utils.c create mode 100644 drivers/video/fbdev/msm/mdss_dba_utils.h diff --git a/Documentation/devicetree/bindings/fb/adv7533.txt b/Documentation/devicetree/bindings/fb/adv7533.txt index 33dd1dd73f1c..8b85fcd730cb 100644 --- a/Documentation/devicetree/bindings/fb/adv7533.txt +++ b/Documentation/devicetree/bindings/fb/adv7533.txt @@ -15,9 +15,14 @@ Required properties: Optional properties: - adi,enable-audio: - adi,disable-gpios: -- adi,irq-gpio: Main IRQ gpio mapping +- adi,irq-gpio: Main IRQ gpio mapping - adi,hpd-irq-gpio: HPD IRQ gpio mapping - adi,switch-gpio: DSI switch gpio mapping +- qcom,supply-names: Regulator names that supply 5v to bridge chip +- qcom,min-voltage-level Minimum voltage level to be supplied to bridge chip +- qcom,max-voltage-level Maximum voltage level to be supplied to bridge chip +- qcom,enable-load Load current to bridge chip when enabled +- qcom,disable-load Load current to bridge chip when disabled Example: &soc { @@ -35,6 +40,12 @@ Example: adi,irq-gpio = <&msm_gpio 31 0x2002>; adi,hpd-irq-gpio = <&msm_gpio 20 0x2003>; adi,switch-gpio = <&msm_gpio 32 0x0>; + hpd-5v-en-supply = <&adv_vreg>; + qcom,supply-names = "hpd-5v-en"; + qcom,min-voltage-level = <0>; + qcom,max-voltage-level = <0>; + qcom,enable-load = <0>; + qcom,disable-load = <0>; }; }; }; diff --git a/Documentation/devicetree/bindings/fb/mdss-dsi-panel.txt b/Documentation/devicetree/bindings/fb/mdss-dsi-panel.txt index bee2b8f3c2c6..439898534996 100644 --- a/Documentation/devicetree/bindings/fb/mdss-dsi-panel.txt +++ b/Documentation/devicetree/bindings/fb/mdss-dsi-panel.txt @@ -446,6 +446,8 @@ Optional properites: - qcom,mdss-dsc-block-prediction-enable: A boolean value to enable/disable the block prediction at decoder. - qcom,mdss-dsc-config-by-manufacture-cmd: A boolean to indicates panel use manufacture command to setup pps instead of standard dcs type 0x0A. +- qcom,dba-panel: Indicates whether the current panel is used as a display bridge + to a non-DSI interface. - qcom,adjust-timer-wakeup-ms: An integer value to indicate the timer delay(in ms) to accommodate s/w delay while configuring the event timer wakeup logic. @@ -661,6 +663,7 @@ Example: }; qcom,config-select = <&dsi_sim_vid_config0>; + qcom,dba-panel; dsi_sim_vid_config0: config0 { qcom,lm-split = <360 360>; diff --git a/drivers/video/fbdev/msm/Makefile b/drivers/video/fbdev/msm/Makefile index 01bbad3653e7..5cd23218245a 100644 --- a/drivers/video/fbdev/msm/Makefile +++ b/drivers/video/fbdev/msm/Makefile @@ -44,6 +44,7 @@ obj-$(CONFIG_FB_MSM_MDSS) += mdss_panel.o obj-$(CONFIG_FB_MSM_MDSS) += mdss_hdmi_util.o obj-$(CONFIG_FB_MSM_MDSS) += mdss_hdmi_edid.o obj-$(CONFIG_FB_MSM_MDSS) += mdss_cec_core.o +obj-$(CONFIG_FB_MSM_MDSS) += mdss_dba_utils.o obj-$(CONFIG_FB_MSM_MDSS_EDP_PANEL) += mdss_edp.o obj-$(CONFIG_FB_MSM_MDSS_EDP_PANEL) += mdss_edp_aux.o diff --git a/drivers/video/fbdev/msm/mdss_dba_utils.c b/drivers/video/fbdev/msm/mdss_dba_utils.c new file mode 100644 index 000000000000..775d8e0518cb --- /dev/null +++ b/drivers/video/fbdev/msm/mdss_dba_utils.c @@ -0,0 +1,768 @@ +/* Copyright (c) 2015, 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 + * only version 2 as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + */ + +#define pr_fmt(fmt) "%s: " fmt, __func__ + +#include