Commit graph

894,770 commits

Author SHA1 Message Date
qctecmdr
530d87338f Merge "driver: pinctrl: Add reserved GPIOs for Yupik" 2021-01-07 19:00:56 -08:00
qctecmdr
6c2032cc4f Merge "defconfig: Remove CONFIG_CNSS_QCA6490" 2021-01-07 19:00:56 -08:00
Lijuan Gao
d67ee519ee firmware: qcom_scm: Add calls to support MSS restart
Add SCM calls to support MSS restart for pil modem.

Change-Id: Ic2a62ca9371f299fd750cbff28443b9e67751f8a
Signed-off-by: Lijuan Gao <lijuang@codeaurora.org>
2021-01-08 10:26:49 +08:00
Masaya Takahashi
5327444e83 ANDROID: GKI: Add Sony KMI symbol list
add initial abi_gki_aarch64_sony file.

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

5 Added functions:

  [A] 'function gpio_desc* devm_gpiod_get_from_of_node(device*, device_node*, const char*, int, gpiod_flags, const char*)'
  [A] 'function void devm_gpiod_unhinge(device*, gpio_desc*)'
  [A] 'function const char* devm_kstrdup_const(device*, const char*, gfp_t)'
  [A] 'function void led_trigger_blink_oneshot(led_trigger*, unsigned long int*, unsigned long int*, int)'
  [A] 'function int request_any_context_irq(unsigned int, irq_handler_t, unsigned long int, const char*, void*)'

Bug: 176874947
Change-Id: Ic17a468ed326e94263e636df6ca75b2fbcced7f6
Signed-off-by: Masaya Takahashi <masaya.a.takahashi@sony.com>
2021-01-08 10:14:50 +09:00
Sean Tranchetti
d380e5a0a5 net: ipv6: fib: flush exceptions when purging route
Route removal is handled by two code paths. The main removal path is via
fib6_del_route() which will handle purging any PMTU exceptions from the
cache, removing all per-cpu copies of the DST entry used by the route, and
releasing the fib6_info struct.

The second removal location is during fib6_add_rt2node() during a route
replacement operation. This path also calls fib6_purge_rt() to handle
cleaning up the per-cpu copies of the DST entries and releasing the
fib6_info associated with the older route, but it does not flush any PMTU
exceptions that the older route had. Since the older route is removed from
the tree during the replacement, we lose any way of accessing it again.

As these lingering DSTs and the fib6_info struct are holding references to
the underlying netdevice struct as well, unregistering that device from the
kernel can never complete.

Change-Id: I9df223ea065379a6e812a88dbc4ed28a26ee62dd
Signed-off-by: Sean Tranchetti <stranche@codeaurora.org>
2021-01-07 13:37:28 -08:00
Sushmita Susheelendra
b749c66631 msm: kgsl: Fix adreno_cmdbatch_retired tracepoint format
The adreno_cmdbatch_retired tracepoint originally used the string
"ctx_prio". This changed when adding dispatch on GMU support to
"prio". Changing this back to the original so that external parsers
are not impacted.

Change-Id: I89010509ac4cc0db03fcdee302bbe28db604f66c
Signed-off-by: Sushmita Susheelendra <ssusheel@codeaurora.org>
2021-01-07 13:12:32 -07:00
Deepak Kumar
76c5e0784d msm: kgsl: Enable ACD feature support for A660 variant
Adaptive Clock Distribution (ACD) is a power saving feature
to mitigate voltage droops.

Change-Id: Ic2517010726caa33f3e9d08ed7bd66466bead730
Signed-off-by: Deepak Kumar <dkumar@codeaurora.org>
2021-01-07 20:45:44 +05:30
Yadu MG
45f14f2270 defconfig: gen3auto: Enable cpufreq governors
Enable Userspace and Ondemand cpufreq governors for
gen3auto targets.

Change-Id: I1645166dcf43508d3219b62e9a7883eaeaff8e2a
Signed-off-by: Yadu MG <ymg@codeaurora.org>
2021-01-07 20:45:13 +05:30
Wu Gao
87b8807966 cnss2: Avoid to reject suspend pci for non DRV connected platform
For no DRV connected platform, it will reject to suspend pci since
DISABLE_DRV bit isn't set. So check both flags firstly before suspend
pci.

