msm: camera: Make ISP and camera kernel not interruptible

Change wait_event_interruptible_timeout to wait_completion_timeout
in camera kernel and change wait_completion_timeout_interruptible
to wait_event_timeout to avoid getting interrupts from kernel.

Change-Id: Ibf17d0f11ed705e68294257a90f7770676e63cbb
Signed-off-by: Yiduo Wang <yiduow@codeaurora.org>
msm-camera: Reset ISPIF h/w

Reseting ISPIF hardware after ISPIF is stopped without frame
boundaries.Enabling all clocks for same.

Change-Id: I3712a2af9a3011769e14fab14ddaa5a32f6bcb90
Signed-off-by: Megha Tak <mtak@codeaurora.org>
msm: camera: Fix crash in ispif release

There is a BUG_ON in ispif release function for
ispif base address. but in case of just open and close
of ispif subdevice leads to ispif base NULL.

BUG_ON is removed and proper error is added in ispif
release function to fix the issue.

Change-Id: I0cc12d52aff9db0d9bb8844473f9bd6547270e27
CRs-Fixed: 642603
Signed-off-by: Suresh Vankadara <svankada@codeaurora.org>
msm: Camera: Return proper value for msm_camera_qup_i2c_txdata().

msm_camera_qup_i2c_txdata() is not returning proper value.
Due to which session tear down is not happening properly
in case of i2c failure.
CRs-Fixed: 640328

Change-Id: Iac8be9d4755f807b45a6ede4f660b52cb88aedd4
Signed-off-by: Vivek Veenam <vveenam@codeaurora.org>
msm: camera: sensor: Update CCI WR comamnd buffer size to 11 bytes

I2C command length is of 11 bytes, it includes 10 bytes of data and
one byte of WR command. Use 11 bytes char array to create command.

Change-Id: Idf330fef6b8da79c6b7f5a2839d88a68e10a96f9
Signed-off-by: Rajesh Bondugula <rajeshb@codeaurora.org>
msm: camera: sensor: Update to use wait_for_completion.

Use wait_for_completion in place of wait_for_completion_interruptible

Change-Id: I960b334128e2b811b27c64721a65f7c7e773b085
Signed-off-by: Rajesh Bondugula <rajeshb@codeaurora.org>
msm: camera: Fix various small issues in Actuator driver

Bound check and validate userspace parameters direction,
number of steps and direction sign. Also fix possible
memory leak in certain error cases.

CRs-Fixed: 511349
Change-Id: Icaa324468574494fb40f2de78e522090806744cb
Signed-off-by: Yiduo Wang <yiduow@codeaurora.org>
msm: camera: Removed CCI_RELEASE call.

CCI_RELEASE not needed when CCI_INIT is failed.
Cleanup is done internally in msm_cci_init.

Change-Id: I44b82eeb40fc4e14c1720c17fefa309d17a469da
Signed-off-by: Rajesh Bondugula <rajeshb@codeaurora.org>
msm: camera: sensor: remove unnecessary logs

Use CDBG instead of pr_err for non-error logs.

Change-Id: If09d576040011e4036dda830b50d84473ec806b7
Signed-off-by: Xu Han <hanxu@codeaurora.org>
msm: camera: add missing eeprom checksum & data read code

Signed-off-by: sudosurootdev <sudosurootdev@gmail.com>
camera_v1/v2: Fix multiple JPEG integer overflow issues

Fixes multiple issues in the gemini and jpeg 1.0 cores when parsing
hw commands:

1. Fixes integer overflow issue when calculating the length of the
command buffer.
2. Fixes signedness issue with the command count.

CRs-fixed: 504640
Signed-off-by: Kamen Kirov <kkirov@codeaurora.org>
Change-Id: I0a701c67b93cc97af119b31639db699e5ae58489
camera_v2: JPEG 1.0: add alignment check on register offset

Adds a check on the offset value in msm_jpeg_hw_cmd structure
for correct alignment.

Signed-off-by: Kamen Kirov <kkirov@codeaurora.org>
Change-Id: I9233cf6b7b300958188d2c95fb5a2c5f7a1e9cfb
camera_v2: Use JPEG_DBG instead of JPEG_ERR for some messages

Avoid printing by default a number of debug messages, to decrease
the ioctl latency in the dual JPEG use case.

Signed-off-by: Kamen Kirov <kkirov@codeaurora.org>
Change-Id: I1cfd16270282587cbf1821d34f658af80fe69fd1
camera_v2: jpeg_10: Fix return value of MSM_JPEG_IOCTL_HW_CMD

The ioctl MSM_JPEG_IOCTL_HW_CMD was returning -1,
when using MSM_JPEG_HW_CMD_TYPE_WRITE due to incorrect input
validation logic.

Signed-off-by: Kamen Kirov <kkirov@codeaurora.org>
Change-Id: Ib47973fe6e2c398ef11e6ec3179388a7823e0b3f
Config: Sync defconfigs; missing quote in Kconfig

Signed-off-by: sudosurootdev <sudosurootdev@gmail.com>
Add memutils Makefile header and init mmu-y

Signed-off-by: sudosurootdev <sudosurootdev@gmail.com>
[NO CHANGE] Fix Permissions: rw-r-r

Signed-off-by: sudosurootdev <sudosurootdev@gmail.com>
ASoc: msm: qdsp6v2: Fix for NULL check

- Required check added for NULL pointer

CRs-fixed: 583939
Change-Id: I8b079c42ef06af9a817dc830c5f2d3c785232aa7
Signed-off-by: Mingming Yin <mingming@codeaurora.org>
Fix unintialized, undefined vars, & other warnings being treated as errors

Signed-off-by: sudosurootdev <sudosurootdev@gmail.com>
Update KVM VMWARE modules