Commit graph

578172 commits

Author SHA1 Message Date
Linux Build Service Account
b4f023e5a2 Merge "usb: pd: Fix VDM and misc timing issues" 2016-11-26 14:26:44 -08:00
Linux Build Service Account
b23cd82dba Merge "soc: qcom: msm_bus: Set current index to default value" 2016-11-25 17:47:07 -08:00
Linux Build Service Account
0ff0bddebd Merge "ARM: dts: msm: Add thermal mitigation properties to msmfalcon" 2016-11-25 17:47:06 -08:00
Linux Build Service Account
74d0e8e4ca Merge "input: synaptics_dsx: add checks of user input data" 2016-11-25 17:47:04 -08:00
Linux Build Service Account
fdc9a3b7d5 Merge "ASoC: wcd9335: Add dapm ignore suspend for codec dai" 2016-11-25 17:47:03 -08:00
Linux Build Service Account
ef8f297dee Merge "ASoc: msm: qdsp6v2: Add support for compress capture" 2016-11-25 17:47:02 -08:00
Linux Build Service Account
308d5348fe Merge "include: clock: Add audio external clock of_index extries" 2016-11-25 17:47:01 -08:00
Linux Build Service Account
6392d4ee36 Merge "msm: mdss: fix to handle multi-rect configuration in error cases" 2016-11-25 17:46:59 -08:00
Linux Build Service Account
4df93480e8 Merge "msm: crypto: fix issues on digest buf and copy_from_user in qcedev.c" 2016-11-25 17:46:58 -08:00
Linux Build Service Account
2eeb169184 Merge "Revert "msm: kgsl: Enable limits management on A540v2"" 2016-11-25 17:46:57 -08:00
Linux Build Service Account
2d8b206407 Merge "smb-lib: fix null ptr access while handling src change interrupt" 2016-11-25 17:46:56 -08:00
Linux Build Service Account
c7690d6901 Merge "msm: mdss: refine the calculation of tmds clock rate" 2016-11-25 17:46:54 -08:00
Linux Build Service Account
86dffc4e82 Merge "msm: camera: Enable secure camera feature" 2016-11-25 17:46:53 -08:00
Linux Build Service Account
0ed6e29b91 Merge "soc: qcom: socinfo: Change offset of image OEM attribute" 2016-11-25 17:46:52 -08:00
Linux Build Service Account
1095ce72f4 Merge "qpnp-smb2: force UFP mode before shutdown" 2016-11-25 17:46:51 -08:00
Linux Build Service Account
24f3e90971 Merge "qpnp-smb2: add support to configure auto recharge" 2016-11-25 17:46:50 -08:00
Linux Build Service Account
2488b7eb05 Merge "qcom: scm: remove printing input arguments" 2016-11-25 08:32:36 -08:00
Linux Build Service Account
22f8318fcc Merge "audit: fix a double fetch in audit_log_single_execve_arg()" 2016-11-25 08:32:35 -08:00
Swetha Chikkaboraiah
394c5c6ca0 qcom: scm: remove printing input arguments
scm_call2 is printing the input arguments if TZ ret value is  < 0
leading to information leak. Remove printing input arguments.

