msm: vidc: Update sub_anchor_mv buffer size

The sub_anchor_mv size is not sufficient if the height
is more than 1088 in video clips, this change will amend
the buffer size to avoid video hardware resulting iommu
crash failures for such clips.

Change-Id: Ie59f04b9edaa9d2364d4e5014d2eb6f882728c76
Signed-off-by: Maheshwar Ajja <majja@codeaurora.org>
msm: kgsl: Insert kgsl idle for iommu-v1 when pagetables are changed.

An idle is needed for iommu-v1 before programming both tlb registers
and the pagetable register. Without this idle faults are observed on
2D core because a process uses another processes pagetable.

Change-Id: Ief14cd79b8e7ffaed413da49dc4b9e8416233186
Signed-off-by: Hareesh Gundu <hareeshg@codeaurora.org>
defconfig: Enable IPSec related configuration

Configuration changes to enable IPSec tunnel/transport mode,
user configuration via "ip xfrm" commands and necessary crypto algorithms

Change-Id: Iadd773e2292cd804c8347c690490e0555f2d6a52
CRs-Fixed: 455801
Acked-by: Sireesh Gavini <sgavini@qti.qualcomm.com>
Signed-off-by: Sanket Khidkikar <sanketk@codeaurora.org>
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: vidc: Fix compilation errors

This change removes the compilation error in kernel
if ddl logs are enabled.

CRs-Fixed: 483776
Change-Id: Iffc37fcdd4e5ce7ddcd8560d432af5c3f3e6c433
Signed-off-by: Shobhit Pandey <cshopan@codeaurora.org>
msm: vidc: Do not reset VCD_FRAME_FLAG_DATACORRUPT flag for VC1

- To propagate VCD_FRAME_FLAG_DATACORRUPT flag to IL client, dont reset.

Change-Id: I68bf4c953c02a2a4327fe6e875863853cb4e0bf8
CRs-Fixed: 472798
Signed-off-by: Srinu Gorle <sgorle@codeaurora.org>
msm_fb: display: Add minimum src/dst image size validation for MDP

MDP4 has minimum size restriction for both source and destination
height and width. Add checks to validate source and destination
layer size.

CRs-fixed: 484728
Change-Id: I8cb8d4b969cd6ab2d8e99d7ed2ebb1a4adce1ef3
Signed-off-by: Mayank Chopra <makchopra@codeaurora.org>
msm: kgsl: Add NULL check for next_event hook

KGSL driver needs to check that the function pointer
is not NULL before calling the hook. next_event
is an optional function not implemented by the 2d
core. This fix ensures that optional and unimplemented
function will not invoked by the driver.

Change-Id: I687b028260e3ec304d973c6a5bded0a8fdbfb73b
Signed-off-by: Hareesh Gundu <hareeshg@codeaurora.org>
msm: pm-8x60: Use relative time for events

There is a bug when adjusting for event wakeups. The adjusted time
is being set in absolute mode incorrectly. Instead just use relative
times.

Without this core wakeups may not happen on time.

CRs-fixed: 486466
Change-Id: If625f25bd573b05befb6e0f922c80db646428b86
Signed-off-by: Girish Mahadevan <girishm@codeaurora.org>
Signed-off-by: Venkat Devarasetty <vdevaras@codeaurora.org>
msm_serial_hs: Fixing issue during UART shutdown

During UART port close in msm_hs_shutdown(), flag is_shutdown is
set as true and then UART interrupt is disabled and UART irq line
is freed. This is causing corner case in which even if uart shutdown
is in progress, UART interrupt can come as the UART interrupt is not
disabled and UART irq line not freed at this point. As flag
is_shutdown is set as true in msm_hs_shutdown() and then if UART
interrupt comes, it is hitting BUG_ON in UART Interrupt handler
msm_hs_isr(). To fix this issue, disable the UART irq and free
the UART irq line at the beginning of the msm_hs_shutdown() and
then set the flag is_shutdown.

In msm_hs_shutdown, disabling UART Interrupt and setting flag
is_shutdown is done with uart spinlock acquired. There is a
possibility that on other core, msm_hs_isr() might need to wait
for the same uart spinlock and later when msm_hs_isr() is executed
BUG_ON is hit. As by this time all UART Interrupt is disabled,
hence removing the BUG_ON and instead keep prints to notify the
same.

CRs-Fixed: 487945
Change-Id: I0a19b8f3098f1c9215935ca7fa9d9e5895c44a8c
Signed-off-by: Saket Saurabh <ssaurabh@codeaurora.org>
msm: camera: Check if client is NULL before calling ion_free

NULL check was added inorder to prevent a target reboot in ion_free
in case client is already NULL

Change-Id: I263f56ff06ad7907c459b4f7254fc1435a41c61d
Signed-off-by: Aditya Jonnalagadda <ajonnala@codeaurora.org>
msm: camera: fix bus vectors during client registeration.

Initializing correct bus vectors during client registeration
Signed-off-by: satyavaraprasad yerramsetti <satyav@codeaurora.org>

Change-Id: I59ca54d370a885ce0baf4a3795dfafa9fba070ec
Signed-off-by: satyavaraprasad yerramsetti <satyav@codeaurora.org>
Merge "msm: vidc: Fix compilation errors"
Merge "msm_serial_hs: Fixing issue during UART shutdown"
Merge "msm: vidc: Update sub_anchor_mv buffer size"
msm: camera: Recovery through camif stop and overall reset.

Add recovery mechanism in case of bus overflow. As part of the
recovery, stop the CAMIF, reset the VFE and reload the AXI
write masters and then restore the IRQ settings to VFE.

Change-Id: Iba6576777f05135cc13c1ee0c9db764d35c7282a
Signed-off-by: Kevin Chan <ktchan@codeaurora.org>
Signed-off-by: Praveen Ac <praveenac@codeaurora.org>
Signed-off-by: Kiran Kumar H N <hurlisal@codeaurora.org>
msm: camera: Add recovery routine for live snapshot.

During live snapshot, if bus overflow happen, recovery routine will
kick in and reset the hardware. At this point, the live snapshot
might not be completed and application will continue to wait for
the snapshot to complete. This change adds the logic to restart
the snapshot process after recovery is completed.

Change-Id: I9ba0a27ce53eb008a4af8d65a3f37a7cded03559
Signed-off-by: Kevin Chan <ktchan@codeaurora.org>
Signed-off-by: Praveen Ac <praveenac@codeaurora.org>
Signed-off-by: Kiran Kumar H N <hurlisal@codeaurora.org>
msm: camera: Move halt logic in case of overflow to ISR.

Move the halt logic which includes AXI HALT and CAMIF Disable
to ISR to start the recovery mechanism sooner.
Add some protection in case of liveshot.

Change-Id: I28ec462474524c0064cd7ecd4f77801cd494e514
Signed-off-by: Kevin Chan <ktchan@codeaurora.org>
Signed-off-by: Praveen Ac <praveenac@codeaurora.org>
Signed-off-by: Kiran Kumar H N <hurlisal@codeaurora.org>
Merge "msm_fb: display: Add minimum src/dst image size validation for MDP"
usb: gadget: u_data_hsic: Fix NULL pointer dereference

The port->in and port->out are reset to NULL during disconnect.  The
connect work checks these variables before allocating requests.  Store
port->in and port->out in local variables to free the already allocated
requests before returning.

CRs-Fixed: 488044
Change-Id: Idcdc98e4237b646934c90077a1d58990e853e344
Signed-off-by: Pavankumar Kondeti <pkondeti@codeaurora.org>