Allows the client to query the driver for driver capabilities.
Helpful for maintaining backwards compatibility in future.
Acked-by: Deepika Singh <dsi@qti.qualcomm.com>
Change-Id: I82b2e05eae0241dd8cef22f07845998cae739395
Signed-off-by: Mohammed Nayeem Ur Rahman <mohara@codeaurora.org>
qsmmuv500_tlb_sync_timeout() uses for_each_set_bit() to iterate
through the TBU IDs. However, for_each_set_bit() operates on
unsigned longs, while tbu_ids is a u32 variable. Change the type
of tbu_ids to unsigned long.
Change-Id: If59eedebb21d388f864a0e2579f8af6bb1fc0b75
Signed-off-by: Isaac J. Manjarres <isaacm@codeaurora.org>
The xfer_mem pointer is dereferenced before sanitizing it, so use it
only after it has been sanitized.
Change-Id: Iaedd988903f012e647dcfee9bbe7905e0a4574eb
Signed-off-by: Isaac J. Manjarres <isaacm@codeaurora.org>
In preemption fault handler, check only the STOP bit of
ADRENO_REG_CP_PREEMPT register to see if the preemption is complete.
Change-Id: Id1f2d0947412e996d6028558124c3e528527cec6
Signed-off-by: Akhil P Oommen <akhilpo@codeaurora.org>
Signed-off-by: Sebanti Das <sebadas@codeaurora.org>
offload worker checks if mhi is active before doing the reg
write. If mhi is not active it returns without enabling L1.
This causes prevent_l1 counter to go out of sync. Fix this
by enabling L1 before returning from offload worker function.
Change-Id: I8a356acca3d8b8a7b4ff4d95e7378a056a2b06cf
Signed-off-by: Hemant Kumar <hemantk@codeaurora.org>
When PCIe endpoint enters L1SS sleep and mhi client on Host tries
to queue a transfer request endpoint takes more than 6ms to come
back to L0 state. This can cause CPU stall if MHI register write
is followed by a write memory barrier. This can cause other tasks
to get blocked. Prevent this situation by offloading MHI register
write to a high priority worker thread when in AMSS. When thread gets
a chance to run it would first bring the link to L0 and then perform
register write.
Change-Id: I1b4839801df140fc50973e92e2522eb57d2897fa
Signed-off-by: Hemant Kumar <hemantk@codeaurora.org>
As per the hardware documentation, adjust T_LRA using RC clock
calibration when playing in FIFO mode with play rate not less than
8 KHz. Based on the closed loop T_LRA, adjust the open loop T_LRA
specified in the device tree and use it in the calculation.
Change-Id: I5197bd04051c2aaab38c5ff5f37a47e0ef4b48d3
Signed-off-by: Shyam Kumar Thella <sthella@codeaurora.org>
Add support to populate device tree nodes for the new
32-bit platforms under under mach-qcom.
Change-Id: I5fd747de84917c16f28f3f72d7b34b5db157637c
Signed-off-by: Srinivas Ramana <sramana@codeaurora.org>
Signed-off-by: Tengfei Fan <tengfeif@codeaurora.org>
Signed-off-by: Jeevan Shriram <jshriram@codeaurora.org>
fixup_walt_sched_stats method in sched_class was required because
fair class need to handle it differently when CFS_BANDWIDTH feature
is enabled. Since that is gone, we can remove this method and reduce
WALT footprint in other files.
Change-Id: Ia20c4accf9beb9f79554636c8faced3d31358622
Signed-off-by: Pavankumar Kondeti <pkondeti@codeaurora.org>
[clingutla@codeaurora.org: Resolved trivial merge conflicts]
Signed-off-by: Lingutla Chandrasekhar <clingutla@codeaurora.org>
Signed-off-by: Shaleen Agrawal <shalagra@codeaurora.org>
WALT load tracking supports CFS_BANDWIDTH, which is not enabled for
Android and no users available for it. Remove it.
Change-Id: I4f3c66a1b567976aadb4a4f91a3dd66230386981
Signed-off-by: Lingutla Chandrasekhar <clingutla@codeaurora.org>
sched_disable_window_stats was used while resetting the window
size in legacy code. The current code does not use this anymore.
Change-Id: If77dcfcae917a6632125d205db9082e6b25ccbf6
Signed-off-by: Pavankumar Kondeti <pkondeti@codeaurora.org>
This change is for general scheduler improvement.
Change-Id: I92c13d8e6681adb2655a1dae1b5c92fd0fe32166
Signed-off-by: Shaleen Agrawal <shalagra@codeaurora.org>
Commit 789e044344 ("msm: kgsl: Don't populate the OPP table if it
already exists") tried to avoid duplicating the OPP table but used
dev_pm_opp_get_opp_table() which creates a table if it didn't already
exist so the if() check was always true and we never populated the
table which in turn caused devfreq to fail because the table was empty.
All we really wanted to do was check to see if the table existed
without a nasty message from the OPP subsystem. Checking
dev_pm_opp_get_opp_count() should do that without any ugly side effects.
Change-Id: Ic0dedbadf81a1917b756144e762a6600a84863ca
Signed-off-by: Jordan Crouse <jcrouse@codeaurora.org>
Resolving the undefined behaviour scenario where if adsp proc
init fails return error and not to goto bail to deinitialize
memory and unlock mutex.
Change-Id: Idf107aa340a211edec9121249e090c3e7c0e2200
Acked-by: Gururaj Chalger <gchalger@qti.qualcomm.com>
Signed-off-by: Mohammed Nayeem Ur Rahman <mohara@codeaurora.org>
Add support for Global Clock Controller for peripheral clock
clients to be able to request for the clocks for HOLI.
Change-Id: I65b34b1bd6de0a9d1fc871984026e20bb56f43ed
Signed-off-by: Saurabh Sahu <sausah@codeaurora.org>
The vsensor clock is not required to be controlled from HLOS, thus
remove the clock ID reference.
Change-Id: I096b70d9a9dbc5cffe7e4e13a947328766fa1307
Signed-off-by: Taniya Das <tdas@codeaurora.org>
It is possible that notify call is called after etr is disabled or
after mode switch from usb to etr. Add etr status check to avoid
exception.
Change-Id: I4feb36df28b6fc059598af98b6fb9ccf698d3aaf
Signed-off-by: Mao Jinlong <jinlmao@codeaurora.org>
In case firmware request fails to find firmware in default
location, re-try with fall back location. This is done by
adding fall back firmware image location in controller
structure and firmware request is sent again using fall
back location. Send a status call back to controller when
re-try is done.
Change-Id: I252fa2721df335cbff11b8894adb9ad8cf7bf54f
Signed-off-by: Hemant Kumar <hemantk@codeaurora.org>
Userspace does not have access to QGKI configs,
so remove redundant QGKI config checks.
Change-Id: Ia8126e976e5189c0160044f1656709a5692743db
Signed-off-by: Meng Wang <mengw@codeaurora.org>
This reverts commit dc7bb91d61.
The change has been done in userspace. This change is not
needed anymore.
Change-Id: Ie49a4263a2a4760e0538cee4d462654f1f8ac21f
Signed-off-by: Meng Wang <mengw@codeaurora.org>
Avoid any host driver ops access after register driver gets killed
by marking it as NULL.
Change-Id: Idd268d5d8d31569c4272fde566866c4d79bc1cad
Signed-off-by: Yue Ma <yuem@codeaurora.org>
As there is no increment in ref_count on context when debug_fs is
disabled, ensure there is no decrement in ref_count either.
Change-Id: I8da258a78a8b82ee967b1c944209f6777439e682
Signed-off-by: Prakruthi Deepak Heragu <pheragu@codeaurora.org>
Client drivers may successfully register with a doorbell even before
doorbell capids are known to Linux. However, we do need to know capids
for send, read, reset, and mask functions. Here, we mirror the behavior
of message queues by placing the calling thread in a waitqueue until the
capids are populated by RM.
Change-Id: Ie1cf98d0fe344bb2a878bb655db78705d4292ff9
Signed-off-by: Elliot Berman <eberman@codeaurora.org>
The neuron channels may init and probe before the secondary vm is
loaded and the resources queried from resource manager. This results
in either a blocking call or EAGAIN returned when sending a doorbell.
Move the msgq_init call from the probe to the channel sync thread. This
will ensure the init thread can continue if the doorbell send api needs
to block or busywait loop.
Change-Id: I0f5562968d59a3dc0a361aca9e4e60ffebcb70be
Signed-off-by: Chris Lew <clew@codeaurora.org>
Currently, doorbell registration fails if a client driver attempts to
probe before the doorbell probe since data structures are not
initialized. Add an initialized flag which registration functions can
check if data structures are initialized.
Doorbell RX registration also fails if done before cap table is
populated since RX IRQ is not yet known and RX registration attempts to
register IRQ handler. IRQ registration should happen when populating the
doorbell capabilities regardless of whether a client has registered.
Change-Id: I448b291a5885683bee48b2eb34b51faba69a03bf
Signed-off-by: Elliot Berman <eberman@codeaurora.org>
Currently, the cap-ids for doorbells are initialized to 0. However, 0 is
a valid value for cap-id. Instead, initialize cap-ids to HH_CAPID_INVAL
in the doorbell driver.
Change-Id: Ia1588ed372f0657444e1ab39eab9e6c1e6d3d156
Signed-off-by: Elliot Berman <eberman@codeaurora.org>
RM-VM(Resource Manager) send various vm status notifications(INIT/READY/
RUNNING etc) back to primary VM while PIL loader is loading the VM
images. Listern to these notifications and make a call to get the
hypervisor resources to configure doorbell and message queues.
Change-Id: Ia378a1df82ef960e2c11bf715100e38de82b670c
Signed-off-by: Murali Nalajala <mnalajal@codeaurora.org>
VMs need to make GET_HYP_RESOURCE call to get resource information (dbl,
msgqs) associated between VMs. If the caller VM want to get resources
associated with another VM, caller VM has to supply the VMID of the
end point. Add support to get hypervisor resources.
Change-Id: Id5f16796ba2a84917c9a072cfeb36d24010e34da
Signed-off-by: Murali Nalajala <mnalajal@codeaurora.org>
While attempting to block low power modes before sending
commands to modify channel state, make sure that execution
environment is in mission mode as we may run into a race
condition where a forced suspend/resume cycle does not get
a chance to run.
Change-Id: Ibc7ca5a52036e18677bb597dc0cd95be96d6698a
Signed-off-by: Bhaumik Bhatt <bbhatt@codeaurora.org>
When attempting to latch the remote timer value, host should be
using internal sequence numbers that change every time a client
calls the exposed API and rings the time synchronization
doorbell so that device can identify them as different requests.
Change-Id: I2a38b63c6b942df032f096b17b1fdbc2abdb171b
Signed-off-by: Bhaumik Bhatt <bbhatt@codeaurora.org>
Some devices support doorbell method to collect time
synchronization information. Add support from host for the
updated way of handling initialization and advertising
support.
Change-Id: I5bc82b946fd64927a2a88babc8d383e5fa664cf6
Signed-off-by: Bhaumik Bhatt <bbhatt@codeaurora.org>