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: audio: qdsp6v2: Add size safety check to ACDB driver

Check that the size sent by userspace is not larger
then the internal amount allowed. This protects
against overflowing the stack due to an invalid size.

Change-Id: I8230fdb00a7b57d398929e8ab0eb6587476f3db1
CRs-fixed: 470222
Signed-off-by: Ben Romberger <bromberg@codeaurora.org>
ASoc: msm: Fix for pcm_read getting struck in alsa core.

Advance hardware pointer by period size even if the packet
coming from qdsp6 is of less size. QDSP6 sometimes
(for rapid device switches) gives packets worth less
than period size and this results in hw_ptr appl_ptr mismatch.

CRs-Fixed: 486276
CRs-Fixed: 488449
Change-Id: I893f9a52e4cd507fd72e4a7aba3c5fa76527d1bf
Signed-off-by: Sidipotu Ashok <sashok@codeaurora.org>
USB: ci13xxx_udc: Fix kernel panic during composition switch

The control endpoint requests are not nuked properly during
composition switch.  The stale request is getting completed
during enumeration of the new composition.  Kernel panics if
completion handler access already freed data.  This is happening
with RNDIS interface.

The Android composite driver dequeue the control request before
removing the composition.  The current code returns immediately
if the queue is empty.  The control endpoint queues are handled
differently.  The EP0 IN endpoint is only exposed to the composite
driver.  The controller driver takes care of queuing the request
on EP0 IN or EP0 OUT based on control transfer direction.  When
the composite driver dequeue request on control endpoint, check
both direction endpoints queues.

When USB bus is reset, nuke the control endpoints.  Flushing the
endpoint will not call completion handler.

Test endpoint queue list, request list, endpoint descriptor and
soft pull up status under spinlock to prevent any races between
dequeue and queue paths.

CRs-Fixed: 474578
Change-Id: I3d7ca4be4d6cee65707879c6c9b501f442e53018
Signed-off-by: Pavankumar Kondeti <pkondeti@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: Don't access context memory after it's freed

Context memory was potentially accessed after being freed. Fix this
by incrementing the context's refcount at strategic places.

Change-Id: I31049bdd3eb9ac52160ca593619fcc8a32d4ddee
Signed-off-by: Lynus Vaz <lvaz@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: camera: Reverse the order of csiphy and csid release

Observed a power leak with incorrect order of releasing
csid and csiphy hardware, this change fixes the issue.

Change-Id: I550c5714063a834d2fc7c8075937d0eac80712a4
Signed-off-by: Lakshmi Narayana Kalavala <lkalaval@codeaurora.org>
Merge "msm: camera: Add NULL pointer check for regulator"
Merge "msm: audio: qdsp6v2: Add size safety check to ACDB driver"
Merge "ASoc: msm: Fix for pcm_read getting struck in alsa core."
Merge "USB: ci13xxx_udc: Fix kernel panic during composition switch"
Merge "msm_fb: display: Add minimum src/dst image size validation for MDP"
msm: vidc: Remove unwanted error message

This change removes unwanted error message about video
clock settings.

Change-Id: I49f30d681366e07a2e002a9df58460962fd12318
CRs-Fixed: 488058
Signed-off-by: Srinu Gorle <sgorle@codeaurora.org>
Signed-off-by: Deepak Verma <dverma@codeaurora.org>
Merge "msm: kgsl: Don't access context memory after it's freed"
Merge "msm: kgsl: Add NULL check for next_event hook"
Merge "msm: camera: Reverse the order of csiphy and csid release"
Merge "msm: vidc: Remove unwanted error message"