Change-Id: Ifc3de23def6537165f69dd6ca07da9f57f136607
Signed-off-by: Wu Gao <wugao@codeaurora.org>
2021-01-07 22:33:31 +08:00
Nitin Rawat
7b4636eac2 scsi: ufs: Disable interrupt in reset path
During error scenarios, while error handler is
in middle of resetting the host controller, we
might get a line reset which may result isr handler
trying to access UFS register. But since controller
is in reset state, SW won't have access to controller
register which will lead to noc error.

Change-Id: I5aab4dba1b12be9473bd91764307e16b7ef2f279
Signed-off-by: Nitin Rawat <nitirawa@codeaurora.org>
2021-01-07 19:10:44 +05:30
Jagadeesh Kona
05e05d692f clk: qcom: debugcc-yupik: Update all PCIE clocks to measure only
PCIE clocks are not controlled from HLOS in YUPIK. But in order
to measure them from HLOS, update all PCIE clocks to measure only.

Change-Id: I8749032c187694bb57bf89feccf129fd4c6b7299
Signed-off-by: Jagadeesh Kona <jkona@codeaurora.org>
2021-01-07 16:23:19 +05:30
Naina Mehta
67d881e295 driver: pinctrl: Add reserved GPIOs for Yupik
Certain GPIOs are reserved for secure world and cannot be accessed by HLOS.
Supply "reserved_gpios" to msm_pinctrl to mark these pins as invalid.

Change-Id: I7ff8444af2819a68c60e66bd4e4e9f5ecf4990fa
Signed-off-by: Naina Mehta <nainmeht@codeaurora.org>
2021-01-07 00:05:42 -08:00
Mohammed Siddiq
e0b8186767 cnss2: Add delay for pci link training retries
Add delay for pci link training retries during pci resume
done for pci link recovery.

Change-Id: Idb32ec833dbf5828afecaafb7197c3f40529a839
Signed-off-by: Mohammed Siddiq <msiddiq@codeaurora.org>
2021-01-06 20:40:59 -08:00
Bhaumik Bhatt
85a71cb100 bus: mhi: core: Address pending BW requests for legacy mode
It cannot be guaranteed that certain legacy mode controllers stay
in M0 while a BW request is being processed. Ensure that those
pending BW requests are addressed when M0 entry occurs after a BW
request is processed but not responded to.

Change-Id: I6132116fae76fa10477aa7061c24f3ff5ac60a34
Signed-off-by: Bhaumik Bhatt <bbhatt@codeaurora.org>
2021-01-06 18:05:33 -08:00
Ritesh Kumar
bd5377681e input: touchscreen: nt36xxx: Expose trusted touch event
Expose trusted touch event through sysfs node for TUI
error handling.

Change-Id: Ib303d36e3b807c770f670abc2a2ee3e3fd2e009d
Signed-off-by: Ritesh Kumar <riteshk@codeaurora.org>
2021-01-06 13:17:18 -08:00
Ritesh Kumar
c30aa8dbe9 input: touchscreen: nt36xxx: Block resume work on PVM
While trusted touch is underway, block resume work
to flush touch FIFO since ownership of register space
is with Trusted VM.

Change-Id: Ib87a81aa8f39631ae3f3ea44f4a5dee4563bc514
Signed-off-by: Ritesh Kumar <riteshk@codeaurora.org>
2021-01-07 02:46:49 +05:30
Ritesh Kumar
96ea71a1c2 input: touchscreen: nt36xxx: release i2c session early
Release I2C session lock before releasing IO regions in TVM
during trusted touch scenario.

Change-Id: Ibd3b63e5d084097eb464e3697b8d7d82ea17262e
Signed-off-by: Ritesh Kumar <riteshk@codeaurora.org>
2021-01-06 12:42:26 -08:00
Ritesh Kumar
27da55afee arm64: defconfig: Enable novatek trusted touch for genericarmv8
Enable Trusted touch config in genericarmv8 defconfig for
novatek touch driver.

Change-Id: Ic96ec1971314479ed809c1d3b403237c258a7e5f
Signed-off-by: Ritesh Kumar <riteshk@codeaurora.org>
2021-01-06 12:42:18 -08:00
Ritesh Kumar
cccc78c256 arm64: defconfig: Enable novatek trusted touch on lahaina
Add trusted touch support to Lahaina GKI defconfig for
novatek touch driver.

