drivers: media: camera: Ring buffer management
authorBhanu Murthy V <bmurthyv@nvidia.com>
Sat, 16 Apr 2016 02:54:08 +0000 (19:54 -0700)
committermobile promotions <svcmobile_promotions@nvidia.com>
Tue, 24 May 2016 03:27:10 +0000 (20:27 -0700)
commit6e3634751f269a533ec7e4e3e8c09c33eac1f24e
treec519ce5429e500b0ded071711e5fce9ebe3955e1
parent6e325517d818c3796e2573e18e234dd29795b23b
drivers: media: camera: Ring buffer management

Implement ring buffer which holds two buffers
before delivering frames from VI. This is to
ensure there is no performance impact using
single thread and memory write of the buffer
is complete.

Add logic to store buffers at the start,
release one buffer every frame once the queue
has only one free slot left.

Free all buffers once the stop streaming
is signalled.
Clean up for two thread implementation and
improve state mechanism in single thread

Bug 200092604
Bug 1736471

Change-Id: Ia9784ee0c7925b5ec4dd6ca5f0b3354af8323662
Signed-off-by: Bhanu Murthy V <bmurthyv@nvidia.com>
(cherry picked from commit 39a3d10573140a98aea3b67044f056772fa2be9f)
Reviewed-on: http://git-master/r/1127760
Signed-off-by: Bryan Wu <pengw@nvidia.com>
Reviewed-on: http://git-master/r/1141924
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Jihoon Bang <jbang@nvidia.com>
drivers/media/platform/tegra/camera/channel.c
drivers/media/platform/tegra/camera/mc_common.h