Commit graph

595161 commits

Author SHA1 Message Date
jiad
77dc587592 mhi: core: fix sequence for new transfer
sequence for both rddm and fw download are initialized to be 0.
They are incremented by 1 in bhi_probe() and upon real transfer
takes place.

Issue is in SSR case, sequence is incrementing in a way like 1,
3, 5 and etc as observed. The increment in bhi_probe() seems
unnecessay as there's no real transfer.

Fix is to initialize sequence to 1 and increment by 1 when real
transfer takes place in bhi_bhie_transfer().

Change-Id: I210840cd1f7fecc300ecb69da8a50fbb1d200562
Signed-off-by: Jia Ding <jiad@codeaurora.org>
CRs-Fixed: 2147433
2017-11-22 10:16:06 +08:00
Lloyd Atkinson
253b2380e4 drm/msm: protect register dumps and debugfs with mutex
Add a mutex to serialize sde debug register dumps for
back-to-back dumps, as well as any debugfs access.

Change-Id: I7f6186575df021ce48e18ea980f9c2108b756283
Signed-off-by: Lloyd Atkinson <latkinso@codeaurora.org>
2017-11-21 20:10:50 -05:00
Alan Kwong
e3f7d2ac8a msm: sde: disable support for v4l2 event subscription
V4l2 event subscription is not used by rotator, and
default implementation on 4.9 is causing failure during
file release. Disable v4l2 event subscription for rotator
to avoid invalid file release.

Change-Id: I486f2eba7112852a1c818efeeb86033f17139b33
Signed-off-by: Alan Kwong <akwong@codeaurora.org>
2017-11-21 10:31:34 -08:00
Linux Build Service Account
f697ab3e51 Merge "msm: ba: avoid system crash in msm_ba_open()" 2017-11-21 06:44:58 -08:00
Linux Build Service Account
f79329e286 Merge "Revert "ais: query field info and pass to user space"" 2017-11-21 06:44:56 -08:00
Linux Build Service Account
c4f4e49994 Merge "Prevent potential double frees in sg driver" 2017-11-21 06:44:55 -08:00
Linux Build Service Account
e4401d0ea1 Merge "audio: ion: switch to msm ion on gvm." 2017-11-21 06:44:54 -08:00
Linux Build Service Account
a0f8e2a9d6 Merge "msm: camera: Add support to reconfig regupdate fail buffer" 2017-11-21 06:44:53 -08:00
Scott Branden
a1185dc1d2 arm64: memory-hotplug: Add MEMORY_HOTPLUG, MEMORY_HOTREMOVE, MEMORY_PROBE
Add memory-hotplug support for ARM64 platform.

This requires addition of
ARCH_ENABLE_MEMORY_HOTPLUG and ARCH_ENABLE_MEMORY_HOTREMOVE config options.

MEMORY_PROBE config option is added to support
/sys/devices/system/memory/probe functionality.

In addition architecture specific arch_add_memory and
arch_remove memory management functions are added.

Change-Id: I1fc4e8c93cfe1b9722b2fc8d811390e6cdfa7995
Signed-off-by: Scott Branden <scott.branden@broadcom.com>
Patch-mainline: linux-kernel @ 11 Apr 2017, 18:24
Signed-off-by: Srivatsa Vaddagiri <vatsa@codeaurora.org>
2017-11-21 18:55:04 +05:30
Yimin Peng
92bb5453ca defconfig: msm: add PM config for virtual platform
enable PM config to support gvm suspend and resume.

Change-Id: I5f71add6d2c5ac0fb1fc7ea98d13dc256f6e4d5a
Signed-off-by: Yimin Peng <yiminp@codeaurora.org>
2017-11-21 15:25:14 +08:00
Abhinav Kumar
95c0e89b37 drm/msm: implement HDMI teardown sequence for DRM driver
Currently the teardown sequence in the DRM HDMI driver is
incorrect and it places the HDMI controller in an incorrect
state during cable unplug OR device teardown.
Fix the teardown sequence and follow the hardware programming
sequence correctly to avoid artifacts.

Change-Id: Ifb9ec303fa710409087a74c03435c83823d02763
Signed-off-by: Abhinav Kumar <abhinavk@codeaurora.org>
2017-11-20 22:04:55 -08:00
Abhinav Kumar
172ea1ed54 drm/msm: disable HDCP before turning off timing engine
As per the hardware programming sequence, HDCP authentication
process must start after turning ON the timing engine and the
authentication process should be stopped before turning OFF
the timing engine.

