Commit graph

592030 commits

Author SHA1 Message Date
Haibin Liu
95824e6e54 msm: ispif: fix crash during dumping io register
Check whether ispif->base is null before dumping.

CRs-Fixed: 2046207
Change-Id: Ib026632252b43bb4d607ba00188c4c4143c1725e
Signed-off-by: Haibin Liu <haibinl@codeaurora.org>
2017-07-03 23:59:28 -07:00
Rohit Kumar
21472bb158 ASoC: wcd9335: Reset power_active_ref to 0 when it is negative
Reset power_active_ref counter to 0 when it is negative to
take digital core out of reset during next session.

CRs-Fixed: 2054140
Change-Id: I4ca4c465e7d15f8a0ccd0546db7b0cc5c6ea701e
Signed-off-by: Rohit Kumar <rohitkr@codeaurora.org>
2017-07-03 23:01:49 -07:00
Srinivas Rao L
e7072f8ed2 lpm-levels: Enter shallowest state if predicted sleep length is less
If lpm_cpuidle_predict returns the prediction value less than the
minimum residency of shallowest mode, then this case was considered
as not predicted. This allows core to enter into deeper states.
Instead in this case, use the minimum residency of
the shallowest state as the predicted sleep length.

Change-Id: Ib5bd1779e305262aef018f82f57d30ec22162b5b
Signed-off-by: Srinivas Rao L <lsrao@codeaurora.org>
Signed-off-by: Naresh Malladi <namall@codeaurora.org>
2017-07-04 11:20:28 +05:30
Tanvi Aggarwal
1e498718d2 msm-camera: sensor: Fixing kernel crash during i2c read
When userspace uses ioctl(), kernel should get the data from
userpsace through copy_from_user() or get_user() and send it
back to userpsace though copy_to_user() or put_user().
In this case, kernel is not using put_user or copy_to_user
which is leading to a crash during I2C read when it tries to
access memory.

CRs-Fixed: 2058381
Change-Id: Ie5596b62cb589ee048e54f37c7e6beda0d62cad5
Signed-off-by: Tanvi Aggarwal <tanvia@codeaurora.org>
2017-07-03 22:05:47 -07:00
Skylar Chang
f0a066a778 msm: ipa: fix IPA MHI unit tests
Connect a test producer pipe for MHI unit tests as the
default LAN_PROD pipe is not connected on MHI config.

Change-Id: I2fc1ff8758d222a738d570b5babc22ced2b43219
CRs-Fixed: 2066878
Acked-by: Ady Abraham <adya@qti.qualcomm.com>
Signed-off-by: Skylar Chang <chiaweic@codeaurora.org>
2017-07-03 17:23:14 -07:00
Skylar Chang
754752faec msm: ipa: fix mhi suspend logic
Add a missing return statement in IPA MHI suspend routine.

Change-Id: I1dfbcff21ba3ca72ff985e76e851caf6a9da1ae4
CRs-Fixed: 2066866
Acked-by: Ady Abraham <adya@qti.qualcomm.com>
Signed-off-by: Skylar Chang <chiaweic@codeaurora.org>
2017-07-03 17:22:09 -07:00
Linux Build Service Account
de207d8feb Merge "defconfig: arm64: msm: Enable virtual platform" 2017-07-03 15:52:33 -07:00
Linux Build Service Account
ead5fd4f66 Merge "cpuidle: lpm-levels: Check for negative sleep times" 2017-07-03 15:52:32 -07:00
Linux Build Service Account
f9b5ebb0c8 Merge "mm: add vfree_atomic()" 2017-07-03 15:52:29 -07:00
Linux Build Service Account
d4d87115fd Merge "mm: refactor __purge_vmap_area_lazy()" 2017-07-03 15:52:28 -07:00
Linux Build Service Account
3aa63aa4e4 Merge "defconfig: Enable TSPP, MPQ and MPQ_DEMUX for apq8098" 2017-07-03 15:52:27 -07:00
Atul Raut
2bb686dccd defconfig: arm64: msm: Enable virtual platform
Add support to build msm kernel based virtual
machine.

