S5PC11X: libcamera: buffer cleanup

Cleanup how buffers are managed.  Before, buffers for preview
and capture and record were mixed together, with one thread
cleaning up buffers for another.  Now, each mode cleans up
its own buffers.  Implement asychronous buffer release for record
case to fix a bug where we allowed FIMC to update a buffer that
was still in use by encoder, resulting in encoding a frame that
was part one image and part another.

Change-Id: I42d0032cea61197a1f3a665a7248b700599d5a6a
Signed-off-by: Mike J. Chen <mjchen@sta.samsung.com>
4 files changed