Implement this sequence during the HDMI turn OFF sequence.

Also, make sure to wait for one frame before disabling the DDC
while turning OFF the HDCP. This is required to make sure we
receive the HDCP encryption disabled interrupt before disabling
the HW.

Change-Id: I3174f51fe1b6ab578db2d38caaf761444e6ebd8f
Signed-off-by: Abhinav Kumar <abhinavk@codeaurora.org>
2017-11-20 21:59:52 -08:00
Sayali Lokhande
db50a405c2 scsi: ufs: Fix off-by-one bug in ufs debugfs driver
When getting string from userspace by simple_write_to_buffer
in ufs_qcom_dbg_testbus_cfg_write() function, null byte may
be written out of bounds of configuration buffer if return
value is same as size of buffer, causing off-by-one bug.
This change passes correct available size of configuration
buffer to simple_write_to_buffer function.

Change-Id: If6085e806aa34622a9a57b02f563869c51011d2f
Signed-off-by: Sayali Lokhande <sayalil@codeaurora.org>
2017-11-21 08:34:42 +05:30
Andy Sun
c884da03cc Revert "ais: query field info and pass to user space"
This reverts commit 3375a292ea.
Need to change the solution and re-implement this feature.

Change-Id: Iabd38bd5c0c062590215c3f22e9383853efa889c
Signed-off-by: Andy Sun <bins@codeaurora.org>
2017-11-21 09:23:16 +08:00
Linux Build Service Account
ce488494ce Merge "msm: camera: isp: don't set stripe_rd reload bit during hw reset" 2017-11-20 15:38:48 -08:00
Linux Build Service Account
31eebba21f Merge "USB: core: Add USB_DEVICE_ERROR uevent for enumeration timeout" 2017-11-20 15:38:47 -08:00
Yuanyuan Liu
f5b51b1f49 icnss: Send early modem crash notification to wlan driver
When SSR happending during WLAN interface up, a deadlock will happen
in many places where it waits for FW response. When wlan module starts,
it will hold a rtnl_lock and wait for FW response. If SSR happened at
this point, it will send ssr notification to all the registed modules
one by one. It will send notification to IPA first, which will also
tried to get a hold of rtnl_lock. Since ssr notification is synchronized,
IPA won't be able to return because of failing to acquire the lock and
wlan driver won't release the rtnl_lock until it timeout and crash.
Only graceful to avoid this deadlock is to get early modem
crash notification from platform via a path which does not acquire
RTNL lock and this way once driver has received early crash
notification it can reject interface up.

Modem notification comes to icnss before IPA, hence send
early crash notification in modem SSR handler so that wlan driver
can release RTNL lock as soon as possible.

CRs-Fixed: 2141970
Change-Id: If77c54a2a39ce5cf0e129eb5c6599cd3fd722886
Signed-off-by: Yuanyuan Liu <yuanliu@codeaurora.org>
2017-11-20 14:25:20 -08:00
Abhijeet Dharmapurikar
1ef211f2cf smb-lib: allow hvdcp if pd is disabled
Currently when pd is disabled, we do not allow hvdcp. To fix that
once hvdcp timeout happens and if pd is disabled, force a pd_active
= 0. This will cause us to run legacy workaround and rerun apsd if
the charger was detected as hvdcp.

Importantly, once legacy bit workaround is run, wait 400mS for
typeC to debounce. Currently we wait for 100mS only and that
causes a removal detection since the CC lines are not settled within
100mS.

Also it may take up to 650mS for the vbus to drop once CC lines are
floated during the workaround. The current wait is just 500mS,
bump it up to a 1 second.

Change-Id: I17a7341e96d6efccde6270bc69d79c3f215b83e4
Signed-off-by: Abhijeet Dharmapurikar <adharmap@codeaurora.org>
2017-11-20 18:12:20 +05:30
Mohammed Javid
0051521505 msm: ipa: UAPI security code changes
Added code changes for UAPI security code
userspace inputs validation

Change-Id: I5f8b7c9cd27a9d8ca721a98f1cbf05c14588dd85
Acked-by: Ashok Vuyyuru <avuyyuru@qti.qualcomm.com>
Acked-by: Abhishek Choubey <abchoube@qti.qualcomm.com>
Signed-off-by: Mohammed Javid <mjavid@codeaurora.org>
2017-11-20 14:40:19 +05:30
Sriharsha Allenki
8edccf1213 usb: dwc3: Fix incorrect ep0 state on reset
According to the databook ep0 should be in setup
phase during reset. If host issues reset between
control transfers, ep0 will be  in an invalid state.
Fix this my issuing stall and restart on ep0 if it
is not in setup phase.

