diff options
-rw-r--r-- | arch/arm/plat-samsung/include/plat/regs-fb.h | 3 | ||||
-rw-r--r-- | drivers/video/s3c-fb.c | 23 |
2 files changed, 26 insertions, 0 deletions
diff --git a/arch/arm/plat-samsung/include/plat/regs-fb.h b/arch/arm/plat-samsung/include/plat/regs-fb.h index 6bf68ed01963..bbb16e0aa1f6 100644 --- a/arch/arm/plat-samsung/include/plat/regs-fb.h +++ b/arch/arm/plat-samsung/include/plat/regs-fb.h | |||
@@ -91,6 +91,9 @@ | |||
91 | #define VIDCON1_VSTATUS_BACKPORCH (0x1 << 13) | 91 | #define VIDCON1_VSTATUS_BACKPORCH (0x1 << 13) |
92 | #define VIDCON1_VSTATUS_ACTIVE (0x2 << 13) | 92 | #define VIDCON1_VSTATUS_ACTIVE (0x2 << 13) |
93 | #define VIDCON1_VSTATUS_FRONTPORCH (0x0 << 13) | 93 | #define VIDCON1_VSTATUS_FRONTPORCH (0x0 << 13) |
94 | #define VIDCON1_VCLK_MASK (0x3 << 9) | ||
95 | #define VIDCON1_VCLK_HOLD (0x0 << 9) | ||
96 | #define VIDCON1_VCLK_RUN (0x1 << 9) | ||
94 | 97 | ||
95 | #define VIDCON1_INV_VCLK (1 << 7) | 98 | #define VIDCON1_INV_VCLK (1 << 7) |
96 | #define VIDCON1_INV_HSYNC (1 << 6) | 99 | #define VIDCON1_INV_HSYNC (1 << 6) |
diff --git a/drivers/video/s3c-fb.c b/drivers/video/s3c-fb.c index 9af6c1849c24..e22bf9ddf287 100644 --- a/drivers/video/s3c-fb.c +++ b/drivers/video/s3c-fb.c | |||
@@ -84,6 +84,7 @@ struct s3c_fb; | |||
84 | * @has_shadowcon: Set if has SHADOWCON register. | 84 | * @has_shadowcon: Set if has SHADOWCON register. |
85 | * @has_blendcon: Set if has BLENDCON register. | 85 | * @has_blendcon: Set if has BLENDCON register. |
86 | * @has_clksel: Set if VIDCON0 register has CLKSEL bit. | 86 | * @has_clksel: Set if VIDCON0 register has CLKSEL bit. |
87 | * @has_fixvclk: Set if VIDCON1 register has FIXVCLK bits. | ||
87 | */ | 88 | */ |
88 | struct s3c_fb_variant { | 89 | struct s3c_fb_variant { |
89 | unsigned int is_2443:1; | 90 | unsigned int is_2443:1; |
@@ -103,6 +104,7 @@ struct s3c_fb_variant { | |||
103 | unsigned int has_shadowcon:1; | 104 | unsigned int has_shadowcon:1; |
104 | unsigned int has_blendcon:1; | 105 | unsigned int has_blendcon:1; |
105 | unsigned int has_clksel:1; | 106 | unsigned int has_clksel:1; |
107 | unsigned int has_fixvclk:1; | ||
106 | }; | 108 | }; |
107 | 109 | ||
108 | /** | 110 | /** |
@@ -1358,6 +1360,7 @@ static int __devinit s3c_fb_probe(struct platform_device *pdev) | |||
1358 | struct resource *res; | 1360 | struct resource *res; |
1359 | int win; | 1361 | int win; |
1360 | int ret = 0; | 1362 | int ret = 0; |
1363 | u32 reg; | ||
1361 | 1364 | ||
1362 | platid = platform_get_device_id(pdev); | 1365 | platid = platform_get_device_id(pdev); |
1363 | fbdrv = (struct s3c_fb_driverdata *)platid->driver_data; | 1366 | fbdrv = (struct s3c_fb_driverdata *)platid->driver_data; |
@@ -1448,6 +1451,14 @@ static int __devinit s3c_fb_probe(struct platform_device *pdev) | |||
1448 | 1451 | ||
1449 | writel(pd->vidcon1, sfb->regs + VIDCON1); | 1452 | writel(pd->vidcon1, sfb->regs + VIDCON1); |
1450 | 1453 | ||
1454 | /* set video clock running at under-run */ | ||
1455 | if (sfb->variant.has_fixvclk) { | ||
1456 | reg = readl(sfb->regs + VIDCON1); | ||
1457 | reg &= ~VIDCON1_VCLK_MASK; | ||
1458 | reg |= VIDCON1_VCLK_RUN; | ||
1459 | writel(reg, sfb->regs + VIDCON1); | ||
1460 | } | ||
1461 | |||
1451 | /* zero all windows before we do anything */ | 1462 | /* zero all windows before we do anything */ |
1452 | 1463 | ||
1453 | for (win = 0; win < fbdrv->variant.nr_windows; win++) | 1464 | for (win = 0; win < fbdrv->variant.nr_windows; win++) |
@@ -1571,6 +1582,7 @@ static int s3c_fb_resume(struct device *dev) | |||
1571 | struct s3c_fb_platdata *pd = sfb->pdata; | 1582 | struct s3c_fb_platdata *pd = sfb->pdata; |
1572 | struct s3c_fb_win *win; | 1583 | struct s3c_fb_win *win; |
1573 | int win_no; | 1584 | int win_no; |
1585 | u32 reg; | ||
1574 | 1586 | ||
1575 | clk_enable(sfb->bus_clk); | 1587 | clk_enable(sfb->bus_clk); |
1576 | 1588 | ||
@@ -1581,6 +1593,14 @@ static int s3c_fb_resume(struct device *dev) | |||
1581 | pd->setup_gpio(); | 1593 | pd->setup_gpio(); |
1582 | writel(pd->vidcon1, sfb->regs + VIDCON1); | 1594 | writel(pd->vidcon1, sfb->regs + VIDCON1); |
1583 | 1595 | ||
1596 | /* set video clock running at under-run */ | ||
1597 | if (sfb->variant.has_fixvclk) { | ||
1598 | reg = readl(sfb->regs + VIDCON1); | ||
1599 | reg &= ~VIDCON1_VCLK_MASK; | ||
1600 | reg |= VIDCON1_VCLK_RUN; | ||
1601 | writel(reg, sfb->regs + VIDCON1); | ||
1602 | } | ||
1603 | |||
1584 | /* zero all windows before we do anything */ | 1604 | /* zero all windows before we do anything */ |
1585 | for (win_no = 0; win_no < sfb->variant.nr_windows; win_no++) | 1605 | for (win_no = 0; win_no < sfb->variant.nr_windows; win_no++) |
1586 | s3c_fb_clear_win(sfb, win_no); | 1606 | s3c_fb_clear_win(sfb, win_no); |
@@ -1845,6 +1865,7 @@ static struct s3c_fb_driverdata s3c_fb_data_s5pv210 = { | |||
1845 | .has_shadowcon = 1, | 1865 | .has_shadowcon = 1, |
1846 | .has_blendcon = 1, | 1866 | .has_blendcon = 1, |
1847 | .has_clksel = 1, | 1867 | .has_clksel = 1, |
1868 | .has_fixvclk = 1, | ||
1848 | }, | 1869 | }, |
1849 | .win[0] = &s3c_fb_data_s5p_wins[0], | 1870 | .win[0] = &s3c_fb_data_s5p_wins[0], |
1850 | .win[1] = &s3c_fb_data_s5p_wins[1], | 1871 | .win[1] = &s3c_fb_data_s5p_wins[1], |
@@ -1876,6 +1897,7 @@ static struct s3c_fb_driverdata s3c_fb_data_exynos4 = { | |||
1876 | 1897 | ||
1877 | .has_shadowcon = 1, | 1898 | .has_shadowcon = 1, |
1878 | .has_blendcon = 1, | 1899 | .has_blendcon = 1, |
1900 | .has_fixvclk = 1, | ||
1879 | }, | 1901 | }, |
1880 | .win[0] = &s3c_fb_data_s5p_wins[0], | 1902 | .win[0] = &s3c_fb_data_s5p_wins[0], |
1881 | .win[1] = &s3c_fb_data_s5p_wins[1], | 1903 | .win[1] = &s3c_fb_data_s5p_wins[1], |
@@ -1941,6 +1963,7 @@ static struct s3c_fb_driverdata s3c_fb_data_s5p64x0 = { | |||
1941 | }, | 1963 | }, |
1942 | 1964 | ||
1943 | .has_blendcon = 1, | 1965 | .has_blendcon = 1, |
1966 | .has_fixvclk = 1, | ||
1944 | }, | 1967 | }, |
1945 | .win[0] = &s3c_fb_data_s5p_wins[0], | 1968 | .win[0] = &s3c_fb_data_s5p_wins[0], |
1946 | .win[1] = &s3c_fb_data_s5p_wins[1], | 1969 | .win[1] = &s3c_fb_data_s5p_wins[1], |