Commit graph

889,574 commits

Author SHA1 Message Date
Harshdeep Dhatt
dbfff92937 msm: kgsl: Turn off gpu interrupts during stall-on-fault
Disable gpu interrupt inline instead of changing power states as gmu
based targets do not implement the power state machine. Make sure we
skip turning off the gpu interrupt during reset after stall on fault.

Change-Id: I49c1702005f88eab523f00b25923c9c65193c7ca
Signed-off-by: Harshdeep Dhatt <hdhatt@codeaurora.org>
2020-08-13 23:27:58 -06:00
Faiyaz Mohammed
7b5c8878ce mm: memblock: Add more debug logs
memblock_alloc is not giving information of owner of the memblock_reserve,
when we pass through command line "memblock=debug".
Below information is not enough for memory statistics.
for example:
[    0.000000] memblock_reserve: [0x000000013fbf8000-0x000000013fbf8fff] memblock_alloc+0x50/0x60.

To enhance the memblokc_dbg information or to get the exact owner of the
memblock_reserve added debug logs in different memblock alloc functions,
which is helpful for memory statistics.
After adding logs:
[    0.000000] memblock_alloc: size: 4096 align: 4096 early_pgtable_alloc+0x18/0x98.
[    0.000000] memblock_reserve: [0x000000013fbf9000-0x000000013fbf9fff] memblock_alloc+0x50/0x60.

Change-Id: Ibc9603f71fe3150af67398658d04c34f824b47e1
Signed-off-by: Faiyaz Mohammed <faiyazm@codeaurora.org>
2020-08-14 09:21:40 +05:30
Naveen Yadav
638628901c clk: qcom: rpmh: Add support for RPMH clocks for sdxlemur
Add clock rpmh data to communicate with RPMH clocks for sdxlemur.

Change-Id: I7884a5421c0174fc21fc4983f20dd7e2d454ab41
Signed-off-by: Naveen Yadav <naveenky@codeaurora.org>
2020-08-14 09:05:08 +05:30
Taniya Das
ac9bde4777 clk: qcom: common: Return NULL from clk_hw OF provider
Return NULL in the cases where the clk_hw is not registered with the
clock provider, but the clock consumer still requests for a clock id.

Change-Id: Ibac88bf6a89956d8dd4fdb0775606d7659efc747
Signed-off-by: Taniya Das <tdas@codeaurora.org>
Link: https://lkml.kernel.org/r/20191014102308.27441-3-tdas@codeaurora.org
Signed-off-by: Stephen Boyd <sboyd@kernel.org>
Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
Git-commit: ffe37ede0a9eb524162c683f48da8558d5323ddb
Signed-off-by: Mike Tipton <mdtipton@codeaurora.org>
2020-08-13 13:29:05 -07:00
Jeevan Shriram
ef059a6e98 defconfig: Add support for ARM_APPENDED_DTB for sdxlemur
Add appended dtb support for sdxlemur target.

