[Xperia Z1 Original Android Development] munjeni:
Or at least to find what is missing, I have found some diferencie between 1.2.2 kernel and our 1.3.3, specialy for vfe0 and vfe1:

on dirty grep you can see something about vfe

# git diff | grep gdsc
-bus-gdsc-supply:	Optional fabric device parameter that is a reference to the dual
-bus-a-gdsc-supply:	Optional fabric device parameter that is a reference to an active
-bus-qos-gdsc-supply:	Optional node or fabric device parameter that is a reference to a GDSC
-node-gdsc-supply:	Optional node device parameter that is a reference to a GDSC supply
-	clock-name-gdsc:
-	q0-clk-supply = <&gdsc_q0_clk>;
-	vfe0-vdd-supply = <&gdsc_vfe>;
-	vfe1-vdd-supply = <&gdsc_vfe1>;
vdd-supply = <&gdsc_jpeg>;
- vdd-supply = <&gdsc_vfe>;
- vdd-supply = <&gdsc_vfe>;
+ vdd-supply = <&gdsc_vfe>;
-	vdd-hba-supply = <&gdsc_ufs>;
diff --git a/Documentation/devicetree/bindings/regulator/gdsc-regulator.txt b/Documentation/devicetree/bindings/regulator/gdsc-regulator.txt
--- a/Documentation/devicetree/bindings/regulator/gdsc-regulator.txt
+++ b/Documentation/devicetree/bindings/regulator/gdsc-regulator.txt
vdd-supply = <&gdsc_vfe>;
gdsc-supply = <&gdsc_mdss>;
+	gdsc-supply = <&gdsc_mdss>;
+	qcom,supply-name = "gdsc";
USB3_GDSC-supply = <&gdsc_usb30>;
venus-supply = <&gdsc_venus>;
venus-core0-supply = <&gdsc_venus_core0>;
venus-core1-supply = <&gdsc_venus_core1>;
&gdsc_venus {
gdsc-vdd-supply = <&gdsc_pcie_0>;
gdsc-vdd-supply = <&gdsc_pcie_1>;
-	gdsc-vdd-supply = <&gdsc_pcie_0>;
USB3_GDSC-supply = <&gdsc_usb30>;
-	gdsc-vdd-supply = <&gdsc_pcie>;
USB3_GDSC-supply = <&gdsc_usb30>;
diff --git a/arch/arm/boot/dts/qcom/msm-gdsc-8916.dtsi b/arch/arm/boot/dts/qcom/msm-gdsc-8916.dtsi
--- a/arch/arm/boot/dts/qcom/msm-gdsc-8916.dtsi
+++ b/arch/arm/boot/dts/qcom/msm-gdsc-8916.dtsi
-	gdsc_oxili_cx: qcom,gdsc@185904c {
-	compatible = "qcom,gdsc";
-	regulator-name = "gdsc_oxili_cx";
vdd-supply = <&gdsc_vfe>;
gdsc-supply = <&gdsc_mdss>;
gdsc-supply = <&gdsc_mdss>;
&gdsc_venus {
gdsc-supply = <&gdsc_mdss>;
&gdsc_venus {
-	vfe0-vdd-supply = <&gdsc_vfe>;
-	vfe1-vdd-supply = <&gdsc_vfe>;
-	vdd-supply = <&gdsc_vfe>;
+	vdd-supply = <&gdsc_vfe>;
gdsc-supply = <&gdsc_mdss>;
+ qcom,supply-name = "gdsc";
+	gdsc-supply = <&gdsc_mdss>;
qcom,supply-name = "gdsc";
-	vfe0-vdd-supply = <&gdsc_vfe>;
-	vfe1-vdd-supply = <&gdsc_vfe>;
-	vdd-supply = <&gdsc_vfe>;
-	vdd-supply = <&gdsc_vfe>;
+	vdd-supply = <&gdsc_vfe>;
+	vdd-supply = <&gdsc_vfe>;
vdd-supply = <&gdsc_jpeg>;
vdd-supply = <&gdsc_jpeg>;
vdd-supply = <&gdsc_jpeg>;
vdd-supply = <&gdsc_vfe>;
gdsc-supply = <&gdsc_mdss>;
+	gdsc-supply = <&gdsc_mdss>;
+	qcom,supply-name = "gdsc";
venus-supply = <&gdsc_venus>;
gdsc_oxili_gx: qcom,gdsc@fd8c4024 {
vdd-supply = <&gdsc_venus>;
-	vdd-supply = <&gdsc_vfe>;
-	vdd-supply = <&gdsc_vfe>;
+	vdd-supply = <&gdsc_vfe>;
+	vdd-supply = <&gdsc_vfe>;
gdsc-supply = <&gdsc_mdss>;
+	gdsc-supply = <&gdsc_mdss>;
+	qcom,supply-name = "gdsc";
venus-supply = <&gdsc_venus>;
USB3_GDSC-supply = <&gdsc_usb30>;
&gdsc_usb30 {
vdd-supply = <&gdsc_camss_top>;
-	vfe0-vdd-supply = <&gdsc_vfe>;
-	vfe1-vdd-supply = <&gdsc_vfe>;
-	vdd-supply = <&gdsc_vfe>;
+	vdd-supply = <&gdsc_vfe>;
-	vdd-supply = <&gdsc_vfe>;
+	vdd-supply = <&gdsc_vfe>;
-	reg-names = "pll_base", "gdsc_base", "dynamic_pll_base";
+	reg-names = "pll_base", "gdsc_base", "dynamic_pll_base",
gdsc-supply = <&gdsc_mdss>;
reg-names = "pll_base", "gdsc_base";
gdsc-supply = <&gdsc_mdss>;
gdsc-supply = <&gdsc_mdss>;
+	gdsc-supply = <&gdsc_mdss>;
+	qcom,supply-name = "gdsc";
USB3_GDSC-supply = <&gdsc_usb30>;
venus-supply = <&gdsc_venus>;
&gdsc_usb30 {
diff --git a/drivers/clk/qcom/gdsc.c b/drivers/clk/qcom/gdsc.c
--- a/drivers/clk/qcom/gdsc.c
+++ b/drivers/clk/qcom/gdsc.c
@@ -305,7 +305,7 @@ static int gdsc_probe(struct platform_device *pdev)
struct gdsc *sc;
@@ -395,13 +395,9 @@ static int gdsc_probe(struct platform_device *pdev)
regval = readl_relaxed(sc->gdscr);
writel_relaxed(regval, sc->gdscr);
+	pll_res->gdsc_cb.notifier_call =
+	pll_reg = mdss_pll_get_mp_by_reg_name(pll_res, "gdsc");
+	pr_debug("Registering for gdsc regulator events\n");
+	&(pll_res->gdsc_cb)))
-	pll_res->gdsc_cb.notifier_call =
-	pll_reg = mdss_pll_get_mp_by_reg_name(pll_res, "gdsc");
-	pr_debug("Registering for gdsc regulator events\n");
-	&(pll_res->gdsc_cb)))
void __iomem	*gdsc_base;
rc = regulator_enable(dev->gdsc);
regulator_disable(dev->gdsc);
regulator_disable(dev->gdsc);
-	struct device_node *gdsc_node,
-	char gdsc_string[MAX_REG_NAME];
-	scnprintf(gdsc_string, MAX_REG_NAME, "%s-supply", clk_name);
-	if (of_find_property(gdsc_node, gdsc_string, NULL))
-	if (of_find_property(dev_node, "bus-gdsc-supply", NULL))
-	MAX_REG_NAME, "%s", "bus-gdsc");
-	if (of_find_property(dev_node, "bus-a-gdsc-supply", NULL))
-	MAX_REG_NAME, "%s", "bus-a-gdsc");
-	if (of_find_property(dev_node, "bus-qos-gdsc-supply",
-	MAX_REG_NAME, "%s", "bus-qos-gdsc");
-	if (of_find_property(dev_node, "bus-qos-gdsc-supply",
-	MAX_REG_NAME, "%s", "bus-qos-gdsc");
-	if (of_find_property(dev_node, "node-gdsc-supply", NULL))
-	MAX_REG_NAME, "%s", "node-gdsc");
ret = dwc3_msm_config_gdsc(mdwc, 1);
dev_err(&pdev->dev, "unable to configure usb3 gdsc\n");
+	/* enable mdss gdsc */
+	/* disable mdss gdsc only if dsi phy was successfully clamped*/
+	pr_debug("%s: leaving mdss gdsc on\n", __func__);