Change-Id: I21dd6d83fa979aed2c79ebb2c9c8de63a247dded
CRs-Fixed: 1076407
Signed-off-by: Swetha Chikkaboraiah <schikk@codeaurora.org>
Signed-off-by: Paresh Purabhiya <ppurab@codeaurora.org>
Signed-off-by: Runmin Wang <runminw@codeaurora.org>
2016-11-25 04:10:25 -08:00
Linux Build Service Account
9a20006c20 Merge "soc: qcom: fix uninitialized references in gladiator_erp_v2" 2016-11-25 00:10:26 -08:00
Linux Build Service Account
c03c511346 Merge "ARM: dts: msm: Add support of IPA for falcon" 2016-11-25 00:10:25 -08:00
Linux Build Service Account
bee274711e Merge "clk: qcom: Add snapshot of OSM CPU clock driver" 2016-11-24 13:46:42 -08:00
Linux Build Service Account
00bfc5fe15 Merge "ARM: dts: msm: Add RTB support for msmtriton" 2016-11-24 13:46:38 -08:00
Linux Build Service Account
97679b802a Merge "ARM: dts: msm: Add mpm2-sleep-counter device for msmtriton" 2016-11-24 13:46:37 -08:00
Linux Build Service Account
2488cd08b4 Merge "arm: qcom: correct description for MSMTRITON and MSMFALCON" 2016-11-24 13:46:36 -08:00
Linux Build Service Account
a9a8ec4cae Merge "msm: vidc: parse 10-bit bus entries for msmfalcon" 2016-11-24 06:13:39 -08:00
Linux Build Service Account
baccd73792 Merge "ARM: dts: msm: Add venus device nodes for starlord" 2016-11-24 06:13:38 -08:00
Linux Build Service Account
c17ad2a8a7 Merge "msm: vidc: Update mbs per second calculation" 2016-11-24 06:13:36 -08:00
Linux Build Service Account
4edc6e2899 Merge "msm: vidc: fix mutex lock issue" 2016-11-24 06:13:35 -08:00
Linux Build Service Account
8c41e4e6b1 Merge "msm: vidc: fix the interrupt miss issue from video hardware" 2016-11-24 06:13:34 -08:00
Linux Build Service Account
383d1c1542 Merge "msm: kgsl: Add support for A512 GPU" 2016-11-24 06:13:33 -08:00
Linux Build Service Account
8a70f4e5d7 Merge "ASoC: msm: Update supported sample rates for USB Backend" 2016-11-24 06:13:32 -08:00
Linux Build Service Account
d2f94a9a44 Merge "netfilter: nfnetlink: correctly validate length of batch messages" 2016-11-24 06:13:31 -08:00
Linux Build Service Account
e49d49a3ec Merge "USB: gagget: f_fs: Return error if TX req is queued during device offline" 2016-11-24 06:13:30 -08:00
Linux Build Service Account
e9ccaa5b66 Merge "clk: qcom: Add support for rf clk1 for msmfalcon" 2016-11-24 06:13:29 -08:00
Linux Build Service Account
11c49a900c Merge "ARM: dts: msm: Update clock gfx node for MSMfalcon/Triton" 2016-11-24 06:13:27 -08:00
Linux Build Service Account
57f5019a62 Merge "clk: qcom: Add support for MMCC clock for MSMFalcon" 2016-11-24 06:13:26 -08:00
Linux Build Service Account
0e7a3bb0e4 Merge "cgroup: prefer %pK to %p" 2016-11-24 06:13:25 -08:00
Linux Build Service Account
a2f553518d Merge "HID: core: prevent out-of-bound readings" 2016-11-24 06:13:24 -08:00
Linux Build Service Account
f3e00aadcd Merge "[media] xc2028: avoid use after free" 2016-11-24 06:13:22 -08:00
Linux Build Service Account
065421c6fa Merge "tcp: fix use after free in tcp_xmit_retransmit_queue()" 2016-11-24 06:13:22 -08:00
Linux Build Service Account
091685a6a4 Merge "block: fix use-after-free in sys_ioprio_get()" 2016-11-24 06:13:20 -08:00
Linux Build Service Account
aff86d3b4f Merge "cfg80211: validate beacon int as part of iface combinations" 2016-11-24 06:13:18 -08:00
Linux Build Service Account
2fb4ab87aa Merge "cfg80211: fix beacon interval in interface combination iteration" 2016-11-24 06:13:18 -08:00
Linux Build Service Account
7193fef2dc Merge "cfg80211: identically validate beacon interval for AP/MESH/IBSS" 2016-11-24 06:13:17 -08:00
Linux Build Service Account
c82d43b7d9 Merge "msm: sde: Correct max downscale factor for SDE rotator" 2016-11-24 06:13:16 -08:00
Jack Pham
dd1a207e6e usb: pd: Fix VDM and misc timing issues
Decrease the wait time from 5ms to 2ms when preparing a VDM
response to ensure that it gets sent out timely within
tSenderResponse (15ms). To avoid possible collision with an
incoming packet, check that there has not been any queued Rx
message just prior to sending a VDM. Also check the result of the
transmit and simply try again later if -EBUSY is returned.

