aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/video/s3c-fb.c
diff options
context:
space:
mode:
authorJingoo Han <jg1.han@samsung.com>2012-01-27 00:47:55 -0500
committerFlorian Tobias Schandinat <FlorianSchandinat@gmx.de>2012-01-28 15:58:11 -0500
commitd8b97db4c8e40e49985fa5802be914292add64f6 (patch)
treefe9a4bfb7e6ecb58d96518d73000fca971873059 /drivers/video/s3c-fb.c
parentf7f31e505aa79d91b979a38789b1608744361bdc (diff)
video: s3c-fb: add video clock running at data under-flow
This patch adds video clock running at data under-flow. It means that the pixel clock is continuously provided to lcd module, even when under-run occurs. Signed-off-by: Jingoo Han <jg1.han@samsung.com> Signed-off-by: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
Diffstat (limited to 'drivers/video/s3c-fb.c')
-rw-r--r--drivers/video/s3c-fb.c23
1 files changed, 23 insertions, 0 deletions
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 */
88struct s3c_fb_variant { 89struct 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],