Commit graph

592487 commits

Author SHA1 Message Date
Rahul Sharma
79db0d1523 msm: ais: Bound check for num_of_stream
- num of stream comes from userspace and used without
any bound check.It may result to overflow update_info.

Change-Id: I67341f3c3e1a3384474c35f6e6275d6e1917fdcd
CRs-Fixed: 2006829
Signed-off-by: Rahul Sharma <sharah@codeaurora.org>
2017-08-02 02:02:12 -07:00
Mohammed Javid
0cb4f8abcd msm: ipa: Fix invalid source pipe index
Source pipe index may returned invalid or
given invalid from IOCTl.

Check it for valid before sending it to Q6.

Change-Id: I9dbbc930014549ed2d0620af6872816a18b438b5
Signed-off-by: Mohammed Javid <mjavid@codeaurora.org>
2017-08-02 01:34:46 -07:00
Mohammed Javid
b977cc3ede msm: ipa: Fix wrong usage and cleanup code
Couple of code cleanup
 - Initialize the return variable before using it.
 - Remove unnecessary NULL check.

Change-Id: I8e63cb95ae99d1656143ae4b1d130f92890bb3c5
Signed-off-by: Mohammed Javid <mjavid@codeaurora.org>
2017-08-02 01:18:45 -07:00
Rahul Sharma
407c4c300b msm: ais: Make use of mutex lock to avoid race condition
Make use of mutex lock to access IOCTL so that two threads
can avoid race condition.

Change-Id: I3650affa0577b30531160e1d11c57d13baf34c2f
CRs-Fixed: 2060377
Signed-off-by: Rahul Sharma <sharah@codeaurora.org>
2017-08-02 16:10:06 +08:00
Mohammed Javid
90f7a0939c msm: ipa3: Fix Q6 resourse manager de-init
Make a change not to handle Q6 resource manager
deinit in SSR situation.

Change-Id: I5c3f68deb4514747146c5118fb58dad121ca7335
Signed-off-by: Mohammed Javid <mjavid@codeaurora.org>
2017-08-02 01:09:50 -07:00
Sriharsha Allenki
cd567a9d57 usb: f_qc_rndis: Fix rndis message parsing of erroneous requests
In the completion handler of rndis command requests we
are parsing the request buffers without checking the
status of the request. This might cause parsing of the
erroneous requests. Fix this by checking the status
of the request before parsing the request buffer.

Change-Id: I15ffd0bef4b42adf2300085dc3720d599e647cb5
Signed-off-by: Sriharsha Allenki <sallenki@codeaurora.org>
2017-08-02 11:52:50 +05:30
Abhinav Kumar
ae1a4ed18e drm/edid: add colorimetry block parsing support
Add support for parsing the colorimetry data block
of EDID to get information about the supported
encoding formats of the sink.

This information is needed to use the appropriate
color encoding scheme before transmitting the video
stream to the sink.

Change-Id: I133e8f21fa4ad843219dbefed2d072ad2edab197
Signed-off-by: Abhinav Kumar <abhinavk@codeaurora.org>
2017-08-01 23:02:44 -07:00
Abhinav Kumar
fc8b7422d9 drm/edid: add support for parsing quantization select field
Add support for parsing the RGB and YCC quantization
selectable field from the Video Capability Data block(VCDB)
of the EDID.

These fields help to decide whether the default quantization
range for a particular video format can be overridden by the
source.

Change-Id: Ibc72eb13302527089ad66231cd7e8bb34fb364f3
Signed-off-by: Abhinav Kumar <abhinavk@codeaurora.org>
2017-08-01 23:02:37 -07:00
Tharun Kumar Merugu
25ff5f0b64 msm: ADSPRPC: Queue receive intent for adsprpc glink channel
Queue receive intent for adsprpc glink channel to avoid remote
processor failure to acknowlege first message.

Change-Id: I314099acca71683a36661c0ff6c4a0430653d97e
Signed-off-by: Tharun Kumar Merugu <mtharu@codeaurora.org>
2017-08-01 22:59:02 -07:00
Hareesh Gundu
a5672255ed ion: Set the page private bit for secure CMA buffers
Set the private page bit on each sg of secure CMA buffers
to inform other entities, which import these buffers as an
fd, that this memory is secure.

