aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/exynos
diff options
context:
space:
mode:
authorTomasz Figa <tomasz.figa@gmail.com>2013-05-01 15:02:28 -0400
committerInki Dae <daeinki@gmail.com>2013-06-28 08:12:51 -0400
commit411d9ed4486a4e40bded42b2e026ba3ce866891f (patch)
tree671484b8b3fb90939180e2b7a52e245c4672227d /drivers/gpu/drm/exynos
parentde7af1004bc74522d31675fdabdff432d2ddd986 (diff)
drm/exynos: fimd: Add support for FIMD variants with clock selection
Some platforms that can be supported this driver has additional clock source selection bits in VIDCON0 register that allows to select which clock should be used to drive the pixel clock: bus clock or special clock. Since this driver assumes that special clock always drives the pixel clock, this patch sets the selection bitfield to use the special clock. Signed-off-by: Tomasz Figa <tomasz.figa@gmail.com> Acked-by: Joonyoung Shim <jy0922.shim@samsung.com> Signed-off-by: Inki Dae <inki.dae@samsung.com>
Diffstat (limited to 'drivers/gpu/drm/exynos')
-rw-r--r--drivers/gpu/drm/exynos/exynos_drm_fimd.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/gpu/drm/exynos/exynos_drm_fimd.c b/drivers/gpu/drm/exynos/exynos_drm_fimd.c
index 015a3be0b06e..7681a8afa6ed 100644
--- a/drivers/gpu/drm/exynos/exynos_drm_fimd.c
+++ b/drivers/gpu/drm/exynos/exynos_drm_fimd.c
@@ -65,6 +65,7 @@ struct fimd_driver_data {
65 unsigned int timing_base; 65 unsigned int timing_base;
66 66
67 unsigned int has_shadowcon:1; 67 unsigned int has_shadowcon:1;
68 unsigned int has_clksel:1;
68}; 69};
69 70
70static struct fimd_driver_data exynos4_fimd_driver_data = { 71static struct fimd_driver_data exynos4_fimd_driver_data = {
@@ -278,6 +279,11 @@ static void fimd_commit(struct device *dev)
278 val = ctx->vidcon0; 279 val = ctx->vidcon0;
279 val &= ~(VIDCON0_CLKVAL_F_MASK | VIDCON0_CLKDIR); 280 val &= ~(VIDCON0_CLKVAL_F_MASK | VIDCON0_CLKDIR);
280 281
282 if (ctx->driver_data->has_clksel) {
283 val &= ~VIDCON0_CLKSEL_MASK;
284 val |= VIDCON0_CLKSEL_LCD;
285 }
286
281 if (ctx->clkdiv > 1) 287 if (ctx->clkdiv > 1)
282 val |= VIDCON0_CLKVAL_F(ctx->clkdiv - 1) | VIDCON0_CLKDIR; 288 val |= VIDCON0_CLKVAL_F(ctx->clkdiv - 1) | VIDCON0_CLKDIR;
283 else 289 else