Change-Id: I7da16992f20fee569f2b8da583543338ad3175d8
Signed-off-by: Ritesh Kumar <riteshk@codeaurora.org>
2021-01-06 12:42:11 -08:00
Ritesh Kumar
36f6aedb51 input: touchscreen: nt36xxx: Add trusted touch support
Add Trusted touch support to nt36xxx Touchscreen driver.
This feature enables driver to operate in trusted touch
mode in trusted virtual machine(TVM). The primary virtual
machine(PVM) lends resources such as IO memory and touch
irq to TVM prior to trusted touch is initiated and
reclaims those resources back after trusted touch usecase
finishes. The resource requirements of TVM such as clock,
regulators etc are taken care by PVM. Introduce state
machine for various checkpoints in trusted touch usecase.
In error scenarios, this state machine helps driver to
rollback to previous state.

Change-Id: I5000ba016cee21c7b6b6beab8a7bb15a8c23f8d5
Signed-off-by: Ritesh Kumar <riteshk@codeaurora.org>
2021-01-06 12:42:01 -08:00
Jagadeesh Kona
920c63faca arm64: defconfig: Add support for DISPCC and debugCC for YUPIK
Enable Display and debug clock controllers for YUPIK.

Change-Id: I1d458d091c57011f6e9780956769051b4760eb18
Signed-off-by: Jagadeesh Kona <jkona@codeaurora.org>
2021-01-07 01:38:45 +05:30
Jagadeesh Kona
f1a099474f clk: qcom: debugcc: Add debug clock controller support for YUPIK
Add debug clock controller to support measure functionality for
all clock controllers.

Change-Id: I45d097d077c50efcde3d4a31b3b601deab9c1059
Signed-off-by: Jagadeesh Kona <jkona@codeaurora.org>
2021-01-07 01:38:35 +05:30
Jagadeesh Kona
8b82fcc32c clk: qcom: dispcc: Add display clock controller for YUPIK
Add the display clock controller to support display port
related branches, PLLs and RCGs.

Change-Id: I3b9c15e1eab364250300d1ff9121285a044ced2e
Signed-off-by: Jagadeesh Kona <jkona@codeaurora.org>
2021-01-07 01:00:45 +05:30
jian.gong
158eae7173 ANDROID: ABI: update symbols of unisoc whitelist
Update whitelist for the symbols used by the unisoc device and
updates the ABI representation accordingly

Leaf changes summary: 11 artifacts changed
Changed leaf types summary: 0 leaf type changed
Removed/Changed/Added functions summary: 0 Removed, 0 Changed, 10 Added functions
Removed/Changed/Added variables summary: 0 Removed, 0 Changed, 1 Added variable

10 Added functions:

  [A] 'function void clocks_calc_mult_shift(unsigned int*, unsigned int*, unsigned int, unsigned int, unsigned int)'
  [A] 'function void cpufreq_add_update_util_hook(int, update_util_data*, void (update_util_data*, typedef u64, unsigned int)*)'
  [A] 'function void cpufreq_remove_update_util_hook(int)'
  [A] 'function kobject* get_governor_parent_kobj(cpufreq_policy*)'
  [A] 'function void gov_attr_set_get(gov_attr_set*, list_head*)'
  [A] 'function void gov_attr_set_init(gov_attr_set*, list_head*)'
  [A] 'function unsigned int gov_attr_set_put(gov_attr_set*, list_head*)'
  [A] 'function bool have_governor_per_policy()'
  [A] 'function void irq_work_sync(irq_work*)'
  [A] 'function mbox_chan* mbox_request_channel_byname(mbox_client*, const char*)'

1 Added variable:

  [A] 'const sysfs_ops governor_sysfs_ops'

Bug: 175337500
Change-Id: Ibca2d9ef71b8f91e0ea62de4509f75ee902d30a4
Signed-off-by: jian.gong <jian.gong@unisoc.com>
2021-01-06 12:28:24 +00:00
Kavya Nunna
dfc409f9b1 power: smb1351-charger: Add support for OTG IRQ
SMB1351 does not have a USB_ID detection logic. Add support
for handling the ID detection over a dedicated GPIO.

