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>
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>
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>
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>
Add a function to find the context bank a pagetable is attached
to.
Change-Id: I967c77e9d2f761440f28973485a8ce02c7d27dce
Signed-off-by: Harshdeep Dhatt <hdhatt@codeaurora.org>
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>
Enable several configs related to debugging memory issues
on Lahaina.
Change-Id: I225275846d62f774c05478d12f942b7ea0aedaab
Signed-off-by: Isaac J. Manjarres <isaacm@codeaurora.org>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
Enable schedutil governor as part of lahaina port.
Change-Id: I8b04c587fb217fe0333593c95b4e9afc4af83427
Signed-off-by: Shaleen Agrawal <shalagra@codeaurora.org>
Move to use compiler data type instead of C keyword in
uapi.
Change-Id: I814863cbd1969654fd6c4203d863679874cc7892
Signed-off-by: Ruofei Ma <ruofeim@codeaurora.org>
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>
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>