Grafik Komit

70 Melakukan

Penulis SHA1 Pesan Tanggal
Mihir Ganu
66a6dce5a9 mmrm: Round the client-set value for peak power calculations
MMRM clients may set a clock rate which is greater than max supported
rate for the clock. To perform peak power calculations, round the rate
with clk_round_rate() to get the rounded (max supported) value. Use the
client-set value to set the rate to clock driver, which internally
rounds the rate to the supported value also.

Change-Id: Ie9b4f5077244c8f43a2f7de2f9d6b284843091f1
Signed-off-by: Mihir Ganu <quic_mganu@quicinc.com>
2023-03-21 14:17:38 -07:00
Rakshitha Shakamuri
4de411dfb8 mmrm-driver: enable Bazel compilation by default
Enabling Bazel DDK compilation by default with ENABLE_DDK_BUILD macro.

Change-Id: I45e669a68ea1814e9f52ad616b8c2318ad309805
2023-03-15 21:08:54 -07:00
Mihir Ganu
f138aa6f9f mmrm: Add support for CRM-managed clock clients
Add support for clock clients managed by CRM (CESTA Resource Manager):
-Introduce structures to register CRM clock clients.
-Introduce changes in MMRM set_value API to support the new clock set_rate
API for SW/HW CRM clients.
-Modify peak current calculation to consider the maximum rate from all
SW and HW DRV instances of a clock client.

Change-Id: Iaddc835223f3dc3b43c443f99bb8a34e9b7e4498
Signed-off-by: Mihir Ganu <quic_mganu@quicinc.com>
2023-03-02 09:34:03 -08:00
Rakshitha Shakamuri
ff6beabec5 mmrm-driver: migration to bazel compilation
Adding dynamic module compilation with bazel files

Change-Id: I26e55a99e243e6dc8ffc190a71694f7f8734d5e3
2023-02-10 13:41:58 -08:00
Mihir Ganu
46cbdbf634 mmrm: Fix the arguments in debug logs
Use correct arguments for debug log functions.

Change-Id: I394f8ac9863732ed091960c319077757effb7b28
Signed-off-by: Mihir Ganu <quic_mganu@quicinc.com>
2022-10-28 14:28:46 -07:00
Mihir Ganu
af49c99e81 mmrm: Add support for pineapple target
Add platform data structure for pineapple target.

Change-Id: I9071e0c5b235d52ca218e0eb543419a76cf545ca
Signed-off-by: Mihir Ganu <quic_mganu@quicinc.com>
2022-09-23 16:13:45 -07:00
Govindaraj Rajagopal
c5d6ea5394 msm-mmrm: use DLKM flag to compile MMRM driver
Use TARGET_KERNEL_DLKM_DISABLE and TARGET_KERNEL_DLKM_MMRM_OVERRIDE
to compile MMRM driver.

Change-Id: I3156d696f372a9c178356aead7c3c8813980641e
Signed-off-by: Govindaraj Rajagopal <quic_grajagop@quicinc.com>
2022-05-27 20:11:23 +05:30
qctecmdr
7509d80e7e Merge "msm-mmrm: Moving peak-current threshold to DT" 2022-05-18 07:29:44 -07:00
Mark Bao
bbeb858667 msm-mmrm: Adding support for noop request/response
Adding support for noop request/response to evaluate the msg queue roundtrip.

Change-Id: I5014714002e7d8c5df11a1b9ec71f8ad2cb297f5
2022-04-22 08:08:01 -07:00
Mark Bao
e43dfcd0a0 msm-mmrm: Moving peak-current threshold to DT
Moving peak-current threshold to DT to ensure that it'll get configured correctly on different targets.

Change-Id: I7c1a7f8dd6ba818f7a1ee14de735729fb6f3abcb
Signed-off-by: Mark Bao <quic_mbao@quicinc.com>
2022-04-22 07:56:11 -07:00
Mark Bao
56d6f27d53 msm-mmrm: Adding support for noop request/response
Adding support for noop request/response to evaluate the msg queue roundtrip.

