summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTomasz Figa <tomasz.figa@gmail.com>2013-05-01 21:02:28 +0200
committerChanho Park <chanho61.park@samsung.com>2014-11-18 11:44:02 +0900
commitc795b236ff695aeb2bc37ee551eb7f84cc998dbb (patch)
treec97d53b6aec1c1b3bd09eb6f6cd42fc75ebd4013
parent8c81b219ddfe88e85a2b1917e470ebf388beb6cc (diff)
downloadlinux-3.10-c795b236ff695aeb2bc37ee551eb7f84cc998dbb.tar.gz
linux-3.10-c795b236ff695aeb2bc37ee551eb7f84cc998dbb.tar.bz2
linux-3.10-c795b236ff695aeb2bc37ee551eb7f84cc998dbb.zip
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>
-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 c2614a30724..ba99bd7059a 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 {
unsigned int timing_base;
unsigned int has_shadowcon:1;
+ unsigned int has_clksel:1;
};
static struct fimd_driver_data exynos4_fimd_driver_data = {
@@ -278,6 +279,11 @@ static void fimd_commit(struct device *dev)
val = ctx->vidcon0;
val &= ~(VIDCON0_CLKVAL_F_MASK | VIDCON0_CLKDIR);
+ if (ctx->driver_data->has_clksel) {
+ val &= ~VIDCON0_CLKSEL_MASK;
+ val |= VIDCON0_CLKSEL_LCD;
+ }
+
if (ctx->clkdiv > 1)
val |= VIDCON0_CLKVAL_F(ctx->clkdiv - 1) | VIDCON0_CLKDIR;
else