msm: thermal: Optimize locking in thermal frequency mitigation thread

Optimize locking in thermal frequency mitigation thread
to reduce lock contention with hotplug mitigation thread.
This lock is not explicitly required since the cpu driver
already have a per cluster lock down the freqency mitigation
call path. This would be much optimized since the new changes
will hold the lock for a shorter period and unlike previously
where the lock was for entire cluster, this is per cluster
lock that will further reduce lock contention. This would
help thermal to do mitigation faster.

Change-Id: I192efa77df8ad9b128759f31300d4a64a558cc16
Signed-off-by: Shiju Mathew <shijum@codeaurora.org>
mm: vmscan: lock page on swap error in pageout

A workaround was added ealier to move a page to active
list if swapping to devices like zram fails. But this
can result in try_to_free_swap being called from
shrink_page_list, without a properly locked page.
Lock the page when we indicate to activate a page
in pageout().
Add a check to ensure that error is on swap, and
clear the error flag before moving the page to
active list.

CRs-fixed: 760049
Change-Id: I77a8bbd6ed13efdec943298fe9448412feeac176
Signed-off-by: Vinayak Menon <vinmenon@codeaurora.org>
msm: mdss: add check to avoid fudge factor for non real time interfaces

Current driver checks if some video interface is connected
in order to apply a fudge factor. This is expected for real
time interfaces, but non real time interfaces should not
account for this extra bandwidth. This fix adds a check
to make sure that for non real time interfaces the fudge
factor does not get applied.

Change-Id: Ib01d12f4e7749f4e083fa09f6392896313978d72
Signed-off-by: Ingrid Gallardo <ingridg@codeaurora.org>
Signed-off-by: Nirmal Abraham <nabrah@codeaurora.org>
msm: camera: ispif: Validate vfe_intf parameter

Validate vfe_intf parameter to avoid invalid register access.

Change-Id: Ie0b57071cc5fca1c48d3a5e2e7819f9af9ff544c
Signed-off-by: Suman Mukherjee <sumam@codeaurora.org>
mdss: mdp3: add systrace begin/end trace events

Adding trace points for systrace at various points in
the driver

CRs-Fixed: 755539
Change-Id: I14eebb95947938b4e998e8320ef1750769291e99
Signed-off-by: Ramakant Singh <ramaka@codeaurora.org>
Signed-off-by: Nirmal Abraham <nabrah@codeaurora.org>
usb: dwc3: gadget: Ignore L1 RESUME events

Events may get generated for Link Power Management L1
Suspend and Resume. The suspend case currently ignores
L1 and only proceeds to call the gadget driver suspend
routines if it is for L2/U3 entry. However, the resume
callback doesn't make this distinction, which will
result in the gadget layer resume getting called for
which there had not been a previous suspend.

CRs-Fixed: 739812
Change-Id: Ib38e8949ce78ab40bd4f78041de92103869081b6
Signed-off-by: Vijayavardhan Vennapusa <vvreddy@codeaurora.org>
msm: mdss: Don't call pan_idle for MSMFB_OVERLAY_PREPARE ioctl

We keep calling MSMFB_OVERLAY_PREPARE for each composition
cycle, even if there are no changes in params. Because of this
we can hit performance degradation due to pan idle wait.
This change removes pan_idle wait for prepare call.

Original fix change id: Ie99f4dbc4671caf9bfbd49bd9b200c3180002d56.
As it was broken through a refactoring change, correcting it now.

CRs-Fixed: 600539
CRs-Fixed: 608848

Change-Id: I248396c8a4cadf06aa15bbed00e2e7fd9b774c63
Signed-off-by: Nirmal Abraham <nabrah@codeaurora.org>
msm: camera: sensor: sanitizing user space pointer
msm: kgsl: Continue if an IB couldn't be dumped in snapshot

If an IB cannot be added to the snapshot list, that's no reason to
stop dumping the object that uses it. Continuing further will make
sure that all possible data is dumped into the snapshot, and make
it available for offline use.

Change-Id: Ia541510754a9919838e7fc337fa3f2515c6f0f05
Signed-off-by: Lynus Vaz <lvaz@codeaurora.org>