Commit Graph

3 Commits

Author SHA1 Message Date
Yi-Wei Wang
5d14eb10df nvpmodel: Remove legacy nvpmodel-emc-cap driver
The driver has been switched to nvpmodel-clk-cap so remove legacy
nvpmodel-emc-cap.

Bug 3997304

Signed-off-by: Yi-Wei Wang <yiweiw@nvidia.com>
Change-Id: Ic11c29b8cb360b8d591ed94db74ba3f12663f068
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2921042
Reviewed-by: Johnny Liu <johnliu@nvidia.com>
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-06-21 13:25:26 -07:00
Yi-Wei Wang
0c2cb3e676 driver: nvpmodel: Add nvpmodel clock cap support
Add clock capping driver which can be used to cap the max freq of the
specified clocks via Common Clock Framework (CCF) directly. The exposed
sysfs nodes can be used to ensure the clock running within the
predefined frequency cap in selected power mode.

As bandwidth manager is implemented in BPMP, the EMC max freq capping
request should be approved by BPMP. Therefore, there is MRQ call to BPMP
when there is new EMC max freq capping request.

Please note that the request will be rejected by BPMP when EMC current
freq is higher than requested capping freq. On BPMP MRQ failure, the
driver will try to restore previous EMC max freq in CCF. On CCF failure,
the driver will try to remove the cap on EMC max freq.

Bug 3997304
Bug 3972888

Signed-off-by: Yi-Wei Wang <yiweiw@nvidia.com>
Change-Id: Iff574ff5e529119c65a9af2456241d9102bd7956
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2878601
Reviewed-by: Rajkumar Kasirajan <rkasirajan@nvidia.com>
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-04-17 07:03:48 -07:00
Johnny Liu
8442d5d299 drivers: nvpmodel: add support emc clock cap
Port the downstream nvpmodel driver to the OOT project.

The following items summarize the change:
- Original bwmgr APIs are removed
- Clock cap for other clocks except for EMC is removed since userspace
nvpmodel service will handle clock cap for other clocks

Bug 3779573

Signed-off-by: Johnny Liu <johnliu@nvidia.com>
Change-Id: Ib297dfed808dad03d1450860c24156da1a84b4ca
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2773538
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2022-10-06 17:20:16 -07:00