Change-Id: I2628507ed7cb414bf620ec2e0d49edb56ad5d644
2022-04-21 18:03:56 -07:00
qctecmdr
e9bba40066 Merge "msm-mmrm: fix para virtualization FrontEnd driver" 2022-04-20 15:40:19 -07:00
qctecmdr
49a4d18ddd Merge "msm-mmrm: add admission control & clean up testcases" 2022-04-19 19:51:48 -07:00
qctecmdr
5480c20496 Merge "msm-mmrm: fixed para virtualization backend" 2022-04-19 19:51:48 -07:00
Mark Bao
cd58dc582e msm-mmrm: add admission control & clean up testcases
Add admission control & clean up testcases.

Change-Id: Ib1b12e8e0e053f1149881d3f1bab4a462ee82d09
2022-04-19 10:40:00 -07:00
Mark Bao
23b9e30ab6 msm-mmrm: fix para virtualization FrontEnd driver
Fix para virtualization FrontEnd driver.

Change-Id: Iaf2c6ea2410aff298d33641edfa2fa36376392f8
2022-04-15 11:51:54 -07:00
Mark Bao
e763f5f7c0 msm-mmrm: fixed para virtualization backend
fixed para virtualization backend.

Change-Id: Id7580187c444f5387ed7aa38e8ed441a02d4b2c6
2022-04-14 08:26:17 -07:00
qctecmdr
c521880e63 Merge "msm-mmrm: add para virtualization FrontEnd test" 2022-04-05 18:54:18 -07:00
Mark Bao
881ef22e95 msm-mmrm: add para virtualization FrontEnd test
Add para virtualization FrontEnd test.

Change-Id: Ib8e350e897c3acafa4aab85cdd38692232028988
2022-04-01 09:46:51 -07:00
Mark Bao
b4df6ac473 msm-mmrm: add para virtualization FrontEnd driver
Add para virtualization FrontEnd driver.

Change-Id: I3747e427aee3ebf3d18ac622fe3e9730ed34d217
2022-03-24 13:38:37 -07:00
Mark Bao
e84a7d930f msm-mmrm: add para virtualization backend
Add para virtualization backend.

Change-Id: Ifa25e422c04ef4dafb152130f303d0a217429c32
Signed-off-by: Mark Bao <quic_mbao@quicinc.com>
2022-03-08 15:29:33 -08:00
Shivendra Kakrania
2fbec2424a mmrm: Remove QMAA dependency
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>
2021-11-19 19:49:03 -08:00
mbao
3249416536 msm-mmrm: Add Kalama mmrm platform data
Add Kalama mmrm platform data.

Change-Id: I55228b60ab3eec909c070ab20edbf4125318409c
Signed-off-by: mbao <mbao@codeaurora.org>
2021-11-19 10:44:40 -08:00
qctecmdr
754a537d5c Merge "msm-mmrm: add max num hw block into device tree file" 2021-10-25 10:55:25 -07:00
Shivendra Kakrania
4b0b134192 mmrm: Adding support for api to check if mmrm is supported
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>
2021-10-19 11:23:23 -07:00
mbao
61d63855a0 msm-mmrm: add max num hw block into device tree file
Add max num hw block into device tree file.

Change-Id: I9d57cf6cdd962bc470214c0cb93df09981f106bb
Signed-off-by: mbao <mbao@codeaurora.org>
2021-10-18 15:44:30 -07:00
qctecmdr
4758d42c05 Merge "mmrm: Print enabled mmrm client info" 2021-10-14 10:32:46 -07:00
Shivendra Kakrania
d5c40be33b mmrm: Fixing delta current for number of hw instances
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>
2021-10-12 10:14:44 -07:00
mbao
3ddc864248 mmrm: Print enabled mmrm client info
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>
2021-10-11 15:25:21 -07:00
Karthikeyan Periasamy
6861e939bd Kalama-BU: add QMAA compliance to camera dlkms
CRs-Fixed: 2838945
Change-Id: I5aba1146a84c2215cc8ed880f3ade33a9b73bbb1
Signed-off-by: Mulugeta Engdaw <mengdaw@codeaurora.org>
Signed-off-by: Karthikeyan Periasamy <kperiasa@codeaurora.org>
2021-09-15 15:45:15 -07:00
Shivendra Kakrania
924ac6cd89 msm-mmrm: Update the number of blocks as per updated HSR
Updating the supported number of hw blocks as per HSR guidance.

Change-Id: I3f7f465aa28c35c112f51925beb7e945eb0c84a9
Signed-off-by: Shivendra Kakrania <shiven@codeaurora.org>
2021-08-27 15:23:40 -07:00
mbao
980eed84f0 msm-mmrm: narrow checking num hw block scenario
Don't check num hw block parameter, when set clk rate to 0.

