]> git.proxmox.com Git - mirror_ubuntu-focal-kernel.git/blobdiff - drivers/gpu/drm/omapdrm/dss/hdmi4.c
Merge branch '4.8/omapdrm-pll' (omapdrm PLL work)
[mirror_ubuntu-focal-kernel.git] / drivers / gpu / drm / omapdrm / dss / hdmi4.c
index f892ae157ff3b429fc1532da85daaf65871f5e08..ca4abb49924284750026272d4d7c90fc050f0a6d 100644 (file)
@@ -33,6 +33,7 @@
 #include <linux/gpio.h>
 #include <linux/regulator/consumer.h>
 #include <linux/component.h>
+#include <linux/of.h>
 #include <video/omapdss.h>
 #include <sound/omap-hdmi-audio.h>
 
@@ -100,7 +101,6 @@ static irqreturn_t hdmi_irq_handler(int irq, void *data)
 
 static int hdmi_init_regulator(void)
 {
-       int r;
        struct regulator *reg;
 
        if (hdmi.vdda_reg != NULL)
@@ -114,15 +114,6 @@ static int hdmi_init_regulator(void)
                return PTR_ERR(reg);
        }
 
-       if (regulator_can_change_voltage(reg)) {
-               r = regulator_set_voltage(reg, 1800000, 1800000);
-               if (r) {
-                       devm_regulator_put(reg);
-                       DSSWARN("can't set the regulator voltage\n");
-                       return r;
-               }
-       }
-
        hdmi.vdda_reg = reg;
 
        return 0;
@@ -186,7 +177,11 @@ static int hdmi_power_on_full(struct omap_dss_device *dssdev)
        if (p->double_pixel)
                pc *= 2;
 
-       hdmi_pll_compute(&hdmi.pll, pc, &hdmi_cinfo);
+       /* DSS_HDMI_TCLK is bitclk / 10 */
+       pc *= 10;
+
+       dss_pll_calc_b(&hdmi.pll.pll, clk_get_rate(hdmi.pll.pll.clkin),
+               pc, &hdmi_cinfo);
 
        r = dss_pll_enable(&hdmi.pll.pll);
        if (r) {