This change is for general scheduler improvement.
Change-Id: I5e27121c3625d21d0a5abedcda9bcbfc947f5359
Signed-off-by: Pavankumar Kondeti <pkondeti@codeaurora.org>
Set the bhi and bhie pointers to NULL as part of clean
up. This makes sure that stale pointers are not accessed
in case the bhi or bhie is failed to initialize during
power up.
Change-Id: Iddbd3a8234ff4d384ab03081479d55faf10d9443
Signed-off-by: Hemant Kumar <hemantk@codeaurora.org>
Collects data from SMEM region when modem crashes
and stores it under /dev to expose to user space.
Change-Id: I6b79a2ea7f7d9d7507e8c44dd1d385a185759ac1
Signed-off-by: Shawn Shin <shshin@codeaurora.org>
When RC_CLK_CAL_EN is set in auto mode while haptics boost is working
in open loop, the first cycle of the vibration would be played
incorrectly because the haptics module couldn't get enough clock count
before the play gets triggered. Fix this by toggling the RC clock
calibration mode from disabled to auto mode.
Change-Id: I80b3c48b9bb508b12841a679eafa2c618771edf2
Signed-off-by: Fenglin Wu <fenglinw@codeaurora.org>
During LRA frequency calibration, reading CAL_TLRA_CL_STS has to be
done before de-asserting play. In the boot up LRA frequency calibration
sequence, CAL_TLRA_CL_STS was read out and stored in SDAM module
registers by the bootloader. Later, HLOS haptics driver can read it from
there and use it for calculating LRA frequency. This boot up LRA
frequency calibration sequence is only available for PM8350B 2.0 chip.
Update the driver to support this.
Change-Id: I0b81e79bad57160f9c79e01151e2d4060b4bbd41
Signed-off-by: Fenglin Wu <fenglinw@codeaurora.org>
RC_CLK_CAL_COUNT is the calibration count used in manual RC_CLK_CAL
mode when playing FIFO patterns. For haptics module in PM8350B 2.0,
there are new equations recommended to calculate RC_CLK_CAL_COUNT
based on CAL_TLRA_CL_STS and LAST_GOOD_TLRA_CL_STS status to achieve
better accuracy. Update the driver to support this.
Change-Id: I983c1b1f284006847549d2b3d23a0c1039f8b4c1
Signed-off-by: Fenglin Wu <fenglinw@codeaurora.org>
Enable RCU NOCB_CPU and FAST_NO_HZ options for the lahaina. These configs
are needed to avoid frequent cpu wake up for processing rcu callbacks.
Whenever LPM governor driver has requested for sleep length
tick_nohz_get_sleep_length tries to find the next event from
tick_nohz_next_event function.
static ktime_t tick_nohz_next_event(struct tick_sched *ts, int cpu)
{
...
if (rcu_needs_cpu(basemono, &next_rcu) || arch_needs_cpu() ||
irq_work_needs_cpu() || local_timer_softirq_pending()) {
next_tick = basemono + TICK_NSEC;
} else {
tick_nohz_next_event calls rcu_needs_cpu to find whether future
non-offloaded RCU-related work need to be done by the current CPU
or not. If any non-offloaded future callbacks are present rcu
framework requests the cpu to wake up for every tick period to
process the callbacks.
When CONFIG_FAST_NO_HZ is defined rcu_needs_cpu function checks whether
any callbacks are ready to process or not. If there are no ready
call backs and no non-offloaded callbacks pending for this CPU, RCU
doesn't need the CPU and returns KTIME_MAX for sleep length. Another
important thing is that, if CPU has lazy callbacks or future non-offload
RCU callbacks, rcu framework try to advance those callbacks and allows
the CPU to enter dyntick-idle mode.
RCU_NOCB_CPU config option helps to offload callback invocation from
the set of CPUs to kthread ("rcuox/N") and reduce OS jitter for
aggressive high performance computing workloads.
Change-Id: I47cdd2a3528e3a447a6909bf3f840ee8a3dd4b1e
Signed-off-by: Prasad Sodagudi <psodagud@codeaurora.org>
Signed-off-by: Raghavendra Rao Ananta <rananta@codeaurora.org>
Make the debug function target specific since
it was anyways used in only two places and it also
simplifies a bunch of indirect register reads
we had to do because of ADRENO_REG enum.
Change-Id: I20fcd91339639d999d475dae60f95a357721b71d
Signed-off-by: Urvashi Agrawal <urvaagra@codeaurora.org>
Add some bits of LPAC information to snapshot.
Change-Id: I4786e4817c9fa1fe778ee769c019069923b46024
Signed-off-by: Urvashi Agrawal <urvaagra@codeaurora.org>
Some registers only exist on A660, add logic to capture
these into the snapshot.
Change-Id: I21bef72768cdb9597906ae9996c8988de1a00f7f
Signed-off-by: Urvashi Agrawal <urvaagra@codeaurora.org>
This adds the quirk to increase the hibern8 timeout
on the host.
Change-Id: I716124224d67942e257e17e7482ce9f32b8a5744
Signed-off-by: Asutosh Das <asutoshd@codeaurora.org>
USB driver can request for an ICL override (e.g. 2 mA when the
host enters suspend) when the device is connected to the host to
a SDP or a port that supports USB_PD. With USB_PD, if PDO 1 has
bit 28 set to 1, it advertises that suspend is supported. Hence
allow setting ICL for USB_PD charger as well.
Change-Id: I5a9eea05c58a7c8140c2910be97788f7f63efb05
Signed-off-by: Subbaraman Narayanamurthy <subbaram@codeaurora.org>
The thermal zone ops pointer is allocated and initialized during
building thermal zone at early boot. The framework expects this
variable is valid as long as that thermal zone exist. Later if
a sensor is registered to thermal zone and then unregistered the
same due to some reason, it resets this thermal zone ops variable.
It leads to unexpected behaviour whenever thermal framework tries
to use it.
Don't reset thermal zone ops variable during of-thermal sensor
unregister context.
Change-Id: I468cdfe08f4cde3fb1258ca335fe2ee8b457e014
Signed-off-by: Manaf Meethalavalappu Pallikunhi <manafm@codeaurora.org>
This API is called to handle command timeout which may
happen upon XHCI stack removal. Since handshake is performed
by polling long duration for status, this can cause watchdog
timeout if status does not change for entire duration of
polling. Hence add new API which also checks for xhci state
and exit the handshake if xhci is removed. Use this api and
bailout command abort operation upon XHCI remove.
Change-Id: I9a90b2dd83d76f80e3f6fd4546b949c88850edd3
Signed-off-by: Hemant Kumar <hemantk@codeaurora.org>
Once command completion times out (5 sec), command
abort operation is currently perfomed with local irq
disabled and spinlock held for 5 sec timeout. In case
xHC becomes unresponsive for some reason this results
into watchdog bark. Hence reduce timeout value from 5
sec to 1 sec to initiate recovery faster.
Change-Id: I1383721ce1d25bc40fb0e7620135fafcba6d5640
Signed-off-by: Hemant Kumar <hemantk@codeaurora.org>
Signed-off-by: Jack Pham <jackp@codeaurora.org>
Signed-off-by: Chandana Kishori Chiluveru <cchiluve@codeaurora.org>
In kgsl_ioctl_gpuobj_import(), user memory of type KGSL_USER_MEM_TYPE_ADDR
can also lead to setting up a dma buffer. When attaching mem entry to
process fails, dma buffer attachment is cleaned up only in case of
KGSL_USER_MEM_TYPE_DMABUF. Similar situation can arise in case of
kgsl_ioctl_map_user_mem(). Fix this by obtaining user memory type from
the memdesc flags.
Change-Id: I502bd0ae19241802e8f835f20391b2ce67999418
Signed-off-by: Puranam V G Tejaswi <pvgtejas@codeaurora.org>
Signed-off-by: Deepak Kumar <dkumar@codeaurora.org>
Disable I3C support for lahaina as its not PORed.
Change-Id: I312def43199d64f117a066461d63286998b2aae0
Signed-off-by: Mukesh Kumar Savaliya <msavaliy@codeaurora.org>
Change removes the registered callback with the dma fence
if the handle allocation fails. This is explicitly needed
as any pending callbacks in the fence results in a warning
during destruction. Fix avoids such warning.
Change-Id: I1b5de820789d608231f7b5a9064bb1f0261d553e
Signed-off-by: Sumukh Hallymysore Ravindra <shallymy@codeaurora.org>