Commit Graph

10 Commits

Author SHA1 Message Date
rmylavarapu
aa20b36597 gpu: nvgpu: Refactor Therm unit
-Created ucode_therm_inf.h header to include all
interface struct and macros from pmuif folder
-Removed thrmpmu.c/.h files and moved all those
functions into thrm.c file
-Renamed functions into public/private format

NVGPU-4449

Change-Id: I8015679351648e94b2d8dd22548c727294b4ddcb
Signed-off-by: rmylavarapu <rmylavarapu@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2286333
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
2020-12-15 14:13:28 -06:00
rmylavarapu
d23ad1d829 gpu: nvgpu: Remove unused therm event
Currently for every +/-5 degC change in
temperature, PMU internally evaluate VF curve on
temp change and will send VFE callback to NVGPU for
initiating change seq to program voltage and frequency.
This is the only callback we receive on temp change
which we handle in perf unit, and we don't have any
other temp events raised by PMU.
So, deleting the therm event handler.

NVGPU-4360

Change-Id: I3c7279dcf691135c178b6a05766403a935bc7e73
Signed-off-by: rmylavarapu <rmylavarapu@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/2241488
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
2020-12-15 14:10:29 -06:00
Abdul Salam
b6b1af387d gpu: nvgpu: Add pmu as argument for all therm functions
Add struct nvgpu_pmu as argument for all therm functions.
This will help in unit testing of public functions in therm unit.

Jira NVGPU-3216

Change-Id: Icf48c68bacda2f65dfaa9578f46c0a588c683ed4
Signed-off-by: Abdul Salam <absalam@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/2113641
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com>
Reviewed-by: Mahantesh Kumbar <mkumbar@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: Deepak Nibade <dnibade@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
2019-05-09 09:23:47 -07:00
Abdul Salam
bba7a89be4 gpu: nvgpu: Move therm_pmu from gk20a to nvgpu_pmu
The aim is to have single pmu structure inside gk20a, that is nvgpu_pmu
struct and all the global structures of all units in PMU should be 
included in nvgpu_pmu struct.

Jira NVGPU-3216

Change-Id: Idc8c6c73514049809cfbde4ca6c1ad75688a5b80
Signed-off-by: Abdul Salam <absalam@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/2112732
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
2019-05-07 02:02:54 -07:00
Mahantesh Kumbar
04e3d37523 gpu: nvgpu: fix build error due to nvgpu_pmu_handle_therm_event
On TOT, nvgpu_pmu_handle_therm_event() causing build error
as therm.h header file is removed from pmu_msg.c file.

Change-Id: I3b016084db8cfa35e4bfda8432fad438bf36d3a0
Signed-off-by: Mahantesh Kumbar <mkumbar@nvidia.com>
Signed-off-by: Seema Khowala <seemaj@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/2098640
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com>
Reviewed-by: Alex Waterman <alexw@nvidia.com>
Tested-by: Alex Waterman <alexw@nvidia.com>
2019-04-16 09:49:15 -07:00
Mahantesh Kumbar
df7d80beb1 gpu: nvgpu: move therm code from pmu_gk20a.c to therm unit
As part of PMU HAL separation, need to move non-HAL code to respective
UNIT & found still some therm code left in pmu_gk20a.c files which
needs to be moved therm UNIT.

JIRA NVGPU-2002

Change-Id: I44fe5e9b0966bb508307a6323e09e1edd59aff02
Signed-off-by: Mahantesh Kumbar <mkumbar@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/2089871
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
2019-04-16 02:54:32 -07:00
Abdul Salam
d03b0c9f43 gpu: nvgpu: Remove circular dependency between
therm and pmu

This patch does the following
1. Use function pointers to access therm event handler from pmu.
2. Remove therm.h header include.
3. Assign the pointer during SW setup of therm.

Jira NVGPU-1959

Change-Id: Ib52810d85765480626791e4e3f442110d343eed9
Signed-off-by: Abdul Salam <absalam@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/2094322
Tested-by: Vijayakumar Subbu <vsubbu@nvidia.com>
Reviewed-by: Vijayakumar Subbu <vsubbu@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
2019-04-15 20:53:43 -07:00
Abdul Salam
c7702ab5ff gpu: nvgpu: Restructure common.pmu.therm unit
This patch does the following.
1. Remove include of HW header files in common.
2. Append public functions with nvgpu.

Jira NVGPU-1959

Change-Id: Ibd60620e9db14b52d49577b899b2d2077b5a544a
Signed-off-by: Abdul Salam <absalam@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/2019236
Reviewed-by: Debarshi Dutta <ddutta@nvidia.com>
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com>
Reviewed-by: svc-misra-checker <svc-misra-checker@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: Vijayakumar Subbu <vsubbu@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
2019-02-21 21:56:23 -08:00
Philip Elcan
64f87e9584 gpu: nvgpu: pmu: fix return in thrm api
The api therm_domain_pmu_setup() in thrm.c was return a u32 incorrectly.
It should return an int.

JIRA NVGPU-1008

Change-Id: I1cf51f26fc2615671bbab4dcf78b4f60b7bdcbeb
Signed-off-by: Philip Elcan <pelcan@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/1995883
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com>
Reviewed-by: svc-mobile-misra <svc-mobile-misra@nvidia.com>
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Alex Waterman <alexw@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
2019-01-18 13:54:49 -08:00
Terje Bergstrom
dce78f7332 gpu: nvgpu: Move PMU code to common/pmu
Move code interfacing with PMU tasks to common/pmu.

JIRA NVGPU-961

Change-Id: Ie62611b0ffe1196d4bfdc740e03017e1894a834f
Signed-off-by: Terje Bergstrom <tbergstrom@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/1950991
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
2019-01-10 20:09:55 -08:00