]> git.baikalelectronics.ru Git - kernel.git/commit
[media] s5p-fimc: Prevent hanging on device close and fix the locking
authorSylwester Nawrocki <s.nawrocki@samsung.com>
Wed, 23 Feb 2011 11:24:33 +0000 (08:24 -0300)
committerMauro Carvalho Chehab <mchehab@redhat.com>
Tue, 22 Mar 2011 07:54:15 +0000 (04:54 -0300)
commit6d883f235f60c7f992dd4e7c324e48520aa7f187
tree42270272224cdc3532f0923a8317adfecd0d6dcc
parent86c6a7cbb335349c5bd22fbfafa634d7fa487c4e
[media] s5p-fimc: Prevent hanging on device close and fix the locking

Rework the locking in m2m driver to assure proper operation on SMP systems.

When job_abort or stop_streaming was called to immediately shutdown
a memory-to-memory transaction video buffers scheduled for processing
were never returned to vb2 and v4l2_m2m_job_finish was not called
which led to hanging.

Correct this and also return the unprocessed buffers to vb2 marking
them as erroneous, in case the end of frame interrupt do not occur.

Reported-by: Sewoon Park <seuni.park@samsung.com>
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-core.h