Change-Id: Iadaf9344ab00bec1b173516a5004187e98e89302
Signed-off-by: Kavya Nunna <knunna@codeaurora.org>
2021-01-06 17:23:02 +05:30
Will Deacon
39327dc306 ANDROID: usb: f_accessory: Don't drop NULL reference in acc_disconnect()
If get_acc_dev() fails to obtain a reference to the current device,
acc_disconnect() will attempt to put_acc_dev() with the resulting NULL
pointer, leading to a crash:

 | Unable to handle kernel NULL pointer dereference at virtual address 00000074
 | [...]
 | [<c0abb288>] (acc_disconnect) from [<c0a91a38>] (android_disconnect+0x1c/0x7c)
 | [<c0a91a38>] (android_disconnect) from [<c0a93958>] (usb_gadget_udc_reset+0x10/0x34)
 | [<c0a93958>] (usb_gadget_udc_reset) from [<c0a4a9c4>] (dwc3_gadget_reset_interrupt+0x88/0x4fc)
 | [<c0a4a9c4>] (dwc3_gadget_reset_interrupt) from [<c0a491f8>] (dwc3_process_event_buf+0x60/0x3e4)
 | [<c0a491f8>] (dwc3_process_event_buf) from [<c0a49180>] (dwc3_thread_interrupt+0x24/0x3c)
 | [<c0a49180>] (dwc3_thread_interrupt) from [<c02b3404>] (irq_thread_fn+0x1c/0x58)
 | [<c02b3404>] (irq_thread_fn) from [<c02b326c>] (irq_thread+0x1ec/0x2f4)
 | [<c02b326c>] (irq_thread) from [<c0260804>] (kthread+0x1a8/0x1ac)
 | [<c0260804>] (kthread) from [<c0200138>] (ret_from_fork+0x14/0x3c)

Follow the pattern used elsewhere, and return early if we fail to obtain
a reference.

Bug: 173789633
Reported-by: YongQin Liu <yongqin.liu@linaro.org>
Signed-off-by: Will Deacon <willdeacon@google.com>
Change-Id: I37a2bff5bc1b6b8269788d08191181763bf0e896
Signed-off-by: Giuliano Procida <gprocida@google.com>
2021-01-06 09:21:17 +00:00
Will Deacon
e0ea2cf766 ANDROID: usb: f_accessory: Avoid bitfields for shared variables
Using bitfields for shared variables is a "bad idea", as they require
a non-atomic read-modify-write to be generated by the compiler, which can
cause updates to unrelated bits in the same word to disappear.

Ensure the 'online' and 'disconnected' members of 'struct acc_dev' are
placed in separate variables by declaring them each as 'int'.

Bug: 173789633
Signed-off-by: Will Deacon <willdeacon@google.com>
Change-Id: Ia6031d82a764e83b2cc3502fbe5fb273511da752
Signed-off-by: Giuliano Procida <gprocida@google.com>
2021-01-06 09:21:17 +00:00
Will Deacon
13dd1a33bc ANDROID: usb: f_accessory: Cancel any pending work before teardown
Tearing down and freeing the 'acc_dev' structure when there is
potentially asynchronous work queued involving its member fields is
likely to lead to use-after-free issues.

Cancel any pending work before freeing the structure.

Bug: 173789633
Signed-off-by: Will Deacon <willdeacon@google.com>
Change-Id: I68a91274aea18034637b738d558d043ac74fadf4
Signed-off-by: Giuliano Procida <gprocida@google.com>
2021-01-06 09:21:17 +00:00
Will Deacon
f0e78b6595 ANDROID: usb: f_accessory: Don't corrupt global state on double registration
If acc_setup() is called when there is already an allocated instance,
misc_register() will fail but the error path leaves a dangling pointer
to freed memory in the global 'acc_dev' state.

Fix this by ensuring that the refcount is zero before we start, and then
using a cmpxchg() from NULL to serialise any concurrent initialisers.

