msm: kgsl: allow creation of events from the future

For contexts created with the KGSL_CONTEXT_USER_GENERATED_TS,
allow events to be created for timestamps that have not
been issued yet. Presumably these contexts know what they
are doing.

Change-Id: Iccf2e549b38e1a11850d26ee64b7279ab0b8a1ae
Signed-off-by: Jeremy Gebben <jgebben@codeaurora.org>
msm: kgsl: Fix memleak in IOMMU clock disable

IOMMU clock disable on timestamp allocates memory and passes
the pointer to event created, this memory should be freed
when the event fires.

Change-Id: Ia714550ce8a05958fb6668293cd0400a0f69d4af
Signed-off-by: Tarun Karra <tkarra@codeaurora.org>
msm: wlan: update db.txt with new compliance information

Update the db.txt with new compliance information.

Change-Id: I7a544bd3f714143da50c31b9ab4a2d152146d3df
CRs-Fixed: 625165
Signed-off-by: Santhosh Kumar Padma <skpadma@codeaurora.org>
binder: NULL pointer reference

This fix handles a possible NULL pointer reference in
debug message.

CRs-fixed: 642883
Change-Id: Ide78f281ec0cff5cbd8231b85c305d13a892854e
Signed-off-by: Paresh Nakhe <pnakhe@codeaurora.org>
msm: krait-regulator-pmic: account for PWM_CL register security

The PWM_CL register is secure i.e. driver has to write 0xA5 to 0XD0
register to allow updates to PWM_CL register.

Fix it.

Change-Id: I3f273627bdc137d8c10768c7d5824abe96ee8707
Signed-off-by: Abhijeet Dharmapurikar <adharmap@codeaurora.org>
ARM: dts: msm: revert the change for HSIC host controller

Due to this change might influence the WCN solution on APQ8074,
revert this change.

Change-Id: Id1feaf5af9e72823f7e0c27c6198c3ebe6eb3465
Signed-off-by: Ming-yi Lin <mylin@codeaurora.org>
msm: display: reduce display commit prepare waiting time

Unblock overlay_set, prepare and buffer sync ioctls when
commit thread finishes hardware programming.
Use wait_for_kickoff nstead of pan_idle for these ioctls.

Change-Id: Iefb6cbc390d2130926fdcb93688b4d92bfb26937
Signed-off-by: Ken Zhang <kenz@codeaurora.org>
Signed-off-by: Neti Ravi Kumar <ravineti@codeaurora.org>
msm-camera: Reset ISPIF h/w

Reseting ISPIF hardware after ISPIF is stopped without frame
boundaries.Enabling all clocks for same.

Change-Id: I3712a2af9a3011769e14fab14ddaa5a32f6bcb90
Signed-off-by: Megha Tak <mtak@codeaurora.org>
defconfig: Increase default kmemleak log size to 4000 from 400

Increase default kmemleak log size to 4000 from 400.
CRs-Fixed: 653040

Change-Id: Idb7187a90e1b4171bd0937ea8e49c9e5adb026ba
Signed-off-by: Prasad Sodagudi <psodagud@codeaurora.org>
USB: Set power supply online status to false after cable disconnect

During bootup, power supply online status is set to true in
qpnp_charger_probe() as soon as usb cable insert is detected by
PMIC without waiting for notification from USB driver.
Later when usb cable is disconnected before charger detection
mechanism starts, online status is not set to false by USB.
As part of cable disconnect, USB checks in msm_otg_notify_charger()
whether the cur_power is same as requested mA, if both are same
then USB does not call power_supply_set_online() to set it to false.

Fix the issue by setting power supply online status to false for
the scenario when usb cable is disconected during bootup before
charger detection mechanism is completed.

CRs-fixed: 634183
Change-Id: Ibd57a40c7364e13bb10870e9e6343224e01171d7
Signed-off-by: Saket Saurabh <ssaurabh@codeaurora.org>
(cherry picked from commit f9269ceb1960fd95f4d2a498b0cc83ad57ab02ab)
leds: leds-qpnp: use the proper pwm period in LPG mode

Previously, when the leds were working in LPG mode, the pwm
period was always set to the minimum value supported by hardware.
That's unreasonable. The better way is to set the period to the
expected value.

