summaryrefslogtreecommitdiff
path: root/drivers
AgeCommit message (Collapse)Author
2016-03-23msm: pcie: add support to toggle EP wakeirqTony Truong
Create a debugfs node in PCIe bus driver so that users can enable or disable EP wakeirq for each root complex. Change-Id: I7940001453c08593f2940fda378341ae43ff5bad Signed-off-by: Tony Truong <truong@codeaurora.org>
2016-03-23Revert "soc: qcom: glink_smd_xprt: Fix race condition of open ack"Dhoat Harpal
commit 347fe47cccb8 ("soc: qcom: glink_smd_xprt: Fix race condition of open ack"). After SSR, GLINK_CTRL channel remains up, IPC router send open over GLINK_CTRL channel. Then process_ctl_event process the ack sent by remote side and add platform driver without notifyig glink core.Later platform_driver get probed, the channel has opened and glink is notified of only remote_open event. Therefore local state will never reach LOCAL_OPENED. glink core should be notified about open ack from precess_ctl_event on receiving open ack event. CRs-Fixed: 974508 Change-Id: Ibbed8e680246659af2c6b58d91a62b9ff805d43c Signed-off-by: Dhoat Harpal <hdhoat@codeaurora.org>
2016-03-23msm: camera: isp: fix overflow during stop axi streamchiz
In dual VFE case, VFE0 and VFE1 will have different behavior during stoping pix stream. We should disable write master sync to ensure both VFEs stop as expected. Change-Id: Ib63b52a948e526e0d2518cb563a4fc4d67340d0f Signed-off-by: chiz <chiz@codeaurora.org> CRs-Fixed: 977856
2016-03-23soc: qcom: ipc_router_glink_xprt: Fix intent request callbackDhoat Harpal
G-Link driver notifies IPC Router about intent request events in atomic context. IPC router is allocating from with GFP_KERNEL. Allocate the memory from atomic pool with GFP_ATOMIC. CRs-Fixed: 978562 Change-Id: I75a38a2765e06aa490f91a79e5fd5c83f3c12c23 Signed-off-by: Dhoat Harpal <hdhoat@codeaurora.org>
2016-03-23msm: camera: Fixing memory leak issues in camera stackVijay kumar Tumati
Adding memory free calls to during error conditions to fix memory leaks in platform probe. CRs-Fixed: 975003 Change-Id: I7ecd7586e8662eaa6ec020963831e08af424be18 Signed-off-by: Vijay kumar Tumati <vtumati@codeaurora.org>
2016-03-23trace, scm: trace scm callsSanrio Alvares
Create a scm group to enable profiling time spent in a scm call. This will help determine which scm call is spending how much time in a higher execution level. To enable "echo 1 > /sys/kernel/debug/tracing/events/scm/enable". It is disabled by default. If enabled, traces can be found in Ftrace logs. Ftrace Output Example: PROCESS CPU TIME SCM ID, X0, Number of args, args[0-2], X5, return values [0-2] kworker/u8:4-329 [002] 128.201129: scm_call_start: func id=0x42000904 (args: 0x6, 0x2, 0x200000000, 0x65b8000000019, 0x142e0f000) kworker/u8:4-329 [002] 128.201383: scm_call_end: ret: 0, 0, 0x4a07e00000001 kworker/u8:4-329 [002] 128.201464: scm_call_start: func id=0x42000904 (args: 0x6, 0x3, 0x1312d0000000000, 0x17900000000, 0x142e0f000) kworker/u8:4-329 [002] 128.201542: scm_call_end: ret: 0x1bf03dddddd, 0x2f72656b726f776b, 0x343a32 CRs-Fixed: 969770 Change-Id: I4e5aaff796dbc9457c55fa529114dcb57780b7ec Signed-off-by: Sanrio Alvares <salvares@codeaurora.org>
2016-03-23msm: kgsl: Add quirk for masking out hang detect signalsShrenuj Bansal
Add a quirk to mask out the RB 1-3 activity signals in the hang detection logic. Set this quirk in the devicetree for 8996v2 and v3. CRs-Fixed: 978849 Change-Id: I63073b5973644453e775b41a9361de55d7933a07 Signed-off-by: Shrenuj Bansal <shrenujb@codeaurora.org>
2016-03-23msm: kgsl: Submit a set of critical packets right after ME initShrenuj Bansal
During the initialization sequence, submit a set of important packets to the GPU in order to pre-load the I-cache with the critical ucode instructions. CRs-Fixed: 978777 Change-Id: Ic6a17b24d8c3aa383af8e25cf9ef771459d65796 Signed-off-by: Shrenuj Bansal <shrenujb@codeaurora.org>
2016-03-23edac: cortex: Add EDAC L1 and L2 error reporting for Kryo2xx Silver CPUsTrilok Soni
Kryo2xx Silver CPUs support L1 and L2 cache error reporting. Add support for the same. CRs-Fixed: 969563 Change-Id: Ia2c860803169843a227eacebc9869e11673ffc7a Signed-off-by: Trilok Soni <tsoni@codeaurora.org>
2016-03-23soc: qcom: gladiator_hang: Increase the max threshold valueRunmin Wang
Increase the max threshold value so that user has more flexiblity to tune the value. CRs-Fixed: 971774 Change-Id: Id6408b7ee6779e95c48bcf9087ea7c87b54d42fd Signed-off-by: Runmin Wang <runminw@codeaurora.org>
2016-03-23Power: Enable/Disable power collapse after camera openRamesh V
Disabling power collapse during camera open. We send disable request before opening camera and enable it back after opening camera Change-Id: Idd55021063eace18fa20f00183a41a502f5c88a1 Signed-off-by: Ramesh V <ramev@codeaurora.org>
2016-03-23cnss: Expose dump stack functionalityAbhishek Singh
Add changes to expose dump stack functionality which can be used by driver to dump stack information when it requires. CRs-Fixed: 979886 Change-Id: Ib929ad0a510b996ac54d17afd2957ea487c62851 Signed-off-by: Abhishek Singh <absingh@codeaurora.org>
2016-03-23clk: msm: clock-cpu-8996: Increase CBF PLL post-divider to 4 for 8996proVikram Mulukutla
To open up the frequency range from 150 to 300MHz, change the fixed CBF PLL post divider from 2 to 4. That way, to generate frequencies less than 300MHz, the VCO can be run at 4x with the CBF mux set to use the main output. While we're here, add the cbf_pll_main clock to the lookup table. CRs-Fixed: 980903 Change-Id: I9f70f18e01199c41e1940857afb7bdd477c1c04c Signed-off-by: Vikram Mulukutla <markivx@codeaurora.org>
2016-03-23misc: Update the QPNP_MISC Kconfig entryDevesh Jhunjhunwala
Let the QPNP_MISC config depend on the SPMI or the MSM_SPMI configs instead of SPMI only. CRs-Fixed: 972331 Change-Id: I9a0d53c6cf0aeeaf258cfca5706c68a6a8b7e37a Signed-off-by: Devesh Jhunjhunwala <deveshj@codeaurora.org>
2016-03-23misc: Add snapshot of QPNP misc driverAndy Gross
This patch adds a snapshot of the QPNP misc driver as of msm-3.14 commit: e016c39467094409c9c872b02ec619164913054a (Merge "msm: thermal: Fix compilation issue when THERMAL_MONITOR is disabled") CRs-Fixed: 972331 Change-Id: I48dc9857379c388ddff86b20320cdfa23bb22af8 Signed-off-by: Andy Gross <agross@codeaurora.org> Signed-off-by: Devesh Jhunjhunwala <deveshj@codeaurora.org>
2016-03-23clk: msm: clock: Program delay time for droop detector recalibrationDeepak Katragadda
Configure the RECAL_VCTL/CPR_DLY registers to enable and set the voltage delay time for hardware based droop detector recalibration. Only needed on MSM8996 Pro. CRs-Fixed: 980641 Change-Id: I217e4510b020b7708665394c42f46773bd8b225d Signed-off-by: Deepak Katragadda <dkatraga@codeaurora.org>
2016-03-23input: maxim_sti: add support for multitouch protocol BJigarkumar Kishorkumar Zala
Add support for multitouch procotol B, in order to track object based ID touch activities. Change-Id: I9b6941b3fea2f5c28434793073330cd4abe9fa74 Signed-off-by: Jigarkumar Kishorkumar Zala <j_zala@codeaurora.org>
2016-03-23msm: kgsl: Enable guard page for GPUOBJ_IMPORT ioctlSushmita Susheelendra
The guard page should be enabled on the gpuobj import path to ensure allocations that are mapped are safe from the UCHE overfetch bug. CRs-Fixed: 975219 Change-Id: I42b7046ce3d314ec21c8fb03ef4fbbcdb094d8cf Signed-off-by: Sushmita Susheelendra <ssusheel@codeaurora.org>
2016-03-23msm: kgsl: Use fault context to retrieve process informationSushmita Susheelendra
Instead of looking up the process by pagetable base and name, use the fault context to extract the pid and other process specific information. This works for both the per-process and global pagetable configurations and also reduces some locking. This also reports the correct pid and task name in the global pagetable configuration. CRs-Fixed: 971753 Change-Id: I9c869527c3d1b2606f3d12234163935d6f5e43a9 Signed-off-by: Sushmita Susheelendra <ssusheel@codeaurora.org>
2016-03-23slim-msm-ngd: Register with specific subsystemDilip Kota
Slimbus master is present in different subsystem on different tragets. Register with specific subsystem as mentioned in the device tree. Change-Id: I1bee7fdd7578deedca8e4e43af9055b41b96d652 Signed-off-by: Dilip Kota <dkota@codeaurora.org>
2016-03-23msm: kgsl: Update RBBM_CLOCK_HYST_UCHE idle setting value for A50xHareesh Gundu
A50x GPU RBBM_CLOCK_HYST_UCHE idle setting recommended value is 0x00FFFFF4. Update accordingly to reflect the same. Change-Id: I95d79040c645e418ed26ea72ba84af2c2c7efce9 Signed-off-by: Hareesh Gundu <hareeshg@codeaurora.org>
2016-03-23hwmon: qpnp-adc-voltage: Update VADC debug registersRama Krishna Phani A
Update logic to print VADC peripheral register content in case adc conversions are met with error condition. Change-Id: Ic4e2cf7b9bfc7b2a647aa773fbcafb6bd0c6019e Signed-off-by: Rama Krishna Phani A <rphani@codeaurora.org>
2016-03-23fbdev: check size before copying the userdataDhaval Patel
Check cmap data size before copying the userdata to avoid null access. Change-Id: If75c0339cf5e0ace6a35abc625f02283cc99298c Signed-off-by: Dhaval Patel <pdhaval@codeaurora.org>
2016-03-23input: touchpanel: Add Synaptics latest version 2.6 touchpanel driverMao Li
This is the reference driver source code for synaptics touch driver, the version is 2.6. All the new files are copied from the git commit: 7b6b9d126aca1f371e8abf3ae56d7a5a4e538f13 drivers/input/touchscreen/synaptics_dsx_2.6/synaptics_dsx_active_pen.c is copied from kernel/drivers/input/touchscreen/synaptics_dsx/synaptics_dsx_active_pen.c; drivers/input/touchscreen/synaptics_dsx_2.6/synaptics_dsx_core.c is copied from kernel/drivers/input/touchscreen/synaptics_dsx/synaptics_dsx_core.c; drivers/input/touchscreen/synaptics_dsx_2.6/synaptics_dsx_core.h is copied from kernel/drivers/input/touchscreen/synaptics_dsx/synaptics_dsx_core.h; drivers/input/touchscreen/synaptics_dsx_2.6/synaptics_dsx_fw_update.c is copied from kernel/drivers/input/touchscreen/synaptics_dsx/synaptics_dsx_fw_update.c; drivers/input/touchscreen/synaptics_dsx_2.6/synaptics_dsx_gesture.c is copied from kernel/drivers/input/touchscreen/synaptics_dsx/synaptics_dsx_gesture.c; drivers/input/touchscreen/synaptics_dsx_2.6/synaptics_dsx_i2c.c is copied from kernel/drivers/input/touchscreen/synaptics_dsx/synaptics_dsx_i2c.c; drivers/input/touchscreen/synaptics_dsx_2.6/synaptics_dsx_proximity.c is copied from kernel/drivers/input/touchscreen/synaptics_dsx/synaptics_dsx_proximity.c; drivers/input/touchscreen/synaptics_dsx_2.6/synaptics_dsx_rmi_dev.c is copied from kernel/drivers/input/touchscreen/synaptics_dsx/synaptics_dsx_rmi_dev.c; drivers/input/touchscreen/synaptics_dsx_2.6/synaptics_dsx_rmi_hid_i2c.c is copied from kernel/drivers/input/touchscreen/synaptics_dsx/synaptics_dsx_rmi_hid_i2c.c; drivers/input/touchscreen/synaptics_dsx_2.6/synaptics_dsx_spi.c is copied from kernel/drivers/input/touchscreen/synaptics_dsx/synaptics_dsx_spi.c; drivers/input/touchscreen/synaptics_dsx_2.6/synaptics_dsx_test_reporting.c is copied from kernel/drivers/input/touchscreen/synaptics_dsx/synaptics_dsx_test_reporting.c drivers/input/touchscreen/synaptics_dsx_2.6/synaptics_dsx_video.c is copied from kernel/drivers/input/touchscreen/synaptics_dsx/synaptics_dsx_video.c include/linux/input/synaptics_dsx_v2_6.h is copied from kernel/include/linux/input/synaptics_dsx.h Change-Id: Ifda2c38ca5b4a82c3363d8c59ae9da3839568e82 Signed-off-by: Mao Li <maol@codeaurora.org>
2016-03-23clk: msm: clock-osm: add OSM clock driverOsvaldo Banuelos
The Operating State Manager is a hardware block which deals with performing voltage and frequency change operations in the CPUSS. Two instances exist, one for each cluster, in the msmcobalt chip. Introduce the OSM clock driver to perform the required OSM hardware block initialization and support DCVS scale requests. Change-Id: I3e155db5cd580e371ca1791815e4942f442a3d20 CRs-Fixed: 967319 Signed-off-by: Pushkar Joshi <pushkarj@codeaurora.org> Signed-off-by: Osvaldo Banuelos <osvaldob@codeaurora.org>
2016-03-23msm: isp: Avoid ping pong mismatch in CDSAbhishek Kondaveeti
Update AXI only when both ISPs issue reg update interrupt. CRs-Fixed: 955803 Change-Id: I8b7090e2b45de5a84e5ceca02aa083aefc6af600 Signed-off-by: Abhishek Kondaveeti <akondave@codeaurora.org>
2016-03-23xhci-hub: Handle error condition with xhci_stop_deviceMayank Rana
xhci_stop_device() is calling xhci_queue_stop_endpoint() multiple time and doesn't check return value. xhci_queue_stop_endpoint() can return error if xhci is already halted or not able to queue command. xhci_stop_device() waits for stop command completion using wait_for_completion which wouldn't be interrupted or completed if queueing of command fails. It results into possible deadlock condition where usb_disconnect() waits for this udev->lock which is already acquired by caller of xhci_stop_device() which is set_port_feature(). Fix this issue by handling error condition and making sure that xhci_stop_device() doesn't wait if queueing of command is failed. Change-Id: Ica4db17afcd39a7e89fcf985f41760efd2756653 Signed-off-by: Mayank Rana <mrana@codeaurora.org>
2016-03-23mdss: msm: Update dither driver interfaceGopikrishnaiah Anandan
Post processing driver clients can program the dither table in mdp. If length of the dither table is set to 0, driver will program the default table. If driver client would like to program the table it needs to update the length field as per mdp hardware version. CRs-fixed: 983164 Change-Id: I5e6aaa3d9376884e5ea1fe153cdf2798e3a52d1e Signed-off-by: Gopikrishnaiah Anandan <agopik@codeaurora.org>
2016-03-23msm: mdss: hdmi: add support for CEC suspend and resume eventsTatenda Chipeperekwa
Add support for CEC commands to suspend and resume the device. The HDMI core must be kept on when the CEC wakeup feature is enabled and the device is going into suspend state. Furthermore, interrupts must be enabled in this state to capture CEC commands. This allows the device to be resumed later on via CEC wakeup commands. Change-Id: Ie6fcbc666e4f40335ab8faaa969d4b03aa83e17c Signed-off-by: Tatenda Chipeperekwa <tatendac@codeaurora.org>
2016-03-23clk: msm: mdss: update the procedure for storing DSI PLL codesPadmanabhan Komanduru
In the current implementation, the DSI PLL codes are copied from a CMA memory which has a no-map attribute. Update the logic by reading the pre-calibrated DSI PLL codes from physical memory which is re-mapped to virtual memory allocated in kernel using ioremap_page_range. Once the DSI PLL codes are stored, free the reserved CMA memory back to kernel. Change-Id: Iaa0bbd600dd1a18497cd4dfd7830a9bf88ab0ead Signed-off-by: Padmanabhan Komanduru <pkomandu@codeaurora.org>
2016-03-23msm: mdss: dsi: ensure clocks are off when setting their sourceAbhinav Kumar
When DSI panel in unblanked, the driver configures the sources for all the DSI branch clocks based on the current HW configuration. This assumes that the clocks would be off when the panel is unblanked. This may not be true when transitioning to ON state from any of the panel low power states (LP1 or LP2). This can lead to warnings when trying to set the clock source while the clock is enabled. Fix this by ensuring that the clock source is configured only if the panel is not on. Change-Id: I97f40eaedad203c5aaa0c645105bea2ff962e81d CRs-Fixed: 975819 Signed-off-by: Aravind Venkateswaran <aravindh@codeaurora.org>
2016-03-23msm: mdss: dsi: add xlog for BTA DONE and few error messagesVeera Sundaram Sankaran
Add xlog entry when BTA DONE interrupt is received. And add proper error messages before panic in few places, to make it easy to identify the reason and place of the crash. Change-Id: Ie9e24d2caeff12601058ea3c76af4e3dca0cd09c Signed-off-by: Veera Sundaram Sankaran <veeras@codeaurora.org>
2016-03-23drivers: mfd: Move codec reset gpio config to early bootPhani Kumar Uppalapati
Codec reset gpio configuration needs to be updated before slimbus master component is initialized otherwise codec cannot be enumerated on the bus. Add a new platform device driver to update the codec reset gpio configuration to valid state (output, drive-strength) before slimbus is initialized. CRs-Fixed: 968161 Change-Id: I7227212e6b846d58196718255aa4b0923352d120 Signed-off-by: Phani Kumar Uppalapati <phaniu@codeaurora.org>
2016-03-23clk: msm: clock-local: Add support to set the post_div for debug muxOdelu Kukatla
Update the clock framework to support the setting of post_div for debug mux so as to divide the clock by post_div. CRs-Fixed: 977413 Change-Id: I7299bdb0953dcf65fbf2a38b7578e2e54446c0d7 Signed-off-by: Odelu Kukatla <okukatla@codeaurora.org>
2016-03-23cnss_prealloc: Dump the call stack if there is no memory availableYue Ma
Dump the call stack if there is no memory available from the prealloc pool in order to get the source of the memory allocation. Change-Id: I0b523e82638410ea679f1d9d3f4bb56703ed9100 Signed-off-by: Yue Ma <yuem@codeaurora.org>
2016-03-23msm: kgsl: Specify the initial pwrlevel for each speed binSuman Tatiraju
Some platforms support multiple GPU clock plans based on the speed bin in the efuse. Specify the wake up frequency of each speed bin individually to wake the gpu at the correct powerlevel. CRs-Fixed: 967494 Change-Id: I9890b8a710d7055c30f9ae7612b092af8fa8a9f5 Signed-off-by: Suman Tatiraju <sumant@codeaurora.org>
2016-03-23msm: kgsl: Disable all HW clockgating during snapshotOleg Perelet
While producing snapshot disable all HWCG branches, not only top level. CRs-Fixed: 978122 Change-Id: I4b01224a0ba46c276115a284a0da6207c7968f72 Signed-off-by: Oleg Perelet <operelet@codeaurora.org>
2016-03-23msm: thermal: Add range checking for cluster_idMahesh Sivasubramanian
The cluster id flag is passed in from the userspace through ioctl interface. Ensure correctness of cluster id to avoid out of bounds array accesses. CRS-fixed: 977508 Change-Id: I778b962d347b90488b983a15087b13e90ad06688 Signed-off-by: Mahesh Sivasubramanian <msivasub@codeaurora.org>
2016-03-23msm: kgsl: Add run time hardware clockgating controlOleg Perelet
Create sysfs nodes to enable/disable hardware clock gating. CRs-Fixed: 973565 Change-Id: If5f0215e0d7f3d7be1a0cf00fbd8789c6adf2f0f Signed-off-by: Oleg Perelet <operelet@codeaurora.org>
2016-03-23net: cnss: refactor PM QoS request wrapper APISarada Prasanna Garnayak
Make PM QoS request API generic to pass the type of latency requirement needed by the client instead of hard coding latency type. Add latency type as a function parameter. CRs-Fixed: 972761 Change-Id: Ic912148d2068fe8a758b6a4b3be570ccf870f03a Signed-off-by: Sarada Prasanna Garnayak <sgarna@codeaurora.org>
2016-03-23qseecom: release ION memory if qseecom failed to unload appZhen Kong
To avoid memory leakage, make change to release ION memory if qseecom failed to unload TZ app, which is allocated when starting app. CRs-Fixed: 977073 Change-Id: Ic4c9a7d7a118ff5026ce6ce7769a4c053906ed2d Signed-off-by: Zhen Kong <zkong@codeaurora.org>
2016-03-23soundwire: Avoid runtime suspend after device path bringupSudheer Papothi
There is a possible race condition that runtime suspend is being called after device path bringup. To avoid this race condition, add a mutex lock during device path bringup to serialize runtime suspend and resume. CRs-Fixed: 967442 Change-Id: I268a25b05799c66fc019e19e46939286e54fb514 Signed-off-by: Sudheer Papothi <spapothi@codeaurora.org>
2016-03-23msm: kgsl: Fix race condition in adreno_spin_idle()Suman Tatiraju
adreno_spin_idle spins for a timeout checking for gpu to idle. Sometimes due to race conditions the timeout can occur before the loop is executed. Change the logic to a do-while loop and add an extra idle check after the timeout before returning failure. CRs-Fixed: 978122 Change-Id: Idb92a0180dd8cc3e662b1ccf44d69e4bbafb29f1 Signed-off-by: Suman Tatiraju <sumant@codeaurora.org>
2016-03-23net: cnss_prealloc: Add memory for high latency SDIO interfaceSarada Prasanna Garnayak
wlan driver transport layer pdev handler needs 128kb pre allocated memory in a single block memory allocation for transmit/receive descriptor initialization in wlan startup for the wlan module with high latency(SDIO) based hardware interface. CRs-Fixed: 978073 Change-Id: I0dbe047a7b64e96bf32470702d1b3e3088bffcf7 Signed-off-by: Sarada Prasanna Garnayak <sgarna@codeaurora.org>
2016-03-23crypto: msm: qcrypto: Fix hash crash if not last issueSivanesan Rajapupathi
If an ahash request is not final, the result variable of ahash_request may not exist. In the completion callback function, then, do not copy the digest result to result variable of ahash_request, if it not final. Otherwise, crash may happen. Change-Id: I169218e8658500539b19408eca3afeabcaa4816b Acked-by: Che-Min Hsieh <cheminh@qti.qualcomm.com> Signed-off-by: Sivanesan Rajapupathi <srajap@codeaurora.org>
2016-03-23cpuidle: lpm-levels: Log cpu enter & exit events into lpm debugMaulik Shah
Add cpu enter and cpu exit log into lpm debug for 32bit. Change-Id: I88973dbc4f9ffc08f8201059a82a3133fa0db330 Signed-off-by: Maulik Shah <mkshah@codeaurora.org>
2016-03-23msm: kgsl: Set the DDR high bank bit if specified in the device treeJordan Crouse
On 5XX targets we need to program the bit of the highest DDR bank into a number of registers, one of which is protected which would cause problems if the user mode driver tried to write to it. Specify the high bank bit in the device tree files, set the problematic register in the kernel and then pass the value up to the user mode driver as a property and let them program the other registers. This makes the device tree the authoratative source of the high bit value which is exactly how it should be. If the value isn't specified by the device tree for whatever reason return an error for the property request - that will give the UMD a clue that the value wasn't specified and they should just set a default. CRs-Fixed: 970272 Change-Id: Ic0dedbad830321329b74da7fa3e172fdaf765c4d Signed-off-by: Jordan Crouse <jcrouse@codeaurora.org>
2016-03-23msm: gsi: construct TRE before submitSkylar Chang
For performance improvement avoid multiple writes to channel ring which is a dma coherent memory. Instead, construct the TRE (Transfer Ring Element) in local memory and then copy it to the ring itself. Change-Id: I36bfae306be2a90c8679d416397a435e638b54eb CRs-Fixed: 977590 Acked-by: Ady Abraham <adya@qti.qualcomm.com> Signed-off-by: Skylar Chang <chiaweic@codeaurora.org>
2016-03-23qseecom: Fix stack out of bounds issueAnilKumar Chimata
While copying the request buffer to temporary buffer large size of request buffer is copied which leads to accessing stack out of its size. <3>[ 24.265116] ================================================================== <3>[ 24.271333] BUG: KASAN: stack-out-of-bounds in memcpy+0x28/0x54 at addr ffffffc05890b744 <3>[ 24.279388] Read of size 4096 by task vold/362 <0>[ 24.283819] page:ffffffba494e3790 count:0 mapcount:0 mapping: (null) index:0x0 <0>[ 24.291800] flags: 0x0() <1>[ 24.294318] page dumped because: kasan: bad access detected <6>[ 24.299884] CPU: 1 PID: 362 Comm: vold Not tainted 3.18.20-g7bb9977 #1 <6>[ 24.299895] Hardware name: Qualcomm Technologies, Inc. MSM8937-PMI8950 MTP (DT) <0>[ 24.299904] Call trace: <6>[ 24.302314] [<ffffffc00008c80c>] dump_backtrace+0x0/0x284 <6>[ 24.302329] [<ffffffc00008caa0>] show_stack+0x10/0x1c <6>[ 24.302345] [<ffffffc001e7c4ac>] dump_stack+0x74/0xfc <6>[ 24.302362] [<ffffffc0002f8880>] kasan_report+0x3b4/0x504 <6>[ 24.302376] [<ffffffc0002f7ae0>] __asan_loadN+0x20/0x14c <6>[ 24.302389] [<ffffffc0002f7fe4>] memcpy+0x24/0x54 <6>[ 24.302406] [<ffffffc000bfdf80>] qseecom_scm_call2+0xec0/0x1c94 <6>[ 24.302421] [<ffffffc000c00798>] qseecom_scm_call.constprop.41+0x64/0x7c <6>[ 24.302436] [<ffffffc000c0513c>] qseecom_create_key+0x304/0x680 <6>[ 24.302450] [<ffffffc000c1084c>] qseecom_ioctl+0x2fb8/0x4944 <6>[ 24.302464] [<ffffffc000333f70>] do_vfs_ioctl+0x9c8/0xb0c <6>[ 24.302476] [<ffffffc00033410c>] SyS_ioctl+0x58/0x8c <3>[ 24.302484] Memory state around the buggy address: <3>[ 24.307080] ffffffc05890b680: f2 f2 f2 f2 00 04 f4 f4 f2 f2 f2 f2 00 00 00 00 <3>[ 24.314283] ffffffc05890b700: 04 f4 f4 f4 f2 f2 f2 f2 00 00 00 00 00 00 00 00 <3>[ 24.321488] >ffffffc05890b780: 00 f4 f4 f4 f2 f2 f2 f2 00 00 00 00 00 00 00 00 <3>[ 24.328690] ^ <3>[ 24.332164] ffffffc05890b800: 00 00 04 f4 f3 f3 f3 f3 00 00 00 00 00 00 00 00 <3>[ 24.339369] ffffffc05890b880: 00 00 00 00 00 00 00 00 00 00 00 00 f1 f1 f1 f1 <3>[ 24.346571] ================================================================== <4>[ 24.353777] Disabling lock debugging due to kernel taint <3>[ 24.533597] QSEECOM: __qseecom_process_incomplete_cmd: fail:resp res= -65,app_id = 0,lstr = 12288 <6>[ 24.541522] get_ice_device_from_storage_type: found ice device ffffffc05bd61f80 <3>[ 24.545296] ================================================================== <3>[ 24.551503] BUG: KASAN: stack-out-of-bounds in memcpy+0x28/0x54 at addr ffffffc05890b7c4 <3>[ 24.559558] Read of size 4096 by task vold/362 <0>[ 24.563989] page:ffffffba494e3790 count:0 mapcount:0 mapping: (null) index:0x0 <0>[ 24.571966] flags: 0x0() <1>[ 24.574485] page dumped because: kasan: bad access detected <6>[ 24.580050] CPU: 1 PID: 362 Comm: vold Tainted: G B 3.18.20-g7bb9977 #1 <6>[ 24.580060] Hardware name: Qualcomm Technologies, Inc. MSM8937-PMI8950 MTP (DT) <0>[ 24.580069] Call trace: <6>[ 24.582482] [<ffffffc00008c80c>] dump_backtrace+0x0/0x284 <6>[ 24.582497] [<ffffffc00008caa0>] show_stack+0x10/0x1c <6>[ 24.582513] [<ffffffc001e7c4ac>] dump_stack+0x74/0xfc <6>[ 24.582529] [<ffffffc0002f8880>] kasan_report+0x3b4/0x504 <6>[ 24.582543] [<ffffffc0002f7ae0>] __asan_loadN+0x20/0x14c <6>[ 24.582556] [<ffffffc0002f7fe4>] memcpy+0x24/0x54 <6>[ 24.582574] [<ffffffc000bfe128>] qseecom_scm_call2+0x1068/0x1c94 <6>[ 24.582588] [<ffffffc000c00798>] qseecom_scm_call.constprop.41+0x64/0x7c <6>[ 24.582603] [<ffffffc000c04c30>] __qseecom_set_clear_ce_key+0xf4/0x2fc <6>[ 24.582616] [<ffffffc000c05334>] qseecom_create_key+0x4fc/0x680 <6>[ 24.582630] [<ffffffc000c1084c>] qseecom_ioctl+0x2fb8/0x4944 <6>[ 24.582644] [<ffffffc000333f70>] do_vfs_ioctl+0x9c8/0xb0c <6>[ 24.582656] [<ffffffc00033410c>] SyS_ioctl+0x58/0x8c <3>[ 24.582664] Memory state around the buggy address: <3>[ 24.587250] ffffffc05890b700: 04 f4 f4 f4 f2 f2 f2 f2 00 00 00 00 00 00 00 00 <3>[ 24.594453] ffffffc05890b780: 00 f4 f4 f4 f2 f2 f2 f2 00 00 00 00 00 00 00 00 <3>[ 24.601656] >ffffffc05890b800: 00 00 04 f4 f3 f3 f3 f3 00 00 00 00 00 00 00 00 <3>[ 24.608860] ^ <3>[ 24.612596] ffffffc05890b880: 00 00 00 00 00 00 00 00 00 00 00 00 f1 f1 f1 f1 <3>[ 24.619802] ffffffc05890b900: 04 f4 f4 f4 f2 f2 f2 f2 00 f4 f4 f4 f2 f2 f2 f2 <3>[ 24.627001] ================================================================== <6>[ 24.799462] get_ice_device_from_storage_type: found ice device ffffffc05bd61f80 <3>[ 24.803065] QSEECOM: qseecom_create_key: Set the key successfully Change-Id: Id683067d29531686dafe94114ba3329f87292923 Signed-off-by: AnilKumar Chimata <anilc@codeaurora.org>
2016-03-23msm: camera: sof freeze enhancementRamesh V
Enable CSID IRQ dynamically and add sof recover logic, in case kernel get sof freeze hints from userspace,will enable IRQs to monitor the status of moduels,if sof recovers after 2.5 secs then kernel get MSM_SD_UNNOTIFY_FREEZE to disable all the IRQs. CRs-Fixed: 973732 Change-Id: I7aa6dcd60e0858258c40c3d6517e2974e6e2b722 Signed-off-by: Ramesh V <ramev@codeaurora.org>