CRs-Fixed: 2000635
Change-Id: I76f4920a86adc8bac347c1c6c360ef55f84bc453
Signed-off-by: Atul Raut <araut@codeaurora.org>
2017-07-03 13:15:39 -07:00
Jordan Crouse
5c91d8529c drm/msm: Add timestamp counter
In the confusion of adding the perfcounter API the timestamp query
was broken. Convert the query over to the perfcounter API to avoid
confusion.

Change-Id: Ic0dedbad590489a643e8aa6d678bf19f732c06dd
Signed-off-by: Jordan Crouse <jcrouse@codeaurora.org>
2017-07-03 13:40:30 -06:00
Jordan Crouse
84200abc78 drm/msm: Remove next_fence
The next_fence array is left over from when we started storing
per-ring information.

Change-Id: Ic0dedbada687f899eca1017ecfd77fbd2aa8e114
Signed-off-by: Jordan Crouse <jcrouse@codeaurora.org>
2017-07-03 13:40:29 -06:00
Jordan Crouse
c94c4109c3 drm/msm: Move hangcheck fence to ringbuffer
hangcheck_fence was missed when all the ring specific members were
moved out of the gpu struct.

Change-Id: Ic0dedbad00a86d6657bc2a3e0e5bbdc5eae21ae6
Signed-off-by: Jordan Crouse <jcrouse@codeaurora.org>
2017-07-03 13:40:29 -06:00
Jordan Crouse
abfc1cf3b3 drm/msm: Remove adreno_last_fence
adreno_last_fence is no longer very useful since we have a handy
per-ring pointer directly to the values we need.

Change-Id: Ic0dedbadfb195551afcd016651776965da32fb2d
Signed-off-by: Jordan Crouse <jcrouse@codeaurora.org>
2017-07-03 13:40:28 -06:00
Jordan Crouse
747d4d00db drm/msm: Change the priority order of the ringbuffers
When we first did preemption the priority was set at submission
time. In order to be properly backwards compatible we made ring id 0
the lowest priority ring so that when a legacy app made a submission
it didn't get itself onto the highest priority ring by accident.

Now that we set the priority with submitqueues this is no longer
a concern and ordering priorities this way goes against long
standing convention in similar GPU drivers.

Declare a flag day and invert the priority algorithm so that
priority '0' is the highest priority and it descends from there.
The lowest prority ring is 'number of rings - 1' where the number
of active rings can be acquired through a parameter query of
MSM_PARAM_NR_RINGS.

This change also ensures that the legacy submitqueue id '0' will
use the next-to-lowest ring buffer by default for legacy
submissions.

Change-Id: Ic0dedbadeea522e4f07babc4395cbf5fb7143fe3
Signed-off-by: Jordan Crouse <jcrouse@codeaurora.org>
2017-07-03 13:40:28 -06:00
Jordan Crouse
9d7874731a drm/msm: Add a parameter query for the number of ringbuffers
In order to manage ringbuffer priority to its fullest userspace
should know how many ringbuffers it has to work with. Add a
parameter to return the number of active rings.

Change-Id: Ic0dedbada6010dd5122e8409141fd23b414d73e4
Signed-off-by: Jordan Crouse <jcrouse@codeaurora.org>
2017-07-03 13:40:27 -06:00
Jordan Crouse
48db6e4716 drm/msm: Change the profiling structure
Remove the queued time from the profile struct and turn the submit time
into a proper timespec (tv_sec + tv_nsec).  This should sync up better
with what userspace is used to seeing.

Change-Id: Ic0dedbad0621fa248e6cffde2d1ee3f9b609e19d
Signed-off-by: Jordan Crouse <jcrouse@codeaurora.org>
2017-07-03 13:40:27 -06:00
Jordan Crouse
130cbfae08 drm/msm: Add kernel side submit profiling and tracing
Record the GPU always on timer value at the start and end of a
submission on the ringbuffer. Since the timer runs at a constant
19.2 Mhz this is a handy way of tracking how long each
submission takes.

The timer values are recorded in the memptrs. Each ringbuffer is
given a circular list of 128 entries to store the event ticks;
this should be enough to avoid running out of room even when the
ring is completely full of submissions.

Add trace events for the user to track when submissions are
queued, submitted to the ringbuffer and retired. The submitted
trace point shows the GPU ticks and the current kernel time at
submit time (as read by the CPU) and the retired trace event shows
the GPU ticks at submission start/end as read by the GPU. Taken
together these two events can provide a pretty close match between
the current GPU time and the kernel time which is handy for tracing
tools that try to match up the various kernel events with one
another.

