Commit graph

892,914 commits

Author SHA1 Message Date
Mike Tipton
aa7d071da6 clk: qcom: gcc-lahaina: Enable clocks for pm8008 by default
The pm8008 regulator is connected over I2C and the I2C device configures
its clocks in runtime_resume and runtime_suspend. These callbacks are
triggered from the pm8008 driver's regmap calls. This means regulator
framework requests for pm8008 call into the clock framework with the
regulator framework locks held. The qcom clock providers also call into
the regulator framework with the clock framework locks held. If thread A
makes a pm8008 request at the same time thread B makes a clock request,
then it can result in deadlocks. Thread A will be stuck waiting on the
clock locks while thread B is stuck waiting on the regulator locks.

To prevent these deadlocks, enable the I2C clocks required for pm8008 by
default during probe and stop registering them with the framework. This
NOPs any client requests, since of_clk_get() returns NULL when passed an
unregistered clock and all other clock APIs return success before
grabbing any locks when passed NULL.

Change-Id: If308d3dab36a1ef9650256a0343789c2aaf56930
Signed-off-by: Mike Tipton <mdtipton@codeaurora.org>
2020-08-14 11:57:28 -07:00
Manikandan Mohan
604d4a0b01 cnss2: Check for FW / IMS status for WFC QMI messages
Drop WFC QMI indications from FW / IMS based on corresponding
connection status withs platform driver.

Change-Id: Ifa5877e551503e371750cbc7fdf958cc975725dd
Signed-off-by: Manikandan Mohan <manikand@codeaurora.org>
2020-08-14 10:36:59 -07:00
Raghu Ananya Arabolu
9a0121f39d msm: kgsl: Add clocks to access KGSL SMMU register space
Add gpu_cc_cx_gmu, gpu_cc_hub_aon & gpu_cc_hub_cx_int clock to the
list of clocks to vote for in order to access the KGSL SMMU register
space.

Change-Id: I84ff20b1c05c9045c3b271cd85ea98957fc4a6ce
Signed-off-by: Raghu Ananya Arabolu <rarabolu@codeaurora.org>
2020-08-14 09:12:30 -07:00
Pankaj Gupta
16492fb266 msm: kgsl: Fix GBIF Halt ack timeout for a619_holi
For a619_holi GPU, use RBBM_GBIF_HALT registers to halt GX
traffic and poll for the ack.

Change-Id: Iaae9084a04a5acc05ae5561d0a3c44da0ab5cebb
Signed-off-by: Pankaj Gupta <gpankaj@codeaurora.org>
2020-08-14 20:41:10 +05:30
Greg Kroah-Hartman
45c452ab9a UPSTREAM: update to latest version of scripts/checkpatch.pl
A number of upstream patches are getting rejected by checkpatch in
treehugger despite following the correct checkpatch rules as they have
changed since the 5.4 release.

So update to the latest version, from 5.9-rc1, to quiet things that are
now valid.

Bug: 164355829
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
(cherry picked from commit a1d21081a60dfb7fddf4a38b66d9cef603b317a9)
Change-Id: Ic3768ec45972d43885fd3170f96ad03dd9d852fc
2020-08-14 13:16:17 +02:00
Ritesh Kumar
94c76c0d74 input: touchscreen: synaptics_tcm: defer probe if panel not found
In many cases display panel information may not be available when the
touch driver is being probed. This change defers the probe if the
panel is not found to ensure that the correct touch driver is probed.

Change-Id: I52b8cd49342b6213639eefb8f10876178612af49
Signed-off-by: Ritesh Kumar <riteshk@codeaurora.org>
2020-08-14 03:01:57 -07:00
Kiwoong Kim
61cc929dd1 FROMLIST: ufs: change the way to complete fDeviceInit
Currently, UFS driver checks if fDeviceInit
is cleared at several times, not period. This patch
is to wait its completion with the period, not retrying.
Many device vendors usually provides the specification on
it with just period, not a combination of a number of retrying
and period. So it could be proper to regard to the information
coming from device vendors.

v1 -> v2: switch the method to get time from jiffies to ktime

Bug: 163478167
Change-Id: I167d8a3480b1a75f6fadb3e73d15d67807608e93
Link: https://lore.kernel.org/linux-scsi/SN6PR04MB4640676A86C1A3C598CD804AFC440@SN6PR04MB4640.namprd04.prod.outlook.com/T/#t
Tested-by: Kiwoong Kim <kwmad.kim@samsung.com>
Signed-off-by: Kiwoong Kim <kwmad.kim@samsung.com>
Reviewed-by: Avri Altman <avri.altman@wdc.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
2020-08-14 08:02:53 +00:00
Kishore Sri venkata Ganesh Bolisetty
b3c09961a7 soc: qcom: msm_perf: use cpuinfo.min/max while adding freq qos request
cpuinfo.min_freq/max_freq gives the real min/max frequencies available.
whereas policy min/max offer current min/max of the policy, which
may be the desired values set by any other client like msm_perf or
even a postboot setting. This can potentially limit min/max
frequencies ranges.