Change-Id: I7f94a6413487f11156c5d1ec10467cd016a8700b
Signed-off-by: mbao <mbao@codeaurora.org>
2021-08-27 15:23:02 -07:00
Mahesh Kumar Sharma
34d809ec77 mmrm: remove throttled client properly
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>
2021-08-19 18:57:03 -07:00
mbao
a2cd8e12f0 msm-mmrm: Use sysfs for mmrm module
Add sysfs to provide debug variables.

Change-Id: I8dc64af4d0a4cc47bbe8dd135c90cda4d7e301ee
Signed-off-by: mbao <mbao@codeaurora.org>
2021-08-17 08:18:00 -07:00
Mahesh Kumar Sharma
91770b6061 mmrm: Fix KW error
Initialize variable before use.
Moved statement to correct block.

Change-Id: I6effe4a8d2363596250bbd663e68f1c6bea07589
Signed-off-by: Mahesh Kumar Sharma <smahesh@codeaurora.org>
2021-08-11 08:58:56 -07:00
Mahesh Kumar Sharma
b5fa8d8109 mmrm-driver: Update delta current correctly
Update delta current correctly after client
was throttled.

Change-Id: I3b51f8eb7f94d3659dea5dde6e16537fbc0de87d
Signed-off-by: Mahesh Kumar Sharma <smahesh@codeaurora.org>
2021-08-09 16:57:34 -07:00
mbao
aa373d648a msm-mmrm: Add support to number of hw blocks
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>
2021-08-09 11:54:11 -07:00
Mahesh Kumar Sharma
a4bfe3f86a mmrm: Notify throttled clients to bring back
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>
2021-08-02 18:13:35 -07:00
Mahesh Kumar Sharma
053e1464ea mmrm: Enable throttling feature by default
Enable throttling feature by default.

Change-Id: Ic72d7b8d7df9899d65ad7ced7a4f21b82cf8c31c
Signed-off-by: Mahesh Kumar Sharma <smahesh@codeaurora.org>
2021-07-28 17:10:41 -07:00
Mahesh Kumar Sharma
b64ce683db mmrm: dump current state of clients when throttling
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>
2021-07-21 16:14:51 -07:00
Mahesh Kumar Sharma
bb30cd0803 msm_mmrm: Add support of power prints
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>
2021-07-21 15:37:25 -07:00
Mahesh Kumar Sharma
bd838c2746 msm_mmrm: Calculate corect adjusted level
Ensure to calculate correct adjusted level
when reuested level is lower than aggregate level.

Signed-off-by: Mahesh Kumar Sharma <smahesh@codeaurora.org>
2021-07-16 14:32:52 -07:00
Mahesh Kumar Sharma
af00e1b7ca msm_mmrm: Add support of new low voltage corners in mmrm driver
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>
2021-07-12 18:53:38 -07:00
mbao
3b8eae3aa1 msm_mmrm: Add registered mmrm client parameters output
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>
2021-07-09 11:23:05 -07:00
Mahesh Kumar Sharma
e1ade39ea4 msm-mmrm: Control throttling feature via debugfs
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>
2021-07-01 11:43:29 -07:00
Mahesh Kumar Sharma
e653ade312 msm-mmrm: Handle the resource request of high priority clients
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>"
2021-06-30 19:13:07 -07:00
mbao
b36ee3f5c0 msm-mmrm: Change csid output format to Hex
Change-Id: I175e6bfc25a8d28549b35dbbb986b46a3237338d
Signed-off-by: mbao <mbao@codeaurora.org>
2021-06-29 10:28:14 -07:00
mbao
93ac16226c mmrm: Fixed deregister issue
For error cases, updating only client register related entries.

Change-Id: I78703f15f7436aa28d280a2b753655681a4f13eb
Signed-off-by: mbao <mbao@codeaurora.org>
2021-06-14 18:50:26 -07:00
qctecmdr
21bc3dcd43 Merge "msm_mmrm: Added debug support for multiple register calls of same client" 2021-06-03 12:46:41 -07:00
mbao
3a6373a550 msm_mmrm: Added debug support for multiple register calls of same client
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
2021-06-02 20:59:58 -07:00