Revert "oppo: drivers/media/video/msm/io"

This reverts commit 321c47ef5d9c692749014eccf86287a4eebe62bc.
msm: camera: Add NULL pointer check for regulator

To avoid potential crashes, Null pointer check is added
before regulator calls are made

Change-Id: I3c745ff0600971d07d10b7a537e6f2375a2bf4ab
Signed-off-by: Aditya Jonnalagadda <ajonnala@codeaurora.org>
msm: camera: Fix camera crash when ctrl_q is empty

Add proper error condition if the list is empty and
return error value to upper layers instead of BUG_ON.

Change-Id: I89237e7a27d5fb1e1fd5f1a8a2dfd7ea9a1afff5
CRs-Fixed: 481759
Signed-off-by: Suresh Vankadara <svankada@codeaurora.org>
msm: camera: Fix mctl release crash issue.

After mctl release initialize pointer to NULL to
avoid crash.

Change-Id: Ia3e0b1b809f85760a92b5248f402df589c6ace04
Signed-off-by: Suresh Vankadara <svankada@codeaurora.org>
msm: camera: Enable pixel line buffer for ispif.

Enable pixel line buffer for ispif to handle fast incoming
data. This provides cusion to dowmstream components such as vfe
and helps in preventing UB buffer overflows.

Change-Id: I0c2a0f8241e08d6cf39732db4ee05b34975b1557
Signed-off-by: Nishant Pandit <npandit@codeaurora.org>
Signed-off-by: Praveen Ac <praveenac@codeaurora.org>
msm: camera: Disable software override for axi wm priority.

Remove the software override for write master priority because
hardware assigns priority to write masters based on data rate.

Change-Id: If16b54f05d41a2d78606ae21983aa3248eb2b1a3
Signed-off-by: Nishant Pandit <npandit@codeaurora.org>
Signed-off-by: Praveen Ac <praveenac@codeaurora.org>
msm: camera: Add null checks for stats module

Add null checks in stats driver before accessing the
data structures to avoid null pointer crash.

Change-Id: I87639848e94e69e3fa020344f936e7cc182e2c66
Signed-off-by: Nishant Pandit <npandit@codeaurora.org>
msm: gemini: Fix the error irq handling sequence

Update the gemini IRQ handling sequence in ISR.

Change-Id: Ia47e1600174462341027540247a79cba7ffd9c56
Signed-off-by: Sunid Wilson <sunidw@codeaurora.org>
Signed-off-by: Kiran Kumar H N <hurlisal@codeaurora.org>
msm: gemini: Reset the core incase of overflow error

Reset the gemini core for the overflow usecases.

Change-Id: I64b4283806d67615b2963e0d6a42f04a40d6a892
Signed-off-by: Sunid Wilson <sunidw@codeaurora.org>
msm-camera:Fix integer overflow when processing msm gesture ioctl.

Add check for integer overflow.

CRs-Fixed: 483781
Change-Id: I9534421f9780f5880ddc6e89fc2b451285ee60e0
Signed-off-by: Praveen Ac <praveenac@codeaurora.org>
msm: camera: Handle locks properly

Update camera drivers to unlock mutex while returning
the function in caseof errors.

Change-Id: Iaac7ae3a0337445ee072c10c69080c24ed6e512c
Signed-off-by: satyavaraprasad yerramsetti <satyav@codeaurora.org>
msm: camera: Added the NULL pointer check

Added the NULL pointer check for isp_config
to avoid the crashes

Change-Id: I2df7eeb5c633b04c3aac5d985cf50c2ece7f1076
CRs-Fixed: 495652
Signed-off-by: manish gotefode <mgote@codeaurora.org>
msm:camera: Fix signedness issue in hw_exec_cmds

  In hw_exec_cmds()second argument m_cmds should be
  of type unsigned interger

Change-Id: Idad2eb1a59481f3fe9f90221ff2061e8dae57013
CRs-Fixed: 493314
Signed-off-by: Monika Alekhya <malekh@codeaurora.org>
msm:camera: Increase the v4l2 event queue length

Observed missing of v4l2 events to userspace media controller,
this can happen if media controller is blocked in post processing
the frames. Hence increasing the queue length gives enough time
to accomodate all the events without being overwritten with
newer events.

Change-Id: Ic3b5fd29df8c6384e83312b9c9ffd788bdf60951
Signed-off-by: Lakshmi Narayana Kalavala <lkalaval@codeaurora.org>
msm: camera: Enable frame based AXI WM for RDI0

Frame based AXI WM configuration for RDI0 path
Also populate sensor type in the device info structure.

Change-Id: Ib6d65cd8cb1e4655c4f67903a8f329962512115e
Signed-off-by: Sai Kumar Sanagavarapu <ssanagav@codeaurora.org>
msm: camera: Handle ioctls issued on vfe subdevice properly

In case vfebase is not set by the time ioctl is issued on the
vfe subdevice, it might lead to kernel panic if the arguments
of the ioctl are not set properly. Now handling these ioctls
before checking for vfebase will remove the possibility of a
kernel panic.

CRs-Fixed: 502383
Change-Id: Ib36db26c58acbaef14f1052aed71b7c3701e93a3
Signed-off-by: Aditya Jonnalagadda <ajonnala@codeaurora.org>
msm: camera: Null check added at iommu_attach_device

In case domain has not been initialized before, added a null
check for it inorder to avoid a potential kernel panic.

CRs-Fixed: 502383
Change-Id: I43a173e96415bdaea0968ce6ca37e6c1ee75d666
Signed-off-by: Aditya Jonnalagadda <ajonnala@codeaurora.org>
 msm:camera: Fix overflow issue in ioctl_hw_cmds function

    'len' is of type signed int 32bit,but the assigned value
    may exceed maximum unsigned int32 range.Add overflow check
    and graceful exit if 'm'exceeds UINT32_MAX value.

Change-Id: I38f0d10a0cb44d08d0054f91044fc891c246ebd1
CRs-Fixed: 493314
Signed-off-by: Monika Alekhya <malekh@codeaurora.org>
msm: camera: Fix for kernel panic

check if buffer instance handle is zero while
getting pcam instance based on instance handle
in msm_mctl_reserve_free_buf function

Change-Id: Id3861c4f29fb4f7fd62ad6de6597e65c7c4f656b
Signed-off-by: manish gotefode <mgote@codeaurora.org>
msm: camera: Check for open camera instances before release

Release the subdevs and QOS variables only if there are active
camera instances

Change-Id: If8f6eb80cf7bd21e36de988ad6c4df7441d655ae
CRs-fixed: 490249
Signed-off-by: Alok Kediya <kediya@codeaurora.org>

Conflicts:
	drivers/media/video/msm/msm_mctl.c