Bug: 173789633
Signed-off-by: Will Deacon <willdeacon@google.com>
Change-Id: I2c26289dcce7dbc493964516c49b05d04aaa6839
Signed-off-by: Giuliano Procida <gprocida@google.com>
2021-01-06 09:21:17 +00:00
Will Deacon
7f7a5de5ec ANDROID: usb: f_accessory: Fix teardown ordering in acc_release()
acc_release() attempts to synchronise with acc_open() using an atomic
'open_excl' member in 'struct acc_dev'. Unfortunately, acc_release()
prematurely resets this atomic variable to zero, meaning there is a
potential race on 'dev->disconnected':

acc_open()				acc_release()
						atomic_xchg(open_excl), 0)
	atomic_xchg(open_excl, 1)
	dev->disconnected = 0;			dev->disconnected = 1;

Fix the race by ensuring that the 'disconnected' field is written
before clearing 'open_excl' in acc_release().

Bug: 173789633
Signed-off-by: Will Deacon <willdeacon@google.com>
Change-Id: Ib9a21f2305f6d70de3e760da62dbfdd66889200a
Signed-off-by: Giuliano Procida <gprocida@google.com>
2021-01-06 09:21:16 +00:00
Will Deacon
cfe6761167 ANDROID: usb: f_accessory: Add refcounting to global 'acc_dev'
Add refcounting to track the lifetime of the global 'acc_dev' structure,
as the underlying function directories can be removed while references
still exist to the dev node.

Bug: 173789633
Signed-off-by: Will Deacon <willdeacon@google.com>
Change-Id: I248408e890d01167706c329146d63b64a6456df6
Signed-off-by: Giuliano Procida <gprocida@google.com>
2021-01-06 09:21:16 +00:00
Will Deacon
62adf8c605 ANDROID: usb: f_accessory: Wrap '_acc_dev' in get()/put() accessors
The '_acc_dev' global variable is a fancy use-after-free factory. Wrap
it in some get()/put() functions in preparation for introducing some
refcounting.

Bug: 173789633
Signed-off-by: Will Deacon <willdeacon@google.com>
Change-Id: I4c839627648c209341a81efa0c001c8d71b878d4
Signed-off-by: Giuliano Procida <gprocida@google.com>
2021-01-06 09:21:16 +00:00
Will Deacon
21d2a9d7c7 ANDROID: usb: f_accessory: Remove useless assignment
acc_alloc_inst() assigns to a local 'dev' variable, but then never uses
it. Remove the redundant assignment, and the local variable along with
it.

Bug: 173789633
Signed-off-by: Will Deacon <willdeacon@google.com>
Change-Id: Ide9c2e89fb12b846eb8739b302d1b742fc7eb6b5
Signed-off-by: Giuliano Procida <gprocida@google.com>
2021-01-06 09:21:16 +00:00
Will Deacon
82262d09f1 ANDROID: usb: f_accessory: Remove useless non-debug prints
Remove some useless print statements, as they can trivially be used to
spam the console and don't report anything meaningful.

Bug: 173789633
Signed-off-by: Will Deacon <willdeacon@google.com>
Change-Id: I28052010fc3ec033a2c99efeb3f6c919d54d75c2
Signed-off-by: Giuliano Procida <gprocida@google.com>
2021-01-06 09:21:16 +00:00
Will Deacon
4df304a4df ANDROID: usb: f_accessory: Remove stale comments
Neither acc_gadget_bind() nor acc_gadget_register_driver() exist, so
remove the stale comments that refer to them.

Bug: 173789633
Signed-off-by: Will Deacon <willdeacon@google.com>
Change-Id: If396ba3bcac3ca59c48e5a5faa0a8520534ed625
Signed-off-by: Giuliano Procida <gprocida@google.com>
2021-01-06 09:21:16 +00:00
Vijayavardhan Vennapusa
a917582672 ANDROID: USB: f_accessory: Check dev pointer before decoding ctrl request
In case of poweroff charging mode, accessory function instance
is not created and due to this, _acc_dev will be NULL. If target
is connected to Accessory dock in poweroff charging mode, there
is a chance dev pointer is accessed, which is NULL. Hence add a
check before processing control request and return error if it is
NULL.

Bug: 141002587
Change-Id: I4f1deb9d764b8c0bd1d7837cbc43a2933167f568
Signed-off-by: Vijayavardhan Vennapusa <vvreddy@codeaurora.org>
Signed-off-by: Jack Pham <jackp@codeaurora.org>
Signed-off-by: Giuliano Procida <gprocida@google.com>
2021-01-06 09:21:16 +00:00
Anmolpreet Kaur
4ffa5be260 smcinvoke: Correct logging message
Add correct logs on error conditions
for correct debugging.