Change-Id: I2f012443f99a90e20afd7e43b62b751c3eea4be3
Signed-off-by: Hareesh Gundu <hareeshg@codeaurora.org>
2017-08-02 11:16:10 +05:30
Sriharsha Allenki
77bc398888 usb: f_rndis: Fix rndis message parsing of erroneous requests
In the completion handler of the rndis command requests we
are parsing the request buffers without checking the
status of the request. This might cause parsing of the
erroneous requests. Fix this by checking the status
of the request before parsing the request buffer.

Change-Id: I476c6c82d367f6f5fc6eff25b049b3323b68b859
Signed-off-by: Sriharsha Allenki <sallenki@codeaurora.org>
2017-08-02 10:41:12 +05:30
Sriharsha Allenki
bce4a8a55c usb: f_gsi: Fix rndis message parsing of erroneous requests
In the completion handler of rndis command requests
we are parsing the request buffers without
checking the status of the request. This might
cause parsing of the erroneous requests.
Fix this by checking the status of the request before
parsing the request buffer.

Change-Id: I52001128ac421e58e1801eebc243a8c91618582c
Signed-off-by: Sriharsha Allenki <sallenki@codeaurora.org>
2017-08-02 10:33:06 +05:30
Linux Build Service Account
560d31410c Merge "ais: fix getting vfe regulators number bug" 2017-08-01 20:49:12 -07:00
Linux Build Service Account
d945ea33d3 Merge "net: rmnet_data: validate csum in SW" 2017-08-01 20:49:11 -07:00
Linux Build Service Account
acacfdf4a9 Merge "msm: kgsl: Do not memset pages to zero while adding to pool" 2017-08-01 20:49:10 -07:00
Linux Build Service Account
734e0fe2d9 Merge "msm: pcie: add support for switch latency" 2017-08-01 20:49:09 -07:00
Guchun Chen
56f9b76a53 msm: sde: move early splash's node parsing code for msm8996 auto
This change is to move specific node parsing code to other place
for early splash feature on auto platform, not impacting kernel
booting process of other platforms.

Change-Id: I6deed1a75545c82ee777d9b4269f1420ab2eb07a
Signed-off-by: Guchun Chen <guchunc@codeaurora.org>
2017-08-02 09:44:40 +08:00
Linux Build Service Account
e29d253ecf Merge "msm: mdss: dsi: Remove redundant opmode configuration" 2017-08-01 13:41:03 -07:00
Animesh Kishore
f1b8a000d1 msm: mdss: Add VIG double buffered CSC capability
CSC block in VIG pipe is double buffered starting
SDM 3.x.x.

Change-Id: I720449ae8a4efdcd088696e4fe354948f8a6d031
Signed-off-by: Animesh Kishore <animeshk@codeaurora.org>
2017-08-02 01:54:47 +05:30
Animesh Kishore
9b91b842c9 msm: mdss: Allow CSC reconfiguration for staged pipe
CSC registers are double buffered from msm8998 onwards. Hence
allow reconfiguration of CSC for staged pipe.

Change-Id: I8108d0a70b54c07d71c165b6b5f596726b027425
Signed-off-by: Animesh Kishore <animeshk@codeaurora.org>
2017-08-02 01:52:47 +05:30
San Mehat
4bc0ffd0fd mmc: card: blk: Add support for deferred SD bus resume
Set bus resume polocy for eMMC & SD drivers.

Change-Id: If2e76877fb229a4aba38249c4a1bb2ff8d28ba32
Signed-off-by: San Mehat <san@google.com>
Git-commit: 2c84417a1305da892c8a7d0bf8d0bad50d1688b8
Git-repo: git://git-android.quicinc.com/kernel/msm-3.10
[vbadigan@codeaurora.org: Dropped changes which are already
present in mmc driver as part of other propagations]
Signed-off-by: Veerabhadrarao Badiganti <vbadigan@codeaurora.org>
2017-08-01 04:54:03 -07:00
Ashwanth Goli
088a4e5beb net: rmnet_data: validate csum in SW
Do SW checksum validation if rmnet_data checksum
validation fails.