Change-Id: I636c324b4cd041446c9dc495cdf94b24740304c7
Signed-off-by: Jeevan Shriram <jshriram@codeaurora.org>
2020-08-13 12:01:48 -07:00
qctecmdr
55d1e41a78 Merge "mhi: core: Add missing EXPORT_SYMBOL for some public APIs" 2020-08-13 10:28:15 -07:00
qctecmdr
68d7a1a757 Merge "sched: Improve the scheduler" 2020-08-13 10:28:15 -07:00
qctecmdr
69475f3721 Merge "coresight: tmc: Set flush cti for both etr and etb" 2020-08-13 10:28:14 -07:00
qctecmdr
c4dd370b6a Merge "clk: qcom: clk-debug: Fix clk_measure files not being created" 2020-08-13 10:28:14 -07:00
qctecmdr
70661b7439 Merge "cnss2: Fix SBL logging for invalid log location address" 2020-08-13 10:28:13 -07:00
qctecmdr
901facd849 Merge "clk: qcom: smd_rpm: RPM-SDM changes for XO BUFFERS in HOLI" 2020-08-13 10:28:13 -07:00
qctecmdr
26a195583d Merge "qseecom : Pass proper device node pointer" 2020-08-13 10:28:13 -07:00
qctecmdr
0b6e8dfa7b Merge "qseecom : Fixes to enable shmbridge" 2020-08-13 10:28:12 -07:00
qctecmdr
908cc36e3f Merge "msm: kgsl: Add back power tracepoints to gmu and rgmu targets" 2020-08-13 10:28:12 -07:00
qctecmdr
13c3c14b22 Merge "msm: kgsl: Fix stuck issue while booting legacy" 2020-08-13 04:49:36 -07:00
qctecmdr
5dbc31a508 Merge "msm: kgsl: Fix kgsl context debug stat" 2020-08-13 04:49:36 -07:00
qctecmdr
16549c3f85 Merge "icnss2: Send SMMU IOVA range only when SMMU S1 is enabled" 2020-08-13 04:49:36 -07:00
qctecmdr
6e6429db72 Merge "icnss2: Extend thermal mitigation support feature" 2020-08-13 04:49:35 -07:00
qctecmdr
c59f323e50 Merge "usb: phy: qmp: Disable LDOs and clocks in error handling path" 2020-08-13 04:49:35 -07:00
qctecmdr
48953ffa1c Merge "drivers: soc: qcom: update sct table for LLCC on Shima" 2020-08-13 04:49:35 -07:00
qctecmdr
d8abfb42b3 Merge "msm: cvp: Cancel pending synx during SSR" 2020-08-13 04:49:34 -07:00
qctecmdr
8f2a36f455 Merge "drivers/base/memory.c: Optimize allocated_bytes_show()" 2020-08-13 04:49:34 -07:00
qctecmdr
2cc7a54835 Merge "PM / devfreq: memlat: Add writeback percentage as a lat condition" 2020-08-13 04:49:34 -07:00
qctecmdr
b0b7e93f35 Merge "msm:adsprpc: Prevent use after free in fastrpc_set_process_info" 2020-08-13 04:49:33 -07:00
qctecmdr
8cc45cd760 Merge "cnss2: Add support to remove WLAN recovery from SSR framework" 2020-08-13 04:49:33 -07:00
qctecmdr
385e54b85b Merge "cnss_utils: Increase unsafe channel max num for 6G" 2020-08-13 04:49:32 -07:00
Maulik Shah
41e4398ad7 cpuidle: lpm-levels: Set suspend and s2idle ops later during probe
There is a possibility of failing probe after setting suspend and
s2idle ops. Register suspend ops later during probe after which
there is no failure.

While at this, also add missing dma_free_coherent call.

Change-Id: I824f5d433623a4d7309875a61c68778f74d139f7
Signed-off-by: Maulik Shah <mkshah@codeaurora.org>
2020-08-13 16:41:07 +05:30
Biao Long
9475145361 sched:/fair: check cpu_allowed mask when find target
Current find best target cpu is not check cpu_allowed mask, so
it is possible to place the task on wrong cpu, add cpu mask
check when find best target.

Change-Id: I8075657fa67704ab8d9d94d542a7983bcf8d034f
Signed-off-by: Biao Long <blong@codeaurora.org>
2020-08-13 17:56:30 +08:00
gkiranku
66222aaf87 msm: kgsl: skip if requested address doesn't fall in the svm range
User should not be provided address out of SVM region.
Return error for any such requests from user.

Change-Id: If149044039b156f8192f405714f5c1a0571004e7
Signed-off-by: gkiranku <gkiranku@codeaurora.org>
2020-08-13 13:41:29 +05:30
Indira Biruduraju
af6de62c2f msm: kgsl: Remove VM_MAYWRITE flag to restrict mprotect
When VM_MAYWRITE flag is used during mmap(), mprotect()
can be used later to change the protection of memstore
to allow write. Make sure this does not happen by
removing VM_MAYWRITE from the vm_flags of vma.

Change-Id: I6f69f05858ea40611d512cfa796caabeaa88cdb5
Signed-off-by: Indira Biruduraju <ibirudur@codeaurora.org>
2020-08-13 13:04:33 +05:30
Sarthak Garg
67118b3a92 arm64: defconfig: Enable eMMC/SD card on holi
Enable eMMC/SD card driver to be build as a loadable module
in the holi GKI defconfig file.

Change-Id: Ic13088afeaa70b9c0fddbbe03f5ca1545a1d4db5
Signed-off-by: Sarthak Garg <sartgarg@codeaurora.org>
2020-08-13 10:43:30 +05:30
Sarthak Garg
1e927745f8 arm64: defconfig: Enable eMMC/SD card driver for holi QGKI defconfig
Enable eMMC/SD card driver as a inbuilt module for holi
QGKI defconfig.