Change-Id: I4ca034f2c0c86b637924bbf27990eb4b099a5eda
Signed-off-by: Anmolpreet Kaur <anmolpre@codeaurora.org>
2021-01-06 14:14:56 +05:30
Kavya Nunna
ad4702457c power: supply: smb1351: Add support to make SMB1351 driver GKI complaint
Replace existing non standard power supply properties with standard power
supply properties to make the smb1351 driver GKI complaint.

Change-Id: Iec18b6f267c30739928d85fd10ca676b17102a11
Signed-off-by: Kavya Nunna <knunna@codeaurora.org>
2021-01-06 13:25:44 +05:30
Shreyas K K
b3c4d2fb9e defconfig: gen3auto: Enable service locator and notifier
Enable service locator and service notifier on gen3auto.

Change-Id: Ida4e037808c50fca8096fba8d24e16c5a4af6bb3
Signed-off-by: Shreyas K K <shrekk@codeaurora.org>
2021-01-06 13:04:41 +05:30
Shreyas K K
d843632ad7 defconfig: gen3auto: Enable PIL & SSR drivers
Enable PIL, SSR and related drivers to load firmware
images for other subsystems and send out notifications
about subsystem states.

Change-Id: Ic85175ddf17486e21427dc1c8540b8016ca6aa9e
Signed-off-by: Vivek Kumar <vivekuma@codeaurora.org>
Signed-off-by: Shreyas K K <shrekk@codeaurora.org>
2021-01-06 13:02:55 +05:30
Yong Ding
cdd72fdb19 soc: qcom: add HAB driver
Add snapshot for HAB from msm-4.14 commit b1ff2848541a
 (soc: qcom: hab: fix memory leak).

Change-Id: I88cdfd2c3530320b80a64f294b59611d4a80cc08
Signed-off-by: Yong Ding <yongding@codeaurora.org>
2021-01-06 15:02:04 +08:00
Neeraja P
9d5f8de63c msm: kgsl: Deregister gpu address on memdesc_sg_virt failure
When memdesc_sg_virt returns error in kgsl_setup_anon_useraddr function,
the gpu address registered in SVM region will not be deregistered.
This change deregisters the gpu address on memdesc_sg_virt failure.

Change-Id: Ic99167e283a0c6331bb9f5f0b608b6cdb3c918e4
Signed-off-by: Neeraja P <neerp@codeaurora.org>
2021-01-06 10:46:19 +05:30
Tengfei Fan
56ccdba8b9 soc: qcom: pil: add driver name for support debug
Add driver name in debug log for support other team
debug driver.

Change-Id: I007f42fd03bc308d77e29fa2df1693ce46c8fd37
Signed-off-by: Tengfei Fan <tengfeif@codeaurora.org>
2021-01-06 13:15:42 +08:00
Prakash Gupta
da907495ce iommu/arm-smmu: fix out of bound iova fault handling
qsmmuv500_iova_to_phys checks for out of bound iova and skips ECATS
operations.  While this is optimal, this also skips resuming stalled CB.
As part of S1 context fault handling iova_to_phys is followed by tlb
invalidation and sync.  With context bank in stall state, the sync
operation will timeout.

Example:

arm-smmu: FAR    = 0x000102325429beb4
arm-smmu: PAR    = 0x0000000000000000
arm-smmu: FSR    = 0x40000402 [TF R SS ]
arm-smmu: ECATS: address out of bounds: 0x000102325429beb4
arm-smmu: ECATS: address out of bounds: 0x000102325429beb4

arm-smmu: TLB sync timed out -- SMMU may be deadlocked

Call trace:
 qsmmuv500_tlb_sync_timeout+0x360
 __arm_smmu_tlb_sync+0x2b4
 arm_smmu_tlb_sync_context+0x4c
 arm_smmu_tlb_inv_context_s1+0x1ec
 arm_smmu_context_fault+0xb84
 irq_thread_fn+0x44
 irq_thread+0x160
 kthread+0x16c
 ret_from_fork+0x10

