Skip to content

Commit

Permalink
drm/exynos: fimd: Add support for FIMD variants with clock selection
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Tomasz Figa authored and Inki Dae committed Jun 28, 2013
1 parent de7af10 commit 411d9ed
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions drivers/gpu/drm/exynos/exynos_drm_fimd.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 = {
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 411d9ed

Please sign in to comment.