QMAA dependency is causing dlkm compilation along with incorrect
copy of mmrm ko to vendor_dlkm.
Change-Id: If03359a70af0e64ce8f2bbba468d68ef15ae053b
Signed-off-by: Shivendra Kakrania <shiven@codeaurora.org>
Some of targets doesn't need MMRM but need binary compatibility
with targets which support MMRM.
A new api is added to support such scenarios & to ensure that
MMRM is disabled & MM clients can fall back to clk api.
Change-Id: I72514889bffc48174c18e1e764751d2f4595570e
Signed-off-by: Shivendra Kakrania <shiven@codeaurora.org>
While adjusting the voltage corner for all clients, number of
hw instances in not included. Also when calculating the old
current of a client number of hw blocks is not included.
Fixed the calculations to project the correct current calculation
when either overall voltage corner is adjested or corner is adjusted
for a client.
Change-Id: I4ee9bb02275fda61c72dce99f41dbf73b4cf8fc5
Signed-off-by: Shivendra Kakrania <shiven@codeaurora.org>
Print enabled mmrm client info during runtime.
This will be a helpful debugging feature to identy the
enabled clients, corresponding power info & aggregated numbers.
Change-Id: I01734843d28e7a21c622dcb1ff6263aa1c2c156c
Signed-off-by: mbao <mbao@codeaurora.org>
Updating the supported number of hw blocks as per HSR guidance.
Change-Id: I3f7f465aa28c35c112f51925beb7e945eb0c84a9
Signed-off-by: Shivendra Kakrania <shiven@codeaurora.org>
Don't check num hw block parameter, when set clk rate to 0.
Change-Id: I7f94a6413487f11156c5d1ec10467cd016a8700b
Signed-off-by: mbao <mbao@codeaurora.org>
Ensure to remove throttled client only when
reentry is possible. Not doing so caused
throttled client removed from link list without
throttled client reentered.
Print the notifier processing time & check if
its taking more than expected.
Change-Id: Iee97cba0ee68713e7f17d4afae2ba327f7c6b8ea
Signed-off-by: Mahesh Kumar Sharma <smahesh@codeaurora.org>
Update delta current correctly after client
was throttled.
Change-Id: I3b51f8eb7f94d3659dea5dde6e16537fbc0de87d
Signed-off-by: Mahesh Kumar Sharma <smahesh@codeaurora.org>
Add number of hw blocks support for peak current calculation.
With this support multiple blocks of same clock can be accounted
for peak current.
Change-Id: I277636cedc4cda731fc845dcba3e742e840446d4
Signed-off-by: mbao <mbao@codeaurora.org>
As voltage corners are shared among the clients
ranging from low to high priority. In order to
accomodate power requirement of high priority clients,
MMRM driver may throttle a client which is lower priority.
Added logic to bookkeep these clients and try to
reinstate them at later point of time.
Signed-off-by: Mahesh Kumar Sharma <smahesh@codeaurora.org>
Dump current state of all registered clients when low
prority clients request can't be entertained.
Signed-off-by: Mahesh Kumar Sharma <smahesh@codeaurora.org>
In order to improve debugging of mmrm
issues, add support of MMRM power print and
remove some unnecessary logging or decrease
priority to low.
Signed-off-by: Mahesh Kumar Sharma <smahesh@codeaurora.org>
Ensure to calculate correct adjusted level
when reuested level is lower than aggregate level.
Signed-off-by: Mahesh Kumar Sharma <smahesh@codeaurora.org>
Add support of low priority voltage corners lowsvs and
svs in mmrm driver.
This logic maintains a list of clients which are to be
proritize to be throtlled to low power in order to satisfy
high priority client's power requiretment.
Change-Id: Ia7f912e41bbcff057c0732cc7c2b16e327c59fd8
Signed-off-by: Mahesh Kumar Sharma <smahesh@codeaurora.org>
if mmrm client was registered, client register will output dyn_pwr,
leak_pwr total pwr, and current Max for mmrm-test-module
Change-Id: I34aeef778f42f106780b72543a3458627ce09935
Signed-off-by: mbao <mbao@codeaurora.org>
Enable or disable throttling feature by writing
correct value to msm_mmrm debugfs.
Change-Id: If2b06e061ddd102c42d0f5517d3c0be4fc9f6669
Signed-off-by: Mahesh Kumar Sharma <smahesh@codeaurora.org>
Throttle low priority client to handle the resource request
of high priority clients. During peak overshoot due to HIGH priority
MMRM driver, identify the low priority victim core to be throttled to
honor high prority client request.
Change-Id: I30aa2793f2c36063cf3096ef86ed21cb87e1179f
Signed-off-by: "Mahesh Kumar Sharma <smahesh@codeaurora.org>"
For error cases, updating only client register related entries.
Change-Id: I78703f15f7436aa28d280a2b753655681a4f13eb
Signed-off-by: mbao <mbao@codeaurora.org>
Added support to allow multiple register of same client so that mmrm
test app can be used after device is booted up.
This will also allow to test multiple concurrencies as well as
throttling feature.
Depends-on: 3630372
Change-Id: I19a2838f536d36db0629d9d64c962aba57c92d28
Display driver has a dependency on mmrm driver. For
display to come up in recovery mode, we also need to
enable mmrm driver. Add the needed changes to enable
mmrm dlkm to be part of recovery image.
Change-Id: I073b509f7c091e4d1272c2277cfc9f72e35e2a05
Signed-off-by: Chandan Uddaraju <chandanu@codeaurora.org>
Query clock framework for frequency range.
Update current with frequency scaling.
Change-Id: Ibc2d51c2854ea3eb49fbfb60a30e466373291a23
Signed-off-by: Sebastian Dang <sebastiandang@codeaurora.org>
Add pointer to driver data from sw clk mgr.
Change current calculation signature to use sw clk mgr.
Refer to resource values from driver data for current
calculations.
Change-Id: I77402e44cb19978791489ecdee9aa433fcc2a974
Signed-off-by: Sebastian Dang <sebastiandang@codeaurora.org>
Create rule for Module.symvers so that other
modules can access exported symbols.
Change-Id: I91b2ff5128bfd560446c92337d8ce9a949de0443
Signed-off-by: Sebastian Dang <sebastiandang@codeaurora.org>
Add aggregated voltage corner to peak data.
When calculating peak current, compare requested
voltage corner to the aggregated and adjust power
values accordingly.
Change-Id: I0b58b5dd5ce14b55ef438fe7cc38a8cb3369fe14
Add makefile, kbuild, and android.mk to compile
mmrm driver as an external kernel module.
Modify debugfs with new return type.
Change-Id: I370fac4d985bbe491be7fdab846eb3b60d6a3c4d
- When qcom_clk_get_voltage encounters an error,
return the error.
- When qcom_clk_get_voltage returns a level higher
than supported, return an error.
- Added warning debug level.
- Minor formatting changes.
Change-Id: I6d7147f6af83bff2d84ef40c3a11cfef7faca391
- Query clk driver for voltage corner calculation.
- Use change in delta for peak calculation.
- For peak overshoot, return warning and skip updating clk rate.
- Check for reserve_only flag in client_data flags.
- Skip setting clk rate if flag is set.
- Skip duplicate calculations if clk rate is already set.
Change-Id: I589990e17874b935b3b90e25f85d105a589391cd
Adding Multimedia Resource Manager(MMRM) driver for clk rate
admission control of multimedia clients.
Change-Id: I7109369b254793d1dceaf3a34002ad01d14bc40a