msm: kgsl: Lower bounds check the number of power levels

A misconfigured board file could cause an out-of-bounds
array access through this value.

Change-Id: I64bbad0c096a2efe65376991537d810141370d72
CRs-Fixed: 439230
Signed-off-by: Lucille Sylvester <lsylvest@codeaurora.org>
msm_fb: hdmi: Check for stale HDCP variables

Check for stale HDCP variables like An from previous authentication
failure. In case of stale data, wait for some time to make sure HDCP
has has fresh data.

Change-Id: I37685a0246f3b60c383e3bf8d024c2b13fb3e5f6
Signed-off-by: Ajay Singh Parmar <aparmar@codeaurora.org>
msm: dcvs: fail gracefully if TZ does not support dcvs

If dcvs attempts to initialize on a system where TZ does not support
dcvs, it will eventually cause a crash. Prevent this by disabling
dcvs if TZ does not successfully initialize its part of dcvs.

Change-Id: Ic9cd361243c03c3832133614c4847a2815b0bbb4
Signed-off-by: Steve Muckle <smuckle@codeaurora.org>
msm_fb: display: Add pseudo-planar 422 H1V2 support in the MDP4

Rotator outputs pseudo-planar 422 H1V2 for interleaved inputs
on 90 degree rotation. Add changes to support MDP_Y_CRCB_H1V2
in MDP4.

CRs-Fixed: 371303
Signed-off-by: Mayank Chopra <makchopra@codeaurora.org>

Conflicts:

	drivers/video/msm/mdp4_overlay.c

Change-Id: I730a3196df8d0c204e6334c2c8b9199d15cbb16a
Signed-off-by: Mayank Chopra <makchopra@codeaurora.org>
msm: rotator: Add pseudo-planar 422 H1V2 dst format for MDP4

Rotator outputs pseudo-planar 422 H1V2 for interleaved inputs
on 90 degree rotation.Add changes to support MDP_Y_CRCB_H1V2,
MDP_Y_CBCR_H1V2 in MDP4.

CRs-Fixed: 371303
Change-Id: I42ea86992fc77cd335437a47611e9f640f30ed25
Signed-off-by: Mayank Goyal <goyalm@codeaurora.org>
Signed-off-by: Mayank Chopra <makchopra@codeaurora.org>
msm: ipc: Serialize SMD XPRT CLOSE and OPEN events

When a remote subsystem resets, IPC Router's SMD XPRT Layer queues a CLOSE
event. When the concerned subsytem powers up and the channel is reopened,
SMD XPRT Layer queues a OPEN event. When the remote subsytem resets and
powers up quickly, the following race condition exists:
a) IPC Router is scheduled out while handling the CLOSE event, leaving a
   stale XPRT
b) IPC Router's SMD XPRT Layer queues a OPEN event
c) IPC Router's SMD XPRT Layer reads a HELLO message, finds a stale
   XPRT and queues a DATA event on the stale XPRT
This race condition causes a kernel panic.

Fix this race condition by not handling any other SMD XPRT event until
the CLOSE event is complete.

CRs-Fixed: 488331
Change-Id: I2283e163413d1896bd6842530b8a6a2b537e22de
Signed-off-by: Zaheerulla Meer <zmeer@codeaurora.org>
wcnss: Add API to expose the IRIS XO mode set

IRIS XO mode can be configured thru module parameter; and it can also
be auto detected. Add an API to expose the IRIS XO mode set. WLAN driver
can use this API for it's XO specific operation.

Change-Id: If40ae715f5e400e13a6fc9588d2bd144958ee8c2
Signed-off-by: Sameer Thalappil <sameert@codeaurora.org>
msm_fb: display: Fix interleaved 422 input format register settings

Check to update chroma sample information in source format register is
based on fetch plane value, which does not take into account for
interleaved 422 input format. Remove this check and set chroma sample
values for RGB formats as well.

CRs-Fixed: 501035
Change-Id: If8fd47b6d47b326efd1cb70ce9701ac1d457dcfd
Signed-off-by: Mayank Chopra <makchopra@codeaurora.org>
msm: camera: Enable use of AVTimer, Rotation and Crop for VT

The changes expose parameters for the application to set
the use of AVTimer for TimeStamp information and rotation
angle for video stream along with crop for VT use case.

CRs-fixed: 498762
Change-Id: Icf883f53513ab084f0970e84bbccd8bb9ec64737
Signed-off-by: Alok Kediya <kediya@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>
diag: Add debug prints in error cases

In some error cases, returning error code without printing
any message which makes debugging difficult. Add more
extensive debugging prints in error cases.

Change-Id: I1bc147c4420942ecda953ab512f639f6683e511d
CRs-Fixed: 495436
Signed-off-by: Mohit Aggarwal <maggarwa@codeaurora.org>
Merge "msm: kgsl: Lower bounds check the number of power levels"
Merge "msm: camera: Enable use of AVTimer, Rotation and Crop for VT"
Merge "msm_fb: display: Add pseudo-planar 422 H1V2 support in the MDP4"
Merge "msm: rotator: Add pseudo-planar 422 H1V2 dst format for MDP4"
Merge "msm_fb: display: Fix interleaved 422 input format register settings"
Merge "msm: ipc: Serialize SMD XPRT CLOSE and OPEN events"
usb: gadget: composite: Fix a bug in delayed status handling

The SET_CONFIGURATION control request's status phase is delayed
till the new config change is handled by the file-storage thread.
If the cable is disconnected or the bus is reset before the
previous config is handled, then composite driver is not notified
about the delayed status.  As a result of which, the delayed_status
field of composite device structure remains non-zero.  The status
phase of next SET_CONFIGURATION control request is not sent.
This makes the gadget unusable.

Calling usb_composite_setup_continue() after the disconnect or reset
does not make any sense.  If the host sends another control request
before the status phase of the previous control request is sent, the
delayed_status must be reset to zero.  This is not straight forward
as the UDC handles some control requests without delegating them to
the composite driver.  A simple fix would be resetting the delayed
status value after the disconnect/reset.

CRs-Fixed: 501527
Change-Id: I67c832afc88c9e7d025247e539b7223fd83644d7
Signed-off-by: Pavankumar Kondeti <pkondeti@codeaurora.org>
Merge "usb: gadget: composite: Fix a bug in delayed status handling"