Commit graph

877,558 commits

Author SHA1 Message Date
Harshdeep Dhatt
e13919782c msm: kgsl: Move preemption start to ringbuffer start
We should not be doing anything specific to preemption like
accessing preemption buffers in a6xx_start as a6xx_start is
called for both eCP and non eCP paths.

Change-Id: Ia7f9e7a54bcbbb6365ddd1f621e1c582faabd962
Signed-off-by: Harshdeep Dhatt <hdhatt@codeaurora.org>
2020-01-29 14:17:53 -08:00
Harshdeep Dhatt
840f7b8ab9 msm: kgsl: Move ringbuffer global allocations to init time
With eCP, kgsl will not be allocating these buffers or anything
related to the ringbuffers. Move this to init time so that this
only gets called when eCP is disabled.

Change-Id: I3c492581d904e35e4a58931bdd1f6e83546a3d2c
Signed-off-by: Harshdeep Dhatt <hdhatt@codeaurora.org>
2020-01-29 14:17:51 -08:00
Harshdeep Dhatt
90c1659e71 msm: kgsl: Fix memory leak in a6xx_init
Make sure the power up register list is allocated only
once and not every time a6xx_init gets called.

Change-Id: Ifc46c6307886d3911788001c05640c0029706fc4
Signed-off-by: Harshdeep Dhatt <hdhatt@codeaurora.org>
2020-01-29 14:17:50 -08:00
Harshdeep Dhatt
ef64d261f0 msm: kgsl: Create first_open and last_close
As the name suggests, the first_open is called when the device
is opened for the first time. And last_close is called when last
device instance is closed. This helps with differentiating eCP
and non eCP open within adreno namespace.

Change-Id: Idfbb487313d8be4de9d9785dbcdfb479dbab969e
Signed-off-by: Harshdeep Dhatt <hdhatt@codeaurora.org>
2020-01-29 14:17:48 -08:00
Harshdeep Dhatt
8afc60d2e8 msm: kgsl: Add function to get context bank number
Add a function to find the context bank a pagetable is attached
to.

Change-Id: I967c77e9d2f761440f28973485a8ce02c7d27dce
Signed-off-by: Harshdeep Dhatt <hdhatt@codeaurora.org>
2020-01-29 14:17:28 -08:00
Amir Vajid
2f2af2d5eb Revert "devfreq: bimc_bwmon: Add support to enable BWMON clks"
This reverts commit 4b5e726869.
There is no longer a need to enable BWMON clocks in the kernel
so remove this feature to cleanup the code.

Change-Id: I92493eb04b7d984060f9495a87572ecde3a6dab2
Signed-off-by: Amir Vajid <avajid@codeaurora.org>
2020-01-29 10:17:01 -08:00
Isaac J. Manjarres
b1ca44d69a arm64: defconfig: Enable memory debug configs on Lahaina
Enable several configs related to debugging memory issues
on Lahaina.

Change-Id: I225275846d62f774c05478d12f942b7ea0aedaab
Signed-off-by: Isaac J. Manjarres <isaacm@codeaurora.org>
2020-01-28 21:05:00 -08:00
Jack Pham
2c605b45cc usb: dwc3-msm: Fix out-of-bounds access in bus voting
The for loop in dwc3_msm_update_bus_bw() was using a NULL
condition rather than against ARRAY_SIZE(mdwc->icc_paths).
This can result in an out-of-bounds access if the memory
just beyond the array also happens to be non-zero.

Change-Id: Ib1f003f774b125a156ceb0070cd9d98a4d1f03ee
Signed-off-by: Jack Pham <jackp@codeaurora.org>
2020-01-28 20:19:08 -08:00
Guru Das Srinagesh
218908e848 pwm: pwm-qti-lpg: Refactor qpnp_lpg_parse_dt() for readability
Add helper functions to parse pattern-related properties and related
init logic, and clarify the qpnp_lpg_parse_dt function to make the code
flow clear in the cases wherein either SDAM or LUT, or neither of the
two is specified. Also add of_node_put() statements for the PBS node in
error paths.

Change-Id: I8055c61db9a8283e6c4d9dacf57012ff1d9227dd
Signed-off-by: Guru Das Srinagesh <gurus@codeaurora.org>
2020-01-28 15:09:03 -08:00
Guru Das Srinagesh
6aff5650d7 soc: fsa4480-i2c: Register with UCSI for audio accessory notifications
On Lahaina, the POWER_SUPPLY_PROP_TYPEC_MODE property is not present,
and Type-C specific information flows via the UCSI driver. Therefore,
register with the UCSI driver instead of the power supply framework to
receive notifications about audio accessory attach/detachment.

