diff options
author | Josh Wu <josh.wu@atmel.com> | 2013-12-10 09:25:47 -0300 |
---|---|---|
committer | Mauro Carvalho Chehab <m.chehab@samsung.com> | 2013-12-18 06:55:48 -0200 |
commit | bd6f27458b0c50469ba1bb0a53e5ad1ac9e950d5 (patch) | |
tree | 0ebc5a4c23a44a09484d381cce4602d1520fdac2 /drivers/media/platform/soc_camera/atmel-isi.c | |
parent | 135983e8b392b424c7c9e117a981ad21e7c26893 (diff) | |
download | linux-stable-bd6f27458b0c50469ba1bb0a53e5ad1ac9e950d5.tar.gz linux-stable-bd6f27458b0c50469ba1bb0a53e5ad1ac9e950d5.tar.bz2 linux-stable-bd6f27458b0c50469ba1bb0a53e5ad1ac9e950d5.zip |
[media] v4l: atmel-isi: Should clear bits before set the hardware register
In the ISI driver it reads the config register to get original value,
then set the correct FRATE_DIV and YCC_SWAP_MODE directly. This will
cause some bits overlap.
So we need to clear these bits first, then set correct value. This patch
fix it.
Signed-off-by: Josh Wu <josh.wu@atmel.com>
Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
Diffstat (limited to 'drivers/media/platform/soc_camera/atmel-isi.c')
-rw-r--r-- | drivers/media/platform/soc_camera/atmel-isi.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/media/platform/soc_camera/atmel-isi.c b/drivers/media/platform/soc_camera/atmel-isi.c index 9c4cadc4de38..4835173d7f80 100644 --- a/drivers/media/platform/soc_camera/atmel-isi.c +++ b/drivers/media/platform/soc_camera/atmel-isi.c @@ -132,6 +132,8 @@ static int configure_geometry(struct atmel_isi *isi, u32 width, isi_writel(isi, ISI_CTRL, ISI_CTRL_DIS); cfg2 = isi_readl(isi, ISI_CFG2); + /* Set YCC swap mode */ + cfg2 &= ~ISI_CFG2_YCC_SWAP_MODE_MASK; cfg2 |= cr; /* Set width */ cfg2 &= ~(ISI_CFG2_IM_HSIZE_MASK); @@ -346,6 +348,7 @@ static void start_dma(struct atmel_isi *isi, struct frame_buffer *buffer) isi_writel(isi, ISI_DMA_C_CTRL, ISI_DMA_CTRL_FETCH | ISI_DMA_CTRL_DONE); isi_writel(isi, ISI_DMA_CHER, ISI_DMA_CHSR_C_CH); + cfg1 &= ~ISI_CFG1_FRATE_DIV_MASK; /* Enable linked list */ cfg1 |= isi->pdata->frate | ISI_CFG1_DISCR; |