|
@@ -60,6 +60,9 @@
|
|
|
|
|
|
#define OMAP_HDMI_TIMINGS_NB 34
|
|
|
|
|
|
+#define HDMI_DEFAULT_REGN 15
|
|
|
+#define HDMI_DEFAULT_REGM2 1
|
|
|
+
|
|
|
static struct {
|
|
|
struct mutex lock;
|
|
|
struct omap_display_platform_data *pdata;
|
|
@@ -418,7 +421,11 @@ static void hdmi_compute_pll(struct omap_dss_device *dssdev, int phy,
|
|
|
* Input clock is predivided by N + 1
|
|
|
* out put of which is reference clk
|
|
|
*/
|
|
|
- pi->regn = dssdev->clocks.hdmi.regn;
|
|
|
+ if (dssdev->clocks.hdmi.regn == 0)
|
|
|
+ pi->regn = HDMI_DEFAULT_REGN;
|
|
|
+ else
|
|
|
+ pi->regn = dssdev->clocks.hdmi.regn;
|
|
|
+
|
|
|
refclk = clkin / (pi->regn + 1);
|
|
|
|
|
|
/*
|
|
@@ -426,7 +433,11 @@ static void hdmi_compute_pll(struct omap_dss_device *dssdev, int phy,
|
|
|
* Multiplying by 100 to avoid fractional part removal
|
|
|
*/
|
|
|
pi->regm = (phy * 100 / (refclk)) / 100;
|
|
|
- pi->regm2 = dssdev->clocks.hdmi.regm2;
|
|
|
+
|
|
|
+ if (dssdev->clocks.hdmi.regm2 == 0)
|
|
|
+ pi->regm2 = HDMI_DEFAULT_REGM2;
|
|
|
+ else
|
|
|
+ pi->regm2 = dssdev->clocks.hdmi.regm2;
|
|
|
|
|
|
/*
|
|
|
* fractional multiplier is remainder of the difference between
|