Change-Id: I129912b6e2e4ce76fd0777db5fa4d42bf1c93a2a
Signed-off-by: Guru Das Srinagesh <gurus@codeaurora.org>
2020-01-28 14:51:20 -08:00
Guru Das Srinagesh
48fdd588e8 ucsi: ucsi_glink: Notify upon change in connector status
Add APIs to allow clients to register for (and unregister from)
receiving notifications whenever a response is received for a
GET_CONNECTOR_STATUS request. Currently the notifications contain only a
single field indicating whether or not a Debug Accessory or an Audio
Adapter Accessory is attached (parsed from the received response).

Change-Id: If1ef46f5f9e4b4fa93f32bfd06fd50c7e16f7874
Signed-off-by: Guru Das Srinagesh <gurus@codeaurora.org>
2020-01-28 14:51:12 -08:00
Siddharth Gupta
188383cf0a linux: scm: Update the API for assign memory to subsys
Update the API of the mdf assign memory to subsys for cases
when the scm driver is not compiled. The current API has an
extra parameter.

Change-Id: I50c100d2ee260a14fe754a8497727b5d37d20610
Signed-off-by: Siddharth Gupta <sidgup@codeaurora.org>
2020-01-28 11:18:01 -08:00
qctecmdr
e1007d065f Merge "sched/fair: consider uclamp boost while deciding the start_cpu" 2020-01-28 08:04:51 -08:00
qctecmdr
b325307ce5 Merge "regulator: qcom_pm8008: correct parent supply voltage voting" 2020-01-28 08:04:50 -08:00
qctecmdr
b1f377f8e9 Merge "iommu/arm-smmu: log outstanding transactions on sync timeout" 2020-01-28 08:04:50 -08:00
qctecmdr
154900b51b Merge "regulator: qcom_pm8008-regulator: correct chip-en chip variable type" 2020-01-28 02:41:33 -08:00
qctecmdr
9d88952dd4 Merge "regulator: refgen: add support for proxy consumers" 2020-01-28 02:41:33 -08:00
qctecmdr
5f6b078629 Merge "msm: pcie: update PCIe RC and MSI driver to compile as GKI modules" 2020-01-28 02:41:31 -08:00
Shyam Kumar Thella
1d8ab6b327 arm64: defconfig: enable flash LED driver on Lahaina
Enable flash LED driver for Lahaina platforms so that camera driver
can use flash/torch devices for its use cases.

Change-Id: I2ccd34887ef8e184124070e37b8c254c2c027e3d
Signed-off-by: Shyam Kumar Thella <sthella@codeaurora.org>
2020-01-28 10:37:01 +05:30
Shyam Kumar Thella
8a6773fc9f leds: add support for QTI flash LED driver
QTI flash LED driver supports flash LED module on PM8350C. It is used
for illumination by camera sensor and also for torch application.

Change-Id: Iaa4754591e37db48c0ab360cdf4660d50c908337
Signed-off-by: Shyam Kumar Thella <sthella@codeaurora.org>
2020-01-28 10:36:53 +05:30
qctecmdr
b7906ffb6d Merge "dwc3: gadget: Fix dr_mode check with USB device mode APIs" 2020-01-27 20:21:00 -08:00
qctecmdr
d0e6ace9d5 Merge "interconnect: qcom: Add QoS config support" 2020-01-27 20:21:00 -08:00
qctecmdr
d129a56a31 Merge "PM / devfreq: Make governor registration less verbose" 2020-01-27 20:20:59 -08:00
qctecmdr
468d86d1fd Merge "wil6210: fix vendor command policy for vendor unspec commands" 2020-01-27 20:20:59 -08:00
qctecmdr
bfab88fcd6 Merge "arm64: defconfig: Enable CMA performance optimizations on Lahaina" 2020-01-27 20:20:59 -08:00
Qais Yousef
09c8865bfc ANDROID: Re-use SUGOV_RT_MAX_FREQ to control uclamp rt behavior
By default uclamp RT tasks will use the max frequency, which is not the
desired default behavior on mobile devices.

Re-use the SUGOV_RT_MAX_FREQ sched_feat to control the default behavior.

When SUGOV_RT_MAX_FREQ is NOT selected, the uclamp_min value of the RT
tasks will be 0.

Bug: 120440300
Signed-off-by: Qais Yousef <qais.yousef@arm.com>
Change-Id: I3d36f1ebed6ef35a6299af32bbf4462d0353e783
Git-commit: f89ff1404286486643a1ae80f1f22946cdb8d0ee
Git-repo: https://android.googlesource.com/kernel/common/
Signed-off-by: Satya Durga Srinivasu Prabhala <satyap@codeaurora.org>
2020-01-27 19:50:42 -08:00
Quentin Perret
9e864eaf88 ANDROID: cpufreq/schedutil: Select frequency using util_avg for RT
Schedutil always requests max frequency whenever a RT task is running.
Now that we have a better estimate of the utilization of RT runqueues,
it is possible to make a less conservative decision and scale frequency
according to the needs of the RT tasks.