Change-Id: Ifff229dc1e7eb592d58fc66ea278debb292b89aa
Signed-off-by: Ashwanth Goli <ashwanth@codeaurora.org>
Signed-off-by: Tejaswi Tanikella <tejaswit@codeaurora.org>
2017-08-01 04:53:58 -07:00
Jin Fu
8d461b306c input: touchpanel: fix wastes of time when resume and probe for ST's TP
Remove a useless system reset, reduce the fts_status_event_handler's
print level and modify a error at parsing reset pin to fix the long
time resume problem. Besides, remove the needless auto-apdate-FW func
when probe to speed up TP's probe process.

Change-Id: I1c68fa7add65106d7efcf87b9002363a9242b2f7
Signed-off-by: Jin Fu <jinf@codeaurora.org>
2017-08-01 03:54:35 -07:00
Rama Krishna Phani A
12fe1aaf01 msm: pcie: add support for switch latency
Add support for switch latency property to add
additional delay if switch is present.

Change-Id: Ia64a79d5ec51d3abb66cebd0a187349711c96af2
Signed-off-by: Rama Krishna Phani A <rphani@codeaurora.org>
2017-08-01 03:10:13 -07:00
Rama Krishna Phani A
6a36ebb69e Revert "msm: pcie: Fix for MDM enumeration issue"
This reverts commit 0e4399bcb0.
Delay is needed only in case of PCIe switch and not required
for normal case.

Change-Id: Ifa6317f7be1159b2ebc55f64fabcc47d450dc260
Signed-off-by: Rama Krishna Phani A <rphani@codeaurora.org>
2017-08-01 03:09:52 -07:00
Vishnuvardhan Prodduturi
1eb04f10c6 ARM: dts: msm: Add physical width and height for sharp 4k panel
Add physical width and height parameters for Sharp 4K panel to
help in setting the right DPI for UI.

Change-Id: If8d841037bb216bfb0b7b0aa0fc4a1db5a45500b
Signed-off-by: Vishnuvardhan Prodduturi <vproddut@codeaurora.org>
2017-08-01 02:32:34 -07:00
Linux Build Service Account
c1b3ec77ab Merge "ASoC: msm: qdsp6v2: Open unique COPP port for concurrent ULL streams" 2017-07-31 23:44:04 -07:00
Linux Build Service Account
d977773d9a Merge "usb: dwc3: dwc3-msm: Handle floating charger PMI notification properly" 2017-07-31 23:44:04 -07:00
Linux Build Service Account
a59b89b170 Merge "cnss2: Add debugfs support to simulate device and firmware boot" 2017-07-31 23:44:02 -07:00
Linux Build Service Account
6da9e55e26 Merge "ARM: dts: msm: Support Primary TDM Interface for msm8996" 2017-07-31 23:44:01 -07:00
Linux Build Service Account
81d54ebe21 Merge "cnss2: Remove PCI ioremap wrapper function" 2017-07-31 23:44:00 -07:00
Linux Build Service Account
d5c822f343 Merge "cpufreq: interactive: fix to come out of hysteresis mode" 2017-07-31 23:44:00 -07:00
Linux Build Service Account
e944accf8c Merge "msm: kgsl: Fix leak when preemption init fails" 2017-07-31 23:43:59 -07:00
Linux Build Service Account
97c6cfb336 Merge "input: misc: hbtp_input: fix memory corruption in list_del_entry" 2017-07-31 23:43:58 -07:00
Linux Build Service Account
6be8573eca Merge "msm: mdss: recalc pclk for Y420 format" 2017-07-31 23:43:57 -07:00
Linux Build Service Account
2a27c1aaf7 Merge "serial: msm_serial_hs: Modify wakeup handler disablement and processing" 2017-07-31 23:43:56 -07:00
Gaurav Sonwani
f135a770a6 msm: kgsl: Disallow L2PC during wake up from SLUMBER
Add a PM QOS request to disallow L2PC during wake up
from SLUMBER state. This is required to improve queue
to submit time for first set of GPU commands which results
in GPU wake up.