CRs-Fixed: 2136658
Change-Id: I6dc20c2735a6ce772533ccb5b63ba5d1b01f89d7
Signed-off-by: Sriharsha Allenki <sallenki@codeaurora.org>
2017-11-19 23:00:17 -08:00
Jingtao Chen
9d40f7f941 msm: ba: avoid system crash in msm_ba_open()
If it failed to get ba device, return NULL in msm_ba_open() to
avoid system crash on some specific board without adv7481 chip.

Change-Id: I5a3af414a683d852027b84b9ba0d64e2ee450e61
Signed-off-by: Jingtao Chen <jingtaoc@codeaurora.org>
2017-11-19 18:48:40 -08:00
Yuan Zhao
20a606c128 msm: mdss: hdmi: clear deep color bits in the HDMI controller
Clear the deep color bits in the HDMI controller in case
the mode does not need OR support deep color.

Change-Id: I77a5cd74bc90c249d8902437a7b87a07259a2c35
Signed-off-by: Yuan Zhao <yzhao@codeaurora.org>
2017-11-19 18:44:19 -08:00
Linux Build Service Account
d33ed6b2cc Merge "cnss2: fix PCIe D3hot when suspending link" 2017-11-19 07:45:23 -08:00
Linux Build Service Account
15e05b3a9f Merge "FROMLIST: binder: fix proc->files use-after-free" 2017-11-19 07:45:22 -08:00
Linux Build Service Account
04e4c990b1 Merge "ais: query field info and pass to user space" 2017-11-19 07:45:21 -08:00
Linux Build Service Account
594c9a979d Merge "msm: kgsl: Update the dispatcher timer properly" 2017-11-19 07:45:20 -08:00
Linux Build Service Account
9715e41c28 Merge "clk: qcom: mdss: fix the divider programming for DisplayPort PLL" 2017-11-19 07:45:19 -08:00
Linux Build Service Account
2f1c6c842d Merge "msm: camera: Version changes for new csid on msm8953" 2017-11-19 07:45:18 -08:00
Linux Build Service Account
cfa80d3508 Merge "msm: camera: Changing return condition after NULL check" 2017-11-19 07:45:17 -08:00
Linux Build Service Account
13879a35f3 Merge "msm: vidc: Fix instance formats initialization issue" 2017-11-19 07:45:16 -08:00
Linux Build Service Account
ac25624726 Merge "msm: mdss: dp: fix programming of DisplayPort SDP registers" 2017-11-19 07:45:14 -08:00
Linux Build Service Account
d7ad9cc3e5 Merge "msm: mdss: adjust mdss_mdp_get_plane_sizes parameters init order" 2017-11-19 07:45:13 -08:00
Linux Build Service Account
72c7a91cb3 Merge "msm: kgsl: Use the bind lock when dumping entries" 2017-11-19 07:45:12 -08:00
Linux Build Service Account
99e4961cf1 Merge "msm: ais: sensor: actuator: avoid accessing out of bound memory" 2017-11-19 07:45:11 -08:00
Linux Build Service Account
c71f1f1ef1 Merge "drivers: qdsp6v2: Add mutex unlock to properly release lock" 2017-11-19 07:45:10 -08:00
Linux Build Service Account
594cb9819c Merge "security: pfe: Return proper error code" 2017-11-19 07:45:09 -08:00
Linux Build Service Account
ee49de496a Merge "ARM: dts: msm: Fix tavil codec reset issue on sdm660" 2017-11-19 07:45:08 -08:00
Jishnu Prakash
e498154c09 msm: sps: Update debug message format specifier
Restrict printing of kernel virtual addresses in SPS driver.
In debug code, %p is used to print virtual addresses of
kernel objects, which can be exploited by attackers. It is
replaced with %pK, which hides these values if kptr_restrict
is set (default on Android).

Change-Id: I57585fa655abc01b2e8d694c8f31b7617bbf4ec7
Signed-off-by: Jishnu Prakash <jprakash@codeaurora.org>
2017-11-19 20:11:26 +05:30
Linux Build Service Account
74a9c48a91 Merge "ath10k: check the pipe credit update enabled flag before set" 2017-11-18 00:35:27 -08:00
Linux Build Service Account
e18df67a5b Merge "power: qpnp-fg-gen3: update battery profile based on Rconn configuration" 2017-11-18 00:35:25 -08:00
Linux Build Service Account
f0fa03855a Merge "DRM: SDE: Fix the spelling in DTS parser" 2017-11-17 16:00:54 -08:00
Linux Build Service Account
3105f28036 Merge "ARM: dts: msm: Add support for MSM8996 Mizar platform" 2017-11-17 16:00:54 -08:00
Sarada Prasanna Garnayak
7234f3d164 ath10k: check the pipe credit update enabled flag before set
Check the credit update flag has enabled for the pipe
before setting the flag for credit report update request
on the wcn3990 WLAN module.

