msm: camera: Check for valid pcam before using it

When event notify is called, check if pcam is valid or not
to avoid NULL pointer deferences.

CRs-Fixed: 462215
Change-Id: I78590c06ff5132dce0a629e8496d11360201aafc
Signed-off-by: Raju P.L.S.S.S.N <rplsssn@codeaurora.org>
msm: camera: Fix flash issue timeout

Add timer and refresh logic for flash to work
in torch mode until user changes flash stae.

Change-Id: I9f6e5fb8de60015d354234c65fd0e53733bcb4f5
Signed-off-by: Suresh Vankadara <svankada@codeaurora.org>
msm: camera: remove frame delay at start_stream in msm_sensor

required for latency optimization

Change-Id: I3d039e21ee8736cf8df1373d5386671f77f2382c
Signed-off-by: Punit Soni <punits@codeaurora.org>
Signed-off-by: Dhivya Subramanian <dthiru@codeaurora.org>
msm: camera: fix the out of order of frames issue

observed that if the frame processing in the userspace
is delayed, the incoming frames from the hardware are being sent
to user before the diverted frame returns.so dropping the
the delayed postprocessing frame to prevent out of order

Change-Id: I43b0f9ea7a7683a419ce142b7d4fdf9e13d11d95
Signed-off-by: Lakshmi Narayana Kalavala <lkalaval@codeaurora.org>
msm: camera: Fix event queue drain issue

when camera daemon is killed, then command processing
timeout happens and there is a possibility of pending
event payload data. It creates a problem for further
command processing due to mismatch of event ids.
Drain the event payload queue when there is a timeout
for any event.

Change-Id: I046baf5ecc8abc8e795f96f8a1701da5c8506b88
CRs-Fixed: 467053
Signed-off-by: Suresh Vankadara <svankada@codeaurora.org>