Change-Id: Iad1a6dfdf9e1fe034eef4fae526138d724bdd3eb
Signed-off-by: Gaurav Sonwani <gsonwani@codeaurora.org>
2017-07-31 21:41:29 -07:00
Andy Sun
a865a851bd ais: fix getting vfe regulators number bug
The original method of getting array member size is wrong.
Considerating vfe_dev->hw_info is set during runtime, so set the number
statically.

Change-Id: I90a2fb19948409b22ed219ba8ec8bc4deb4f0a46
Signed-off-by: Andy Sun <bins@codeaurora.org>
2017-08-01 11:15:01 +08:00
Nicholas Troast
175907d3d2 power: fg-util: add median filter for circular buffer
A median filter is useful for filtering out outliers. Add it.

Change-Id: I21f97a870c262e5fb3d33b8250a2bf074f519b58
Signed-off-by: Nicholas Troast <ntroast@codeaurora.org>
Signed-off-by: Abhijeet Dharmapurikar <adharmap@codeaurora.org>
2017-07-31 19:28:02 -07:00
Abhijeet Dharmapurikar
3c21390e3c power: qpnp-fg-gen3: use the CC_STEP and CC_STEP_SEL properties
Add support for the CC_STEP and CC_STEP_SEL properties in the BMS power
supply. These properties will be used to communicate the future charge
currents for time to full calculations.

Change-Id: I44087b42b31800d1885bdaf1f38815c8756bc9a8
Signed-off-by: Nicholas Troast <ntroast@codeaurora.org>
Signed-off-by: Abhijeet Dharmapurikar <adharmap@codeaurora.org>
2017-07-31 19:28:02 -07:00
Nicholas Troast
eb8700f685 power_supply: add CC_STEP and CC_STEP_SEL properties
There are several algorithms which modify the charge current in steps
across the charge cycle. CC_STEP is used to notify of all the upcoming
charge currents.

The CC_STEP_SEL property is used to select the index of the CC_STEP to
read or modify using the CC_STEP property.

Change-Id: Ieeb533b758035c1c408cdfd68f001374bf0987a5
Signed-off-by: Nicholas Troast <ntroast@codeaurora.org>
Signed-off-by: Abhijeet Dharmapurikar <adharmap@codeaurora.org>
2017-07-31 19:28:01 -07:00
Abhijeet Dharmapurikar
3fcbb078c8 qpnp-smb2: Ignore status 7 register while qnovo is enabled
status7 register will indicate all the charger bits are cleared during
the rest or discharge phase of a Qnovo pulse. Moreover those bits remain
cleared after a pulse train is done and before a new pulse train is
issued.

Hence when Qnovo is active ignore status 7 register bits.

Change-Id: Ice61f8a49625081ffbf1aacaac844b929715e818
Signed-off-by: Abhijeet Dharmapurikar <adharmap@codeaurora.org>
2017-07-31 19:28:01 -07:00
Harry Yang
2aced65bf8 qcom: qnovo: restart pulse train in stall state
There are a couple of cases where qnovo charging fails,

1. pulse train enable command register fails to write through, or
2. pulse engine fails to start and pulse train timer PTTIME does
   not start counting.

In either case, qnovo charging will stop. Here is the fix,

Write register twice when enabling pulse train, and
restart pulse train if PTTIME does not increase.

Change-Id: Ic235f8f2bc67fe577e42848ef623870c25b68256
Signed-off-by: Harry Yang <harryy@codeaurora.org>
Signed-off-by: Abhijeet Dharmapurikar <adharmap@codeaurora.org>
2017-07-31 19:28:00 -07:00
Abhijeet Dharmapurikar
cbff20cc9a qpnp-qnovo: add debounce for charger
The request is to delay ok_to_qnovo for 15 seconds after a charger is
inserted.

To achive that:
Make ok_to_qnovo variable as a votable that can be voted on by
A. HW error conditions
B. Charger is ready  after debounce

Moreover since there could be two chargers -usb and dc, create another
votable to track their individual debounce states. The result of this
votable will feed in to ok_to_qnovo votable as branch B above.

Also since we need to stay awake for the debounce time, create an
awake_votable and vote on it while debounce on either usb or dc is in
progress.