CRs-Fixed: 655566
Change-Id: I30b17cbfe98639ec132484f314cb9b9234e74354
Signed-off-by: Xu Kai <kaixu@codeaurora.org>
msm: vidc: Add support for different errors

When hardware is overloaded or when max number of clients are
reached in driver or firmware, hardware error is sent to video
client. This change is to replace hardware error with actual
errors.

CRs-fixed: 575852
Change-Id: I07e599f894a3716a3dc4fed5eb7c987311f5bdde
Signed-off-by: Deepak Verma <dverma@codeaurora.org>
msm: ultrasound: add support for stream parameters

Add new IOCTLs to get and set ultrasound stream parameters in DSP
using shared memory.

Change-Id: I627e9e40e29c6233dab4295e2c355a718e30bd01
Acked-by: Hadar Sivan <hsivan@qti.qualcomm.com>
Signed-off-by: Lior Barenboim <liorb@codeaurora.org>
unix: fix a race condition in unix_release()

As reported by Jan, and others over the past few years, there is a
race condition caused by unix_release setting the sock->sk pointer
to NULL before properly marking the socket as dead/orphaned.  This
can cause a problem with the LSM hook security_unix_may_send() if
there is another socket attempting to write to this partially
released socket in between when sock->sk is set to NULL and it is
marked as dead/orphaned.  This patch fixes this by only setting
sock->sk to NULL after the socket has been marked as dead; I also
take the opportunity to make unix_release_sock() a void function
as it only ever returned 0/success.

Dave, I think this one should go on the -stable pile.

Special thanks to Jan for coming up with a reproducer for this
problem.

CRs-Fixed: 660580
Change-Id: I0e39b84464cf3f4c9daf8677bba444d0d6d94825
Reported-by: Jan Stancek <jan.stancek@gmail.com>
Signed-off-by: Paul Moore <pmoore@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Git-commit: ded34e0fe8fe8c2d595bfa30626654e4b87621e0
Git-repo: https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/
Signed-off-by: Vignesh Radhakrishnan <vigneshr@codeaurora.org>
leds: leds-qpnp: provide pwm period when leds are set to LPG mode in DT

In the current design, if MPP-controlled leds or RGB leds are configured
to LPG mode in the device tree, the PWM period value is not provided.
This will result in "pwm_cfg->pwm_period_us" being assigned to zero
since no PWM period value will be read from device tree. As a result,
qpnp_pwm_init() returns error, which in turn results in failure of
qpnp_mpp_init() or qpnp_rgb_init() and finally resulting in failure of
qpnp_leds_probe().

So "qcom,pwm-us" property should be provided in DT for the above case and
the property parsing needs to be implemented in the leds-qpnp driver.

Change-Id: Ic32833ea4e685939148e38cdba078391936f8efb
CRs-Fixed: 667825
Signed-off-by: Abinaya P <abinayap@codeaurora.org>
Revert "msm: mdss: refactor pipe retrieval and ref count logic"

This reverts commit ed0d39c60f1169338d8b68e85f051ee469a36c73.

Change-Id: I053128bd00ae79e39144a067e3995a80facba27c
Signed-off-by: Anusha Koduru <kanusha@codeaurora.org>
ngd_slim: Decouple clock pause from power down/up

NGD slimbus driver itself can never send out clock pause sequence
for slimbus protocol on the HW lines since it can only be sent by
a manager device (which is controlled by ADSP when NGD driver is
instantiated from apps side).
Previously, clock pause of slimbus framework was coupled with power
down/up. That is not correct, since manager device may or may not
decide to send clock-pause on the HW lines. (e.g. if apps is inactive,
but some client on ADSP is active, clock-pause sequence won't be sent
over the bus.
Decouple power-on/off from clock pause to avoid giving incorrect
impression to clients on apps side about clock-pause state. Mark
clock-pause as unsupported by setting wakup function pointer to NULL
instead since this controller on apps cannot send it on HW lines.

CRs-Fixed: 667165
Change-Id: I382bca153deb2fed1d0f0672adaebde1e122dc68
Signed-off-by: Sagar Dharia <sdharia@codeaurora.org>
Merge "leds: leds-qpnp: provide pwm period when leds are set to LPG mode in DT"
Merge "leds: leds-qpnp: use the proper pwm period in LPG mode"
Merge "ngd_slim: Decouple clock pause from power down/up"