Change-Id: Ia7978ccd99b419f68d06fec24dac1adfacff36b7
Signed-off-by: Kishore Sri venkata Ganesh Bolisetty <bsrivenk@codeaurora.org>
2020-08-14 00:34:20 -07:00
Hareesh Gundu
331ffbaa1a msm: kgsl: Fix GMEM base for A615 family GPUs
For all A615 GPU family GMEM base start with 1MB as
per requirement.

Change-Id: Ie4ca5b9d264492f10eff39daf758d5c72d32c653
Signed-off-by: Hareesh Gundu <hareeshg@codeaurora.org>
2020-08-14 12:29:11 +05:30
Himateja Reddy
f73a335606 msm: adsprpc: allow unsigned PD offload to secure channel
Currently, access to a secure channel is not allowed using the
non-secure device node. However, since OEMs could configure all
remote subsystems as secure, allow access to a secure channel even
when the application has opened the non-secure node, if the domain
supports unsigned PD offload.

Change-Id: I64ad1f57098cedfe2663c2b975c74bfdc74a3947
Acked-by: Thyagarajan Venkatanarayanan <venkatan@qti.qualcomm.com>
Signed-off-by: Himateja Reddy <hmreddy@codeaurora.org>
2020-08-13 23:25:18 -07:00
Harshdeep Dhatt
65172415d1 msm: kgsl: Add suspend_context to gmu based targets
This needs to be explicitly added to the new slumber entry sequence
for gmu and rgmu based targets.

Change-Id: I582067d065b1c58cab3d1d149292dd94e182bd66
Signed-off-by: Harshdeep Dhatt <hdhatt@codeaurora.org>
2020-08-13 23:29:20 -06:00
Harshdeep Dhatt
2b2f29cc50 msm: kgsl: Fix gmu fence error during slumber
There can exist a race where we clear the A6XX_RBBM_INT_0_MASK
register while the gpu is going into IFPC. Fix this by clearing this
register before clearing the OOB.

Change-Id: I08e9dbccbfdbee93ba7ef35fbbc673938ee033da
Signed-off-by: Harshdeep Dhatt <hdhatt@codeaurora.org>
2020-08-13 23:29:19 -06:00
Harshdeep Dhatt
c56b6599e3 msm: kgsl: Kick dcvs in idle thread for gmu targets
This ensures that dcvs runs while the gpu is still actively working
on the same submission for longer than the idle timer.

Change-Id: I85f2ff21dc19a9e589d6ed918bebea4c42b2a39d
Signed-off-by: Harshdeep Dhatt <hdhatt@codeaurora.org>
2020-08-13 23:29:18 -06:00
Harshdeep Dhatt
a8f76a631d msm: kgsl: Fix KGSL_PROP_PWRCTRL property for gmu based targets
This property is used to enable dcvs or disable both dcvs and slumber
using kgsl power state transitions. Since gmu or rgmu based targets
don't use the power states, add and use gmu core flag to enable and disable
slumber for those targets.

Change-Id: Iace3af9427c7b84509c9041604972cf14e7cd675
Signed-off-by: Harshdeep Dhatt <hdhatt@codeaurora.org>
2020-08-13 23:27:59 -06:00
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
Dmitry Shmidt
e1f6aaaa0e ANDROID: GKI: add built-in BCM Bluetooth driver
Bug: 163596438
Bug: 157965270

Change-Id: Ie126f6ab9ab1bce9d2019eb59cb6bc4b88d0a54f
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
2020-08-13 15:07:05 +00:00
Greg Kroah-Hartman
6e8e201587 Revert "Revert "genetlink: remove genl_bind""
This reverts commit 68815d5b7e which was
commit 0845447d9c783a502bd3e13af0f38aa4c7655a77 in 4.19.y and is commit
1e82a62fec613844da9e558f3493540a5b7a7b67 upstream.

It was reported that this issue affects Android devices and a vendor
wishes it to be applied back, ABI is not an issue here.

Leaf changes summary: 5 artifacts changed
Changed leaf types summary: 1 leaf type changed
Removed/Changed/Added functions summary: 0 Removed, 4 Changed, 0 Added function
Removed/Changed/Added variables summary: 0 Removed, 0 Changed, 0 Added variable

4 functions with some sub-type change:
  [C] 'function void genl_notify(const genl_family*, sk_buff*, genl_info*, u32, gfp_t)' at genetlink.c:1109:1 has some sub-type changes:
  [C] 'function int genl_register_family(genl_family*)' at genetlink.h:145:1 has some sub-type changes:
  [C] 'function int genl_unregister_family(const genl_family*)' at genetlink.h:146:1 has some sub-type changes:
  [C] 'function void* genlmsg_put(sk_buff*, unsigned int, unsigned int, const genl_family*, int, unsigned char)' at genetlink.h:150:1 has some sub-type changes:

'struct genl_family at genetlink.h:52:1' changed:
  type size changed from 1024 to 896 (in bits)
  2 data member deletions:
    'int (net*, int)* genl_family::mcast_bind', at offset 512 (in bits) at genetlink.h:67:1
    'void (net*, int)* genl_family::mcast_unbind', at offset 576 (in bits) at genetlink.h:68:1
  there are data member changes:
    'nlattr** genl_family::attrbuf' offset changed from 640 to 512 (in bits) (by -128 bits)
    'const genl_ops* genl_family::ops' offset changed from 704 to 576 (in bits) (by -128 bits)
    'const genl_multicast_group* genl_family::mcgrps' offset changed from 768 to 640 (in bits) (by -128 bits)
    'unsigned int genl_family::n_ops' offset changed from 832 to 704 (in bits) (by -128 bits)
    'unsigned int genl_family::n_mcgrps' offset changed from 864 to 736 (in bits) (by -128 bits)
    'unsigned int genl_family::mcgrp_offset' offset changed from 896 to 768 (in bits) (by -128 bits)
    'module* genl_family::module' offset changed from 960 to 832 (in bits) (by -128 bits)
  4 impacted interfaces

Bug: 163861691
Cc: Sean Tranchetti <stranche@codeaurora.org>
Cc: Will McVicker <willmcvicker@google.com>
Cc: Saravana Kannan <saravanak@google.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: Ieaa81ed2445ff12a9a8e00f69d64c78baeec07e5
2020-08-13 15:45:33 +02: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
Guru Das Srinagesh
3d0a2a4b2b ANDROID: GKI: enable CONFIG_LEDS_TRIGGER_TIMER
Set CONFIG_LEDS_TRIGGER_TIMER=y to enable the "timer" trigger for the
LED subsystem. This creates the sysfs parameters "delay_on" and
"delay_off" for LEDs, which can then be used to specify a blinking
pattern for them.

Bug: 163765274
Change-Id: I66ada688aa5026253e76588ae1d6d85eb4cd8536
Signed-off-by: Guru Das Srinagesh <gurus@codeaurora.org>
[fixed up arm64 config location as it was incorrect - gregkh]
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
2020-08-13 13:22:47 +02: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
Sarthak Garg
5ebc4f0d84 mmc: sdhci-msm: Calculate timeout value based on the base clock
Qcom SDHC uses base clock in calculating the data-timeout
value. So set SDHCI_QUIRK_DATA_TIMEOUT_USES_SDCLK quirk.

The controller internally multiplies the timeout control register
value by 4 while calculating the data timeout, so set timeout_clk_div
as 4 to get the correct data-timeout counter value correctly.

Change-Id: I73feb37f92b4a7a0d740a262a4c68ec458e6d154
Suggested-by: Veerabhadrarao Badiganti <vbadigan@codeaurora.org>
Signed-off-by: Sarthak Garg <sartgarg@codeaurora.org>
2020-08-13 15:38:03 +05:30
Sarthak Garg
6ab3e82f81 mmc: sdhci-msm: Introduce timeout freq divider in sdhci host
Some SD host controllers multiplies the timeout-clk internally while
deriving the timeout value. So allow vendor driver to update the
timeout-clock to get the correct data timeout counter value.

Change-Id: Iacbd98f5251d5312c999478b0d0aac3abc339323
Suggested-by: Veerabhadrarao Badiganti <vbadigan@codeaurora.org>
Signed-off-by: Sarthak Garg <sartgarg@codeaurora.org>
2020-08-13 15:33:52 +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
Steve Muckle
385cd19147 ANDROID: GKI: add abi_gki_aarch64_oplus
Leaf changes summary: 4 artifacts changed
Changed leaf types summary: 0 leaf type changed
Removed/Changed/Added functions summary: 0 Removed, 0 Changed, 4 Added functions
Removed/Changed/Added variables summary: 0 Removed, 0 Changed, 0 Added variable

4 Added functions:

  [A] 'function long long unsigned int drm_crtc_vblank_count(drm_crtc*)'
  [A] 'function wait_queue_head_t* drm_crtc_vblank_waitqueue(drm_crtc*)'
  [A] 'function int remove_proc_subtree(const char*, proc_dir_entry*)'
  [A] 'function long int wait_for_completion_killable_timeout(completion*, unsigned long int)'

Bug: 163074366
Change-Id: I2b3ef4e9e59ebd8168064a88375afd0e6c9769b0
Signed-off-by: Steve Muckle <smuckle@google.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
2020-08-13 11:48:42 +02:00
Greg Kroah-Hartman
93acf35490 ANDROID: GKI: fix up abi .xml file due to previous changes.
b519ac4237 ("ANDROID: vendor_hooks: add waiting information for
blocked tasks") changed the abi, but the definition xml file never got
updated.

Bug: 162776704
Cc: Sangmoon Kim <sangmoon.kim@samsung.com>
Fixes: b519ac4237 ("ANDROID: vendor_hooks: add waiting information for blocked tasks")
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: Ibb92f7c0e29a7a05a997e16a07b05053a6c05ae3
2020-08-13 10:28:54 +02: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