Change-Id: Ic0dedbadbcf89f032890820785b9fb49a6362b01
Signed-off-by: Jordan Crouse <jcrouse@codeaurora.org>
2017-07-03 13:40:26 -06:00
Dan Carpenter
af56eff042 regulator: core: remove some dead code
Originally queue_delayed_work() used to negative error codes or 0 and 1
on success depending if the work was queued or not.  It caused a lot of
bugs where people treated all non-zero returns as failures so we changed
it to return bool instead in d4283e9378 ('workqueue: make queueing
functions return bool').  Now it never returns failure.

Checking for negative values causes a static checker warning since it is
impossible based on the bool type.

Change-Id: I49c875e09534795a8d5176773eb497f5404fcbe3
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2017-07-03 22:46:21 +05:30
Ashish Garg
738ad6d0cf msm: mdss: information leak during buffer copy from userspace
While trying to write dsi commands from userspace, the user buffer
is copied using simple_write_to_buffer. If the number of bytes in
the user buffer is less than the destination buffer, the length was
set to the destination buffer length. Subsequently the buffer could
be read from userspace to dump a lot of uninitialized kernel heap
data. Update the destination buffer with the correct size of bytes
copied from the user buffer.

Change-Id: Ib28f3698655d25ad8103fc02199a1d214092e232
Signed-off-by: Ashish Garg <ashigarg@codeaurora.org>
2017-07-03 22:28:38 +05:30
Linux Build Service Account
a25d728775 Merge "ARM: dts: msm: Add l2pc-cpu-mask to avoid L2PC on masked CPUs for msm8998" 2017-07-03 07:58:21 -07:00
Linux Build Service Account
bb52d80acc Merge "mmc: core: Remove unused variable" 2017-07-03 07:58:03 -07:00
Linux Build Service Account
2357b8b580 Merge "power: qcom: smb-lib: handle dynamic Rp change" 2017-07-03 07:58:02 -07:00
Linux Build Service Account
e3b04f4163 Merge "ARM: dts: msm: Add remote debugger device configuration for sdm660" 2017-07-03 07:58:01 -07:00
Linux Build Service Account
fe57f5f904 Merge "osq_lock: fix osq_lock queue corruption" 2017-07-03 07:58:00 -07:00
Linux Build Service Account
1b28f2e8fb Merge "msm: sde: Cache capture fence descriptor" 2017-07-03 07:57:59 -07:00
Linux Build Service Account
31b7a46caa Merge "msm: mdss: unmap buffers before starting Secure Display session" 2017-07-03 07:57:59 -07:00
Linux Build Service Account
99033c40bb Merge "msm: sde: fix unaligned access problem" 2017-07-03 07:57:58 -07:00
Linux Build Service Account
81d10d5081 Merge "fbdev: msm: Add check for ioctl calls" 2017-07-03 07:57:57 -07:00
Linux Build Service Account
74b5a0f867 Merge "Merge branch 'android-4.4@77ddb50' (v4.4.74) into 'msm-4.4'" 2017-07-03 07:57:56 -07:00
Linux Build Service Account
5fde2fc9b6 Merge "ARM: dts: msm: Disable IPA in APQ 8098" 2017-07-03 07:57:55 -07:00
Linux Build Service Account
30ae1652c5 Merge "ipv4: Drop packets if checksum is invalidated" 2017-07-03 07:57:55 -07:00
Linux Build Service Account
6944c59d4b Merge "usb: bam: Remove inactivity_timer sysfs attribute" 2017-07-03 07:57:54 -07:00
Linux Build Service Account
56b42b0237 Merge "msm: actuator: Add protection condition for move focus" 2017-07-03 07:57:53 -07:00
Linux Build Service Account
1eb22ad1f5 Merge "USB: f_audio_source: Remove pm_qos request under non atomic context" 2017-07-03 07:57:52 -07:00
Linux Build Service Account
2d1616b97e Merge "msm: camera: isp: Avoid reading stale ping pong status" 2017-07-03 07:57:52 -07:00
Linux Build Service Account
09bf411c31 Merge "osq_lock: avoid live-lock issue for RT task" 2017-07-03 07:57:51 -07:00
Linux Build Service Account
e82415666d Merge "cpu-hotplug: Keep atleast 1 online and un-isolated CPU" 2017-07-03 07:57:50 -07:00
Linux Build Service Account
37541eb4b8 Merge "spi: spi_qsd: serve set_cs call only for valid device status" 2017-07-03 07:57:49 -07:00
Linux Build Service Account
ae189fd38c Merge "ath10k: Populate ACS survey results" 2017-07-03 07:57:48 -07:00
Linux Build Service Account
d219ff30f8 Merge "cgroup: Fix potential race between cgroup_exit and migrate path" 2017-07-03 07:57:48 -07:00
Naresh Malladi
346f6aa700 cpuidle: lpm-levels: Check for negative sleep times
A negative sleep time could be interpreted as a large positive sleep
time when its casted to a unsigned type. This could result in CPU sleeping
for a longer than expected duration resulting in missed interrupts.

Change-Id: I472f355c8ba392ab46d53fceddb448f7e35c178e
Signed-off-by: Mahesh Sivasubramanian <msivasub@codeaurora.org>
Signed-off-by: Maulik Shah <mkshah@codeaurora.org>
Signed-off-by: Naresh Malladi <namall@codeaurora.org>
2017-07-03 17:39:35 +05:30
Tharun Kumar Merugu
f7a56df0ca msm: ADSPRPC: Initialize FastRPC invoke metadata
Initializing metadata buffer to zero before reusing the buffer
for next invoke.

Change-Id: Iaab3478732b83427a475e95afa0e031cb76f60d9
Acked-by: Viswanatham Paduchuri <vpaduchu@qti.qualcomm.com>
Signed-off-by: Tharun Kumar Merugu <mtharu@codeaurora.org>
2017-07-03 04:54:30 -07:00
Gaurav Sonwani
f4800c9668 ARM: dts: msm: Add l2pc-cpu-mask to avoid L2PC on masked CPUs for msm8998
This is required to add a PM QOS request to disallow L2PC on masked CPUS.
It improves queue to submit time for first set of GPU commands
which results in GPU wake up.

Change-Id: If7e0925ec76065158188671f1d11a0de5e9900aa
Signed-off-by: Gaurav Sonwani <gsonwani@codeaurora.org>
2017-07-03 02:26:39 -07:00
Vijay Viswanath
c77576994e mmc: core: Remove unused variable
Removed a local variable in mmc_start_req() which was used to store the
error encountered while starting a new data request. If an error is
encountered while starting a new request, the error
information is stored in the mrq. The error information stored in the
mrq is during error handling. So removing the unused variable.

Change-Id: Ifeedc91433230d5156d286bd332a85fb221188ac
Signed-off-by: Vijay Viswanath <vviswana@codeaurora.org>
2017-07-03 02:10:42 -07:00
Padmanabhan Komanduru
3071be2987 mdss: dp: avoid notifying DP connect during AUX timeout cases
In case the DPCD read transaction continuously times out, it is
likely that the sink is not responding or the DP cable/dongle is
faulty and hence no response is seen. In such cases, avoid
reporting the DP connect event to userspace.

Change-Id: Ie07de464f63dc3b18c875a061a18ad00e4c99e85
Signed-off-by: Padmanabhan Komanduru <pkomandu@codeaurora.org>
2017-07-03 12:57:33 +05:30
Wei Ding
0526198235 msm: camera: add protection in the cci write function
Add state check before execute CCI function.

Change-Id: I1c876e4eac70316bfe322b11f807e367c020e7d0
Signed-off-by: Wei Ding <weiding@codeaurora.org>
2017-07-03 14:38:32 +08:00
Nagaradhesh Yeleswarapu
87fc186a6b ARM: dts: msm: Add support for MPM wakeup capability for audio interrupt for SDM660/630
Audio codec interrupt line is connected to pin61 of MPM. Map
interrupt 209 to MPM pin61 to wakeup APSS from TCXO mode.

CRs-Fixed: 2040808
Change-Id: I74cfc871b6e99c62dda30033e6dabb5fe5d19705
Signed-off-by: Nagaradhesh Yeleswarapu <nagaradh@qti.qualcomm.com>
2017-07-03 11:41:38 +05:30