Fix this by resuming the context bank before bailing out for out of bound
iova.

Change-Id: I754b38a3761869a5f0c00688211d26f1b0f47eec
Signed-off-by: Prakash Gupta <guptap@codeaurora.org>
2021-01-06 10:06:45 +05:30
Zhao, Yuan
6f77167907 clk: qcom: check for change in RCG configuration during set_rate
For DSI byte clock RCG, check if there is a change in existing
settings before updating RCG configuration. This is needed to
avoid glitch on the display panel when there is a change in the
DSI byte clock frequency with display enabled.

Change-Id: I8ef0331cbb466b399cd12199b4d335ed44997dbc
Signed-off-by: Padmanabhan Komanduru <pkomandu@codeaurora.org>
Signed-off-by: Ritesh Kumar <riteshk@codeaurora.org>
Signed-off-by: Zhao, Yuan <yzhao@codeaurora.org>
2021-01-05 18:50:18 -08:00
Roman Kiryanov
d61ede24cb ANDROID: Update abi_gki_aarch64_goldfish
Fixes `virtio_wifi: Unknown symbol ieee80211_tx_status_ext (err -2)`

build/abi/extract_symbols out/android11-5.4/dist/ --whitelist common/android/abi_gki_aarch64_goldfish

Bug: 176831960
Test: none
Signed-off-by: Roman Kiryanov <rkir@google.com>
Change-Id: I07671dd29079588cad5e3984427a8ca0ad389e9a
2021-01-05 16:39:01 -08:00
Yue Ma
4677037793 cnss2: Always collect dump if detect FW assert during shutdown
Currently if CONFIG_CNSS2_DEBUG is not enabled, driver won't collect
FW dump even there is a FW assert during shutdown. This can result
lose FW dump since device will be powered off. Fix it by collecting
dump always in such scenario.

Change-Id: Iedaf7c48f9b622fb4a5215178027467adda58ef8
Signed-off-by: Yue Ma <yuem@codeaurora.org>
2021-01-05 16:04:43 -08:00
Saravana Kannan
c29fbd7cd7 UPSTREAM: driver core: Fix lockdep warning on wfs_lock
There's a potential deadlock with the following cycle:
wfs_lock --> device_links_lock --> kn->count

Fix this by simply dropping the lock around a list_empty() check that's
just exported to a sysfs file. The sysfs file output is an instantaneous
check anyway and the lock doesn't really add any protection.

Lockdep log:

