msm: camera: Free buffers from frame queue at open

Free all pending frames in frame queue before cam_frame
thread opens frame device to avoid duplication of buffer
free

CRs-Fixed: 318202
Change-Id: I25d1718a37a94fa83563c4b6e99a1b7560917a7f
Signed-off-by: Suresh Vankadara <svankada@codeaurora.org>
(cherry picked from commit 5dcbcb9f04a94aa6740718a1b6d39ce4548d869c)
msm: camera: Remove additional check in msm_queue_drain

Removed additional check in msm_queue_drain to make
sure that the list is getting emptied in all cases.

Signed-off-by: Sunid Wilson <sunidw@codeaurora.org>
(cherry picked from commit 33e638a1c229765d06a76bc84351de9407026782)

Change-Id: I6b498241490c4264f93ea37b1fa97ebda4cde910
Signed-off-by: Raj Kushwaha <rajk@codeaurora.org>
msm: camera: Handle event queue overflow error

When the config thread crashes or is in bad state, the camera
driver wont get notification which prevents the driver from
shutting down. Added code to handle this usecase.

Signed-off-by: Sunid Wilson <sunidw@codeaurora.org>
(cherry picked from commit 4882c1fdffba47564665ef483bf5fbcd73c23484)

Change-Id: I643f5ac740627e140ba65b662558258f6c1f2c2b
Signed-off-by: Shruthi Krishna <skrish@codeaurora.org>
msm: camera: snapshot interface redesign

Created pic node and associated snapshot functionality
to the new node.
Fixed pmem lookup error for raw snapshot.

Change-Id: I3fe532d9818f9dfb2ad8157b6e1ff98dfce8dfff
Signed-off-by: Sunid Wilson <sunid@codeaurora.org>
msm: camera: multiframe HJR fix for snapshot redesign

Updated the post processing code to handle multiframe HJR
which is aligned with new snapshot design

Change-Id: I939b5339f731beefa7f42dcd2c6509d689087b9c
Signed-off-by: Sunid Wilson <sunid@codeaurora.org>
msm: v4l2: Remove old V4L2 code

Removed obsolete file msm_v4l2.c and other related
old V4L2 code from camera.h and msm_camera.c.

Change-Id: Ib3a54d3d61f181aad6ec7719327eff3051d0ab3c
Signed-off-by: Ankit Premrajka <ankitp@codeaurora.org>
msm: camera: Release sensor and clock in error case.

Release sensor and clock in error case.
Clean up of the event queue while msm_release to handle special
case where config thread was never opened.

CRs-Fixed: 287648
Signed-off-by: Nagesh Subba Reddy <nageshsreddy@codeaurora.org>
(cherry picked from commit 4f3eed7b231db08296a5663d5c22e4d39be3ec10)

Change-Id: Iacfa528b81af21656eb808bf28ea37f080a9bf2e
Signed-off-by: Shruthi Krishna <skrish@codeaurora.org>
msm: camera: Clean up during open failure

Updated the reference count when open fails and did
proper cleanup.

CRs-Fixed: 287648
Signed-off-by: Sunid Wilson <sunidw@codeaurora.org>
(cherry picked from commit f521ef6c4402895abcfc46520db9dd6be81c28b5)

Change-Id: I6bf5d4b85022cfd2682fcec4f4c90ef8ce2fb2d2
Signed-off-by: Sunil Joseph <sunilj@codeaurora.org>

Conflicts:

	drivers/media/video/msm/msm_camera.c
msm: camera: Fix VFETASK command write errors

Issue:
VFE driver doesn't check the state of VFETASK before
sending the commands. ADSP driver returns an error
if vfe driver sends the command without enabling
VFETASK.

Solution:
VFE driver checks the state of VFETASK before sending
any command to VFETASK.

Change-Id: I7835affd5ed24cfe23dfdd60a8e5da8726ff7d0a
Signed-off-by: Suresh Vankadara <svankada@codeaurora.org>

Conflicts:

	drivers/media/video/msm/msm_vfe7x.c
msm: camera: Update vfe driver for new snapshot interface

Issue:
In new snapshot interface design, camera driver expects
physical address of snapshot and thumbnail buffers.
VFE2 doesn't provide this info as part of snapshot done
message. It is causing the failure of snapshot.

Solution:
Cache the addresses of snapshot and thubnail buffers at
axi snapshot configuration and use these values when
vfe driver delivers the messages to camera driver.

Change-Id: Iae0a98ef89dd01607f552eb24f8f943a141d9576
CRs-Fixed: 276066
Signed-off-by: Suresh Vankadara <svankada@codeaurora.org>
msm: Camera: Fix for raw snapshot issue

Initializing y_offset and cbcr_offset for both OUTPUT_2
and OUTPUT_1_AND_2.

CRs-Fixed: 282554
Change-Id: I96b70da61ed8622a95411016efe70e54af768e2b
Signed-off-by: Manogna Reddy Alle <cmalle@codeaurora.org>
Merge pull request #2 from androidmeda/android-ics-msm-2.6.35

Android ICS camera preview