Also Enable a config flag to add Qualcomm specific code to upstream
MMC drivers.

Change-Id: Ic98253109fe656ee78c95ae21290210305f5ec4b
Signed-off-by: Sarthak Garg <sartgarg@codeaurora.org>
2020-08-13 10:38:52 +05:30
Vivek Aknurwar
8ea693da82 clk: qcom: clk-debug: Fix clk measurement algorithm
Due to measurement counter does not self-clear reliably, explicitly
clearing CLR_CNT in SW instead of relying on self-clear HW sequence.
SW/HW CLR_CNT enable and disable sequence requires ~1us delay to allow
clearing the count.
Increasing sample rate to 27ms to get more accurate measurement for low
frequency clocks which allows to keep logic simpler than implementing
different logic for higher vs slows clocks with respect to sample rate.

Change-Id: I054083358305124406294511b2d03554ee586557
Signed-off-by: Vivek Aknurwar <viveka@codeaurora.org>
2020-08-12 21:40:57 -07:00
Guru Das Srinagesh
08189eda69 leds: qti-flash: Fix early return in qti_flash_led_disable()
When attempting to disable a flash node that is not configured, return
gracefully as it is not an error condition.

Change-Id: I3cf82eddc4ac078384a5278bd2832f7adceba853
Signed-off-by: Guru Das Srinagesh <gurus@codeaurora.org>
2020-08-12 16:51:52 -07:00
Mayank Rana
8beb58f702 sound: usb: Add NULL check against udev with uaudio_dev_cleanup() API
uaudio_dev_cleanup() API can be called from ADSP SSR context (from work
context) and USB headset disconnect context. When USB headset is being
removed, driver sends disconnect notification to ADSP firmware and it can
be blocked for 10 seconds (timeout) before calling uaudio_dev_cleanup().
If this thread is block (possibly due to ADSP SSR), and in parallel driver
is handling ADSP SSR notification, driver is releasing all resource
including secondary event ring. Once above thread unblocks or timeout, it
goes try to release secondary USB event ring. As uaudio_dev_cleanup() is
already being called, and release secondary USB event ring, it shall see
udev->dev as NULL. Fix this issue by adding explicit check against udev
with uaudio_dev_cleanup() API.

Change-Id: I1e2e4a61dcbea4c0570ac97677bf74b453fac82c
Signed-off-by: Mayank Rana <mrana@codeaurora.org>
2020-08-12 15:52:27 -07:00
Bhaumik Bhatt
31bcfbf6ec msm: pcie: fix race between DRV suspend/resume and RPMSG operations
There can exist a possible race between a DRV suspend/resume and
the RPMSG probe/remove operations leading to a use after free
scenario from the RC driver. To avoid this, introduce a mutex to
lock RPMSG specific areas and mainly block GLINK from freeing the
rpdev if RC driver is currently performing any DRV suspend/resume
operation using rpmsg_trysend() or rpmsg_send().

Change-Id: If46d5af3a924bee8360fae5bfc3d42bb494f620d
Signed-off-by: Bhaumik Bhatt <bbhatt@codeaurora.org>
2020-08-12 15:36:34 -07:00
Bhaumik Bhatt
b7973a46f5 mhi: core: Add missing EXPORT_SYMBOL for some public APIs
There was a missing EXPORT_SYMBOL() for some public APIs. Add
those statements to ensure clean builds so KOs can use them.

Change-Id: Iaac851ddad0b729208804320f02133d0fa039615
Signed-off-by: Bhaumik Bhatt <bbhatt@codeaurora.org>
2020-08-12 14:04:43 -07:00
Channagoud Kadabi
dca86b7f36 kernel: time: Fix accuracy for low resolution timer
timer wheel calculates the index for any timer based on the expiry
value and level granularity of the timer. Due to the level granularity
timer will not fire at the exact time instead expire at a time value
expires + granularity. This is done in the timer code when the index for
each timer is calculated based on the expiry and granularity at each
level:

 expires = (expires + LVL_GRAN(lvl)) >> LVL_SHIFT(lvl);

For devfreq drivers the requirement is to fire the timer at the exact
time. If the timer does not expire at the exact time then it'll take
much longer to react and increase the device frequency. Devfreq driver
registers timer for 10ms expiry and due to slack in timer code the
expirty happens at 20 ms. For eg: Frame rendering time is 16ms.
If devfreq driver reacts after 20ms instead of 10ms, that's
way past a frame rendering time.

