提交 411d9ed4 编写于 作者: T Tomasz Figa 提交者: Inki Dae

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: NTomasz Figa <tomasz.figa@gmail.com>
Acked-by: NJoonyoung Shim <jy0922.shim@samsung.com>
Signed-off-by: NInki Dae <inki.dae@samsung.com>
上级 de7af100
...@@ -65,6 +65,7 @@ struct fimd_driver_data { ...@@ -65,6 +65,7 @@ struct fimd_driver_data {
unsigned int timing_base; unsigned int timing_base;
unsigned int has_shadowcon:1; unsigned int has_shadowcon:1;
unsigned int has_clksel:1;
}; };
static struct fimd_driver_data exynos4_fimd_driver_data = { static struct fimd_driver_data exynos4_fimd_driver_data = {
...@@ -278,6 +279,11 @@ static void fimd_commit(struct device *dev) ...@@ -278,6 +279,11 @@ static void fimd_commit(struct device *dev)
val = ctx->vidcon0; val = ctx->vidcon0;
val &= ~(VIDCON0_CLKVAL_F_MASK | VIDCON0_CLKDIR); 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) if (ctx->clkdiv > 1)
val |= VIDCON0_CLKVAL_F(ctx->clkdiv - 1) | VIDCON0_CLKDIR; val |= VIDCON0_CLKVAL_F(ctx->clkdiv - 1) | VIDCON0_CLKDIR;
else else
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册