[media] s5p-fimc: Fix buffer dequeue order issue
authorSylwester Nawrocki <s.nawrocki@samsung.com>
Wed, 5 Oct 2011 17:20:45 +0000 (14:20 -0300)
committerMauro Carvalho Chehab <mchehab@redhat.com>
Thu, 24 Nov 2011 23:02:10 +0000 (21:02 -0200)
commit2c1bb62e217f4f2eb6fa9734dcb331bc09c7768e
treed96633c2df45d6bb4906f1d6fa598adb078657b6
parent7aa9f1844a3aac428ef7977a9f1da706718afe0d
[media] s5p-fimc: Fix buffer dequeue order issue

When requested more than 2 buffers the buffer dequeue order was wrong
due to erroneous updating FIMC registers in every interrupt handler
call. This also fixes regression of resetting the output DMA buffer
pointer at wrong time, when some buffers are already queued in hardware.
The hardware is reset in the start_streaming callback in order to align
the H/W state with the software output buffer pointer (buf_index).

Additionally a simple write to S5P_CISCCTRL register is replaced with
a read/modification/write to make sure the scaler is not being disabled
in fimc_hw_set_scaler().

Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
drivers/media/video/s5p-fimc/fimc-capture.c
drivers/media/video/s5p-fimc/fimc-core.c
drivers/media/video/s5p-fimc/fimc-reg.c