Timers with 10ms to 630ms expiry fall under level 0, to overcome the
granularity issue for level 0 with low expirty values do not add the
granularity by introducing a new function calc_index_min_granularity.

Change-Id: I60f6f4394de4b5f409829de9734645e1a0d7659e
Signed-off-by: Channagoud Kadabi <ckadabi@codeaurora.org>
Signed-off-by: Rishabh Bhatnagar <rishabhb@codeaurora.org>
[eberman@codeaurora.org: simplify to one function]
Signed-off-by: Elliot Berman <eberman@codeaurora.org>
2020-08-12 10:53:10 -07:00
Manikandan Mohan
0edb6e7866 cnss_utils: Increase unsafe channel max num for 6G
2G+5G+6G, total channel num is 157 until now, increase unsafe channel max
num to avoid out of buffer.

Change-Id: I1e433c0bd88290bb5493b2c4b0bda86e17b04a01
CRs-Fixed: 2752689
Signed-off-by: Jianmin Zhu <jianminz@codeaurora.org>
Signed-off-by: Manikandan Mohan <manikand@codeaurora.org>
2020-08-12 09:58:24 -07:00
Ronak Vijay Raheja
9ffbd89c4a USB: gadget: composite: Allow bMaxPower=0 if self-powered
Currently the composite driver encodes the MaxPower field of the
configuration descriptor by reading the c->MaxPower of the
usb_configuration only if it is non-zero, otherwise it falls back to using
the value hard-coded in CONFIG_USB_GADGET_VBUS_DRAW. However, there may be
times when a configuration may need to explicitly set the bMaxPower to 0,
particularly if its bmAttributes also has the Self-Powered bit set, which
is a legal combination.

This is specifically called out in the USB PD specification section 9.1,
where a PDUSB device "shall report zero in the bMaxPower field after
negotiating a mutually agreeable Contract", and is also verified by the
USB Type-C Functional Test TD.4.10.2 Sink Power Precedence Test.

This fix allows the c->MaxPower to be used for encoding the bMaxPower even
if it is 0, if the self-powered bit is also set. A typical usage of this
would be for the configFS gadget to be dynamically updated by userspace
when the Type-C connection is determined to be operating in Power Delivery
mode.

Change-Id: I9fce2123b23ca3fe250940757002669ab92cb21f
Signed-off-by: Ronak Vijay Raheja <rraheja@codeaurora.org>
2020-08-12 09:42:51 -07:00
qctecmdr
b490abfe54 Merge "spi: spi-msm-geni: Propagate change form 4.14 to 5.4" 2020-08-12 08:32:00 -07:00
qctecmdr
96b195bfea Merge "RTC6226: send the SEEK COMPLETE event when seek cancel" 2020-08-12 08:31:59 -07:00
qctecmdr
6f029619c3 Merge "drivers: edac: Add panic notifier for kryo EDAC device" 2020-08-12 08:31:59 -07:00
qctecmdr
5c1ecb0982 Merge "msm: kgsl: Use the correct pointer for preemption records" 2020-08-12 08:31:59 -07:00
qctecmdr
7a70f58db5 Merge "RTC6226: disable the RDS during scan operation" 2020-08-12 08:31:58 -07:00
qctecmdr
ce658c97e0 Merge "soc: qcom: Add support to enable eud if enabled in xbl" 2020-08-12 08:31:58 -07:00
qctecmdr
6cd4d00ca9 Merge "firmware: qcom_scm: Set DMA coherent mask as well as the streaming mask" 2020-08-12 08:31:57 -07:00
qctecmdr
8a6bfe1047 Merge "scsi: ufs: Add workaround to bypass cfgready signal for UFS gear4" 2020-08-12 08:31:57 -07:00
qctecmdr
0ab5a5fc61 Merge "Merge android11-5.4.57 (3f413d0) into msm-5.4" 2020-08-12 08:31:57 -07:00
Jeya R
7bb35d6695 msm: ADSPRPC: Size check before allocating memory from DMA
For allocating memory from DMA we need to do a size check.
This validation is required to avoid any improper paging
request. We already have the range in which the size is
expected to be.

Change-Id: I20a843366a7f3e3e21cef89cf1ea5bec3f93ab2d
Acked-by: Ekansh Gupta <ekangupt@qti.qualcomm.com>
Signed-off-by: Jeya R <jeyr@codeaurora.org>
2020-08-12 08:25:56 -07:00