Change-Id: I32dc07ba16ef0515a9683f2702d317c39baa2eba
Signed-off-by: Abhijeet Dharmapurikar <adharmap@codeaurora.org>
2017-07-31 19:28:00 -07:00
Abhijeet Dharmapurikar
354e7f16bd qpnp-qnovo: prevent pulse train while esr is in progress
At the end of pulse train ESR measurement is forced. It is expected
that when ESR is being measured, which takes about 1.5 seconds, the
next pulse train does not start.

However we see that a uevent is sent to userspace and it enables pulse
train within 100mS.

To prevent that put the pulse train enabling bit under a votable
control. And make QNI_VOTER (the userspace voter) and ESR_VOTER vote
on it.

Moreover, the current pulse train enabling path checks if qnovo was
enabled, make a QNOVO_OVERALL_ENABLE voter to this new voter to reflect
it.

Change-Id: I6d2177250cc47f5aeb6591c532ee18d37e3b02c6
Signed-off-by: Abhijeet Dharmapurikar <adharmap@codeaurora.org>
2017-07-31 19:27:56 -07:00
Abhijeet Dharmapurikar
18cb81a94f qpnp-fg-gen3: qnovo ESR/IADC workarounds
When FG IADC measurement period coincides with qnovo discharge pulses
it reads incorrect IADC values. That causes issues with SOC accuracy
and capacity learning amongst others.

The fix to IADC inaccuracy is to set a bit in the FG
peripheral while Qnovo is active.

A side effect of IADC inaccuracy fix is that the ESR
measurement goes haywire. To overcome that, disable ESR when
Qnovo is active and force an esr measurement when its between pulses.

Realize this by disabling ESR and enabling the bit when
Qnovo becomes active. The qnovo driver will set CHARGE_QNOVO_ENABLE
property on the bms psy when its active. Also provide code to
force an ESR measurement via a write to RESISTANCE property in
bms psy.

Change-Id: I7160ad6288362c17d28d67b38ec09332d9a6cbd2
Signed-off-by: Abhijeet Dharmapurikar <adharmap@codeaurora.org>
2017-07-31 19:26:29 -07:00
Abhijeet Dharmapurikar
7b5b0b5914 qpnp-qnovo: IADC/ESR workarounds
When FG IADC measurement period coincides with qnovo discharge pulses
it reads incorrect IADC values. That causes issues with SOC accuracy
and capacity learning amongst others.

The fix to IADC inaccuracy is to set a bit in the FG peripheral while
Qnovo is active.

A side effect of IADC inaccuracy fix is that the ESR measurement goes
haywire. To overcome that, disable ESR when Qnovo is active and force
an esr measurement when its between pulses.

Realize this by setting CHARGE_QNOVO_ENABLE and RESISTANCE property on
the bms psy at appropriate times in the driver.

Change-Id: I5b37083c843ec6bc052c4d344347b9a80554e226
Signed-off-by: Abhijeet Dharmapurikar <adharmap@codeaurora.org>
2017-07-31 19:23:19 -07:00
Haynes Mathew George
aa5d0fc240 ASoC: msm: qdsp6v2: Open unique COPP port for concurrent ULL streams
Routing driver reuses the same adm for streams with the same
app_type, sample_rate etc. This isn't allowed for ULL streams
as per the DSP interface. We need to open a separate COPP
port for concurrent ULL streams

CRs-Fixed: 2083105
Change-Id: I569b32830145d6dae99449d0bc4148b2f60b101d
Signed-off-by: Haynes Mathew George <hgeorge@codeaurora.org>
Acked-by: Shiv Maliyappanahalli <smaliyap@codeaurora.org>
2017-07-31 18:31:56 -07:00
Yue Ma
be9b12a5a0 cnss2: Add debugfs support to simulate device and firmware boot
Add debugfs interface to simulate device and firmware boot step
by step. This can provide the flexibility to debug both host and
device issues in boot path. The debugfs node will only be added
in debug builds.

Change-Id: I4cf03efad5e5a792095f509864fddd54dc6e2e7c
CRs-fixed: 2059087
Signed-off-by: Yue Ma <yuem@codeaurora.org>
2017-07-31 17:34:25 -07:00
Linux Build Service Account
86db25491e Merge "soc: qcom: Fix error propagation in scm_qcpe driver" 2017-07-31 16:19:17 -07:00