[   48.808132]
[   48.808132] the existing dependency chain (in reverse order) is:
[   48.809069]
[   48.809069] -> #2 (kn->count){++++}:
[   48.809707]        __kernfs_remove.llvm.7860393000964815146+0x2d4/0x460
[   48.810537]        kernfs_remove_by_name_ns+0x54/0x9c
[   48.811171]        sysfs_remove_file_ns+0x18/0x24
[   48.811762]        device_del+0x2b8/0x5a8
[   48.812269]        __device_link_del+0x98/0xb8
[   48.812829]        device_links_driver_bound+0x210/0x2d8
[   48.813496]        driver_bound+0x44/0xf8
[   48.814000]        really_probe+0x340/0x6e0
[   48.814526]        driver_probe_device+0xb8/0x100
[   48.815117]        device_driver_attach+0x78/0xb8
[   48.815708]        __driver_attach+0xe0/0x194
[   48.816255]        bus_for_each_dev+0xa8/0x11c
[   48.816816]        driver_attach+0x24/0x30
[   48.817331]        bus_add_driver+0x100/0x1e0
[   48.817880]        driver_register+0x78/0x114
[   48.818427]        __platform_driver_register+0x44/0x50
[   48.819089]        0xffffffdbb3227038
[   48.819551]        do_one_initcall+0xd8/0x1e0
[   48.820099]        do_init_module+0xd8/0x298
[   48.820636]        load_module+0x3afc/0x44c8
[   48.821173]        __arm64_sys_finit_module+0xbc/0xf0
[   48.821807]        el0_svc_common+0xbc/0x1d0
[   48.822344]        el0_svc_handler+0x74/0x98
[   48.822882]        el0_svc+0x8/0xc
[   48.823310]
[   48.823310] -> #1 (device_links_lock){+.+.}:
[   48.824036]        __mutex_lock_common+0xe0/0xe44
[   48.824626]        mutex_lock_nested+0x28/0x34
[   48.825185]        device_link_add+0xd4/0x4ec
[   48.825734]        of_link_to_suppliers+0x158/0x204
[   48.826347]        of_fwnode_add_links+0x50/0x64
[   48.826928]        device_link_add_missing_supplier_links+0x90/0x11c
[   48.827725]        fw_devlink_resume+0x58/0x130
[   48.828296]        of_platform_default_populate_init+0xb4/0xd0
[   48.829030]        do_one_initcall+0xd8/0x1e0
[   48.829578]        do_initcall_level+0xb8/0xcc
[   48.830137]        do_basic_setup+0x60/0x7c
[   48.830662]        kernel_init_freeable+0x128/0x1ac
[   48.831275]        kernel_init+0x18/0x29c
[   48.831781]        ret_from_fork+0x10/0x18
[   48.832297]
[   48.832297] -> #0 (wfs_lock){+.+.}:
[   48.832922]        __lock_acquire+0xe04/0x2e20
[   48.833480]        lock_acquire+0xbc/0xec
[   48.833984]        __mutex_lock_common+0xe0/0xe44
[   48.834577]        mutex_lock_nested+0x28/0x34
[   48.835136]        waiting_for_supplier_show+0x3c/0x98
[   48.835781]        dev_attr_show+0x48/0xb4
[   48.836295]        sysfs_kf_seq_show+0xe8/0x184
[   48.836864]        kernfs_seq_show+0x48/0x8c
[   48.837401]        seq_read+0x1c8/0x600
[   48.837884]        kernfs_fop_read+0x68/0x204
[   48.838431]        __vfs_read+0x60/0x214
[   48.838925]        vfs_read+0xbc/0x15c
[   48.839397]        ksys_read+0x78/0xe4
[   48.839869]        __arm64_sys_read+0x1c/0x28
[   48.840416]        el0_svc_common+0xbc/0x1d0
[   48.840953]        el0_svc_handler+0x74/0x98
[   48.841490]        el0_svc+0x8/0xc
[   48.841917]
[   48.841917] other info that might help us debug this:
[   48.841917]
[   48.842920] Chain exists of:
[   48.842920]   wfs_lock --> device_links_lock --> kn->count
[   48.842920]
[   48.844152]  Possible unsafe locking scenario:
[   48.844152]
[   48.844895]        CPU0                    CPU1
[   48.845463]        ----                    ----
[   48.846032]   lock(kn->count);
[   48.846417]                                lock(device_links_lock);
[   48.847203]                                lock(kn->count);
[   48.847902]   lock(wfs_lock);
[   48.848276]
[   48.848276]  *** DEADLOCK ***

Reported-by: Cheng-Jui.Wang@mediatek.com
Signed-off-by: Saravana Kannan <saravanak@google.com>
Link: https://lore.kernel.org/r/20201104205431.3795207-1-saravanak@google.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Bug: 171536500
(cherry picked from commit 7008e58c63bc8468e8d16154e25d780198b3ecfc)
Change-Id: Icb98a270d6ff07bcc81a2162ac00493fae6fafe6
2021-01-05 23:13:30 +00:00
David Collins
95d95d5a31 regulator: rpmh-regulator: fix rpmh_regulator_init_vreg_supply memory leak
Commit 29c41d5c47 ("regulator: rpmh-regulator: support parent
supply specification in subnodes") introduced a memory leak in
the function rpmh_regulator_init_vreg_supply() due to 'buf' not
being freed in the new 'else if' statement.  Fix this memory leak
by freeing 'buf' correctly.

Change-Id: If2748b595d8ae3a4564a2956a67aeda476975309
Signed-off-by: David Collins <collinsd@codeaurora.org>
2021-01-05 11:18:13 -08:00
Harshdeep Dhatt
9f96936918 msm: kgsl: Vote for l3 via icc_set_bw
Henceforth, l3 clock is scaled using icc api instead
of the clock api.

Change-Id: I0de3250ed402b940dfb5991ea837edb98734529a
Signed-off-by: Harshdeep Dhatt <hdhatt@codeaurora.org>
2021-01-05 11:54:20 -07:00