To do so, protect the RT-go-to-max code with a new sched_feature.
The sched_feature is disabled by default, hence favoring energy savings
as required in mobile environments.

Signed-off-by: Quentin Perret <quentin.perret@arm.com>
Change-Id: Ic9f01c8703d4f843addaa0d684012a422fe9f3b8
Git-commit: c74d264106b150fad8949a985514d127c1e117c5
Git-repo: https://android.googlesource.com/kernel/common/
[satyap@codeaurora.org: fix trivial merge conflicts]
Signed-off-by: Satya Durga Srinivasu Prabhala <satyap@codeaurora.org>
2020-01-27 19:48:32 -08:00
Guru Das Srinagesh
35b3721875 pwm: pwm-qti-lpg: Handle nvmem device lookup failure properly
Due to commit 95b65195d5 ("nvmem: core: Always reference the device
returned by nvmem_device_get()") failures in nvmem device lookup return
-EPROBE_DEFER instead of NULL. This causes probe failure of the
pwm-qti-lpg driver when pwm devices are defined in the device tree
without nvmem nodes, which is undesirable.

Fix this by attempting to get the nvmem device only if it is present.

Change-Id: Ifa136bb9b78e4b9e0894854768e9a6cc060d5261
Signed-off-by: Guru Das Srinagesh <gurus@codeaurora.org>
2020-01-27 15:59:25 -08:00
Mike Tipton
f9fea2da9a clk: qcom: clk-rpmh: Mark rfclka2 as optional for Lahaina
Mark rfclka2 as an optional clock for Lahaina. This clock is currently
unused on our internal development boards and thus isn't populated in
cmd_db. It could be used on future boards, so don't remove it entirely.

Change-Id: I0f216e14e675196d4817c89db730d40f1e20aba1
Signed-off-by: Mike Tipton <mdtipton@codeaurora.org>
2020-01-27 15:33:56 -08:00
Pavankumar Kondeti
9db84311e7 tracing: rework sched_preempt_disable trace point implementation
The current implementation of sched_preempt_disable trace point
fails to detect the preemption disable time inside spin_lock_bh()
and spin_unlock_bh(). This is because __local_bh_disable_ip() calls
directly __preempt_count_add() which skips the preemption disable
tracking. Instead of relying on the updates to preempt count, it
is better to write the preemption disable tracking directly to
preemptsoff tracer. This is similar to how irq disable tracking
is done.

The current code handles the false positives coming from __schedule()
by directly resetting the time stamp. This requires an interface
from the scheduler to preemptsoff tracer. To avoid this additional
interface, the current patch detects the same condition by comparing
the task pid and context switch count. If they are not matching
at the time of preemption disable to enable, don't track the preemption
disable time as it involved a context switch.

Due to this rework. the sched_preempt_disable trace point location is
changed to

/sys/kernel/debug/tracing/events/preemptirq/sched_preempt_disable/enable

Change-Id: I7f58d316b7c54bc7a54102bfeb678404bda010d4
Signed-off-by: Pavankumar Kondeti <pkondeti@codeaurora.org>
[satyap@codeaurora.org: port to 5.4 and resolve trivial merge conflicts]
Signed-off-by: Satya Durga Srinivasu Prabhala <satyap@codeaurora.org>
2020-01-27 15:30:25 -08:00
Lingutla Chandrasekhar
617f2e7fe2 sched: core: reset preemption/irqsoff disable timestamp
Preempt/irqsoff tracer notes down preemption/irqs disabled timestamp
and compares it with enable timestamp to report prolonged disabling
callers at latency tracking. But they don't reset the time stamp at
re-enable time. The time stamp could be stale and possible to report
same latency multiple times or false positive. This could be possible
when callsites uses notrace API (__preempt_) for preemption disable
and tracable API (preempt_) for enable (ex: softirq).

Fix it by resetting the preempt/irqsoff disable timestamp at
re-enable time.

Change-Id: I6790227998881922a9339869ce9ee2dab6202567
Signed-off-by: Lingutla Chandrasekhar <clingutla@codeaurora.org>
2020-01-27 15:30:22 -08:00
Shaleen Agrawal
ac4fd2f97f defconfig: enable schedutil governor on Lahaina
Enable schedutil governor as part of lahaina port.

Change-Id: I8b04c587fb217fe0333593c95b4e9afc4af83427
Signed-off-by: Shaleen Agrawal <shalagra@codeaurora.org>
2020-01-27 13:59:47 -08:00
qctecmdr
1bf7671f03 Merge "defconfig: lahaina-gki: enable the qcom_pm8008-regulator driver" 2020-01-27 13:53:31 -08:00
qctecmdr
57241317ab Merge "defconfig: lahaina: enable the battery charger driver" 2020-01-27 13:53:30 -08:00
qctecmdr
9f3b06dc62 Merge "arm64: defconfig: Enable SG support in Lahaina GKI" 2020-01-27 13:53:29 -08:00
qctecmdr
3ee13ad157 Merge "usb: gadget: f_cdev: Fix func_suspend" 2020-01-27 13:41:00 -08:00
qctecmdr
6b47c82f48 Merge "mhi: Export more symbols" 2020-01-27 13:41:00 -08:00
qctecmdr
786200ca58 Merge "arm64: defconfig: Enable CFI_PERMISSIVE flag" 2020-01-27 13:41:00 -08:00
Ruofei Ma
fc665a4e64 msm: cvp: Use compiler data type in uapi
Move to use compiler data type instead of C keyword in
uapi.

Change-Id: I814863cbd1969654fd6c4203d863679874cc7892
Signed-off-by: Ruofei Ma <ruofeim@codeaurora.org>
2020-01-27 13:00:11 -08:00
Li Guanglei
b9441eb86e sched/core: Fix size of rq::uclamp initialization
rq::uclamp is an array of struct uclamp_rq, make sure we clear the
whole thing.

Change-Id: Ia4531240ed132de30e4af333bc3c6b78143a501c
Fixes: 69842cba9a ("sched/uclamp: Add CPU's clamp buckets refcountinga")
Signed-off-by: Li Guanglei <guanglei.li@unisoc.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Reviewed-by: Qais Yousef <qais.yousef@arm.com>
Link: https://lkml.kernel.org/r/1577259844-12677-1-git-send-email-guangleix.li@gmail.com
Git-commit: dcd6dffb0a75741471297724640733fa4e958d72
Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git
Signed-off-by: Pavankumar Kondeti <pkondeti@codeaurora.org>
2020-01-27 09:13:31 +05:30
qctecmdr
0dbcf5d8eb Merge "iommu/arm-smmu: Fix memory leak with respect to TBU data structures" 2020-01-26 04:10:13 -08:00
qctecmdr
2f4f901935 Merge "mm: fix the use of ALLOC_CMA" 2020-01-26 04:10:13 -08:00
Chris Goldsworthy
b4a6f88e58 iommu/arm-smmu: log outstanding transactions on sync timeout
On a TLB sync timeout for a given SMMU, dump the outstanding transaction
bitmap for each of its TBUs.  Additionally, introduce a sync_timed_out flag
for each SMMU to be present with the enabling of CONFIG_IOMMU_DEBUG to (1)
ensure that only one thread performs the relevant logging and BUG_ON()
during a sync timeout, and (2) prevent other incoming threads from
triggering further timeouts, which can overwrite the SMMU state data that
would contain information on the initial sync timeout.

Change-Id: I43855ecc51ddd2f3a1a287a39c123784c54ad538
Signed-off-by: Chris Goldsworthy <cgoldswo@codeaurora.org>
2020-01-25 22:05:08 -08:00
qctecmdr
0300f957f5 Merge "msm: kgsl: Remove icc path from gmu device" 2020-01-25 03:42:49 -08:00
qctecmdr
fc7c6abaea Merge "Example kernel headers header_lib package" 2020-01-25 03:42:49 -08:00
qctecmdr
3ae91cab0d Merge "arm64: defconfig: Re-enable USB_F_FS_IPC_LOGGING for lahaina_debug" 2020-01-25 03:42:49 -08:00
qctecmdr
30e09ecb9f Merge "defconfig: Add kernel hardening features" 2020-01-25 03:42:48 -08:00
Prakruthi Deepak Heragu
937441c74e msm: gsi: Fix the WARNING for gsi_write_channel_scratch
Definition of the __gsi_update_mhi_channel_scratch is moved to the end
where it is followed by no other non static function.

Change-Id: I6243fbb322c504d606bd5cd02302627afadc82ea
Signed-off-by: Prakruthi Deepak Heragu <pheragu@codeaurora.org>
2020-01-24 19:02:00 -08:00
qctecmdr
b1c328c697 Merge "net: cnss2: Build generic netlink support by default" 2020-01-24 17:58:35 -08:00
qctecmdr
bd193f8ca9 Merge "msm: ipa4: Fix to unmap the page if skb allocation failed" 2020-01-24 17:58:35 -08:00