CRs-Fixed: 2141924
Change-Id: Ic628fa49934c110b7abccefb45a2a354dc462791
Signed-off-by: Sarada Prasanna Garnayak <sgarna@codeaurora.org>
2017-11-17 07:04:25 -08:00
Todd Kjos
6bfca30de9 FROMLIST: binder: fix proc->files use-after-free
(from https://patchwork.kernel.org/patch/10058587/)

proc->files cleanup is initiated by binder_vma_close. Therefore
a reference on the binder_proc is not enough to prevent the
files_struct from being released while the binder_proc still has
a reference. This can lead to an attempt to dereference the
stale pointer obtained from proc->files prior to proc->files
cleanup. This has been seen once in task_get_unused_fd_flags()
when __alloc_fd() is called with a stale "files".

The fix is to always use get_files_struct() to obtain struct_files
so that the refcount on the files_struct is used to prevent
a premature free. proc->files is removed since we get it every
time.

Bug: 69164715
Change-Id: I6431027d3d569e76913935c21885201505627982
Signed-off-by: Todd Kjos <tkjos@google.com>
Git-commit: 1d6b43334b45144beb0dc8236f9eb3b6cf3b2995
Git-repo: https://android.googlesource.com/kernel/common
Signed-off-by: Kyle Yan <kyan@codeaurora.org>
2017-11-16 23:53:41 -08:00
Linux Build Service Account
d092195048 Merge "msm: camera: Enable (2+1) lane csiphy combo mode" 2017-11-16 19:11:13 -08:00
jiad
1857b211df cnss2: fix PCIe D3hot when suspending link
When doing WLAN SSR tests on Rome PCIe platform, system hang
is observed. After debugging, setting D3hot to PCIe link when
suspending leads to the hang.

Setting D3hot is a new change, which is added for Napier platform.
But this code path shares with legacy Rome platform. In previous
implementations for Rome PCIe platforms, setting D3hot to link
is not needed.

Fix is to set D3hot for Napier specific platforms.

Change-Id: Ia6bcb1b898204c0a8fd63355dd1f0808021182c4
CRs-Fixed: 2145090
Signed-off-by: Jia Ding <jiad@codeaurora.org>
2017-11-17 09:35:25 +08:00
Camus Wong
59c20536bc DRM: SDE: Fix the spelling in DTS parser
Fix one of the mode properties' spelling error.

Change-Id: I6cb0f31aa62b825773b97099fcac3da8a2b94af6
Signed-off-by: Camus Wong <camusw@codeaurora.org>
2017-11-16 08:08:16 -08:00
Vijayavardhan Vennapusa
39c6d002e0 ARM: msm: dts: Enable support for audio tunneling mode for msm8996
It is required to pass usb-audio-qmi-dev device node from dtsi to
provide StreamID and interrupt number info so that this info will be
used for enabling for USB audio tunneling mode over USB. Hence add
the node to enable audio tunneling mode for msm8996.

Change-Id: Iba4d18ff0495460f5d488604f31c4d5209252940
Signed-off-by: Vijayavardhan Vennapusa <vvreddy@codeaurora.org>
2017-11-16 04:55:33 -08:00
Padmanabhan Komanduru
f96e94247a clk: qcom: mdss: fix the divider programming for DisplayPort PLL
Fix the divider programming of DisplayPort PLL with the correct
value. Without this, display doesn't up fine with certain
resolutions on some sinks when link rate is 5.4 GHz.

Change-Id: I7c5a452a9df757240a1c6c3d371bd46a16f98efd
Signed-off-by: Padmanabhan Komanduru <pkomandu@codeaurora.org>
2017-11-16 12:10:08 +05:30
Shankar Ravi
11490ec83c msm: camera: Version changes for new csid on msm8953
msm8953 uses a new version of csid. Adding new
configuration file and making necessary driver changes.

Change-Id: I5c0ce7f43a4ccd55bd18461bc910e4dcb0c23bb0
Signed-off-by: Shankar Ravi <rshankar@codeaurora.org>
2017-11-15 22:01:58 -08:00