While at it, fix a couple other miscellaneous timing issues.
Setting PD_ACTIVE=1 has considerable delay due to the charger's
voting mechanism, so move setting it to after starting the
SenderResponse timer when sending the Source Capabilities, and
similarly after sending a Request as a sink, in order to make
sure response timing is met. For source hard reset, increase the
tSrcRecover delay slightly from the spec minimum to account for
additional VBUS rise/fall delays before sending PS_RDY. Finally,
add a delay for VCONN_SWAP before sending PS_RDY for similar reason.

Change-Id: I5760fadb66cad6faf02e95a1e1bb975289ef8e9f
Signed-off-by: Jack Pham <jackp@codeaurora.org>
2016-11-23 15:03:14 -08:00
Jack Pham
d854b01d55 usb: pd: Avoid spurious state machine work on CC change
If an unexpected or delayed Type-C mode change notification
arrives from the charger driver, it could falsely kick the
state machine and could cause it to prematurely hard reset
since it preempted an expected message. This is particularly
true for the PR Swap operation in which the timing of PS_RDY
and resulting power negotiation is disrupted by the CC change
notification which is catching up. The previous way of handling
this by using the pd->in_pr_swap flag to mask the typec_mode
changes is quite fragile due to the uncertainty of when said
flag should be cleared.

Hence, demote the use of the in_pr_swap flag for only ignoring
the expected disconnect the happens in between the role change.
Then, for typec_mode changes, determine if current_pr is changed
or not to decide whether to kick the state machine. Finally,
since disconnect now is signaled by pd->current_pr==PR_NONE,
we'll need to keep track of whether VBUS had been enabled with
a separate flag rather than relying on pd->current_pr==PR_SRC.

Change-Id: I66be40091b75726d25c7be4478f1248a6af9ca3c
Signed-off-by: Jack Pham <jackp@codeaurora.org>
2016-11-23 15:03:14 -08:00
Jack Pham
019cc2089b usb: pd: Reset msgid counters properly
Make sure to reset both Tx and Rx msgid counters when the
protocol layer needs to be reset. This occurs after hard/soft
reset as well as when starting up a new sink or source session.
Put this in a common function pd_reset_protocol().

Change-Id: I643a60a28e6498ca16b6f46293b8aa05eff40266
Signed-off-by: Jack Pham <jackp@codeaurora.org>
2016-11-23 15:03:14 -08:00
Jack Pham
8f5b031e11 usb: pd: Fix sink hard reset timing
The current hard reset handling (most recently fixed with
commit 172cec3a2c ("usb: pd: Improve sink hard reset handling"))
is based on a maximum timeout for the longest possible (according
to spec) duration that VBUS may turn off and back on again, just
under 2s, before re-starting the sink and waiting for capabilities
again. However, this method is prone to timing errors, particularly
tTypeCSinkWaitCap, which should be based on when VBUS turns on.

Fix this by making use of the VBUS presence notification from the
charger (PROP_PRESENT). Keep track of this in the psy_changed()
callback and use the falling notification to determine when to
transition out of PE_SNK_TRANSITION_TO_DEFAULT into PE_SNK_STARTUP.
Bring back PE_SNK_DISCOVERY which is now used as a waiting state
until the VBUS rising notification comes and transition to
PE_SNK_WAIT_FOR_CAPABILITIES. And move setting of PROP_VOLTAGE_MAX
to PE_SNK_STARTUP after VBUS has turned off to avoid tripping
the charger's overvoltage detection.

Also since aforementioned commit, the CC HW is now able to handle
VBUS going away and not treating it as a false disconnect, so we
can remove the workaround as a disconnect can now be treated as
a disconnect.

Change-Id: I885f3f4c219e102758fd09c8aae9257d093ebb72
Signed-off-by: Jack Pham <jackp@codeaurora.org>
2016-11-23 15:03:14 -08:00