Divya Singhatwaria
cc34df76f9
gpu: nvgpu: Add support for ELPG_MS feature
...
- To enable ELPG_MS feature, add identifier for
MS_LTC engine.
- The identifier is then passed
as pg_engine_id to enable the MS_LTC engine.
- Add enable flag NVGPU_ELPG_MS_ENABLED for
enabling/disabling ELPG_MS feature at init.
JIRA NVGPU-6430
Change-Id: Ie1f477918332d85ec98b3bd4d05b8e773d74eab8
Signed-off-by: Divya Singhatwaria <dsinghatwari@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2480750
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com >
Reviewed-by: svc-mobile-misra <svc-mobile-misra@nvidia.com >
Reviewed-by: svc-mobile-cert <svc-mobile-cert@nvidia.com >
Reviewed-by: svcacv <svcacv@nvidia.com >
Reviewed-by: Alex Waterman <alexw@nvidia.com >
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com >
GVS: Gerrit_Virtual_Submit
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com >
2021-03-18 15:29:06 -07:00
ajesh
0030dc3eb4
gpu: nvgpu: fix MISRA violations in Posix unit
...
Fix violations of MISRA rule 5.4 in Posix unit.
JIRA NVGPU-6534
Change-Id: I9471e5fca913ca8cc19403998fdbe5450fb49879
Signed-off-by: ajesh <akv@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2488184
(cherry picked from commit f9bc21ca8d96e9c531a1b0077cfe1e78502e7ee5)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2491855
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com >
Reviewed-by: svc-mobile-cert <svc-mobile-cert@nvidia.com >
Reviewed-by: Alex Waterman <alexw@nvidia.com >
Reviewed-by: Vaibhav Kachore <vkachore@nvidia.com >
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com >
GVS: Gerrit_Virtual_Submit
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com >
2021-03-04 00:37:15 -08:00
mkumbar
65111b64f2
gpu: nvgpu: Add RISCV LS PMU support
...
-Add RISCV LS PMU support by adding RISCV LS PMU ucode to the blob.
-Modify the PMU RTOS sequence based on NEXT CORE enable flag.
JIRA NVGPU-6303
Change-Id: I4e2b989f9903b72a6327c931eb3c02f8cef2aa75
Signed-off-by: mkumbar <mkumbar@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2447388
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com >
Reviewed-by: Vijayakumar Subbu <vsubbu@nvidia.com >
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com >
GVS: Gerrit_Virtual_Submit
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com >
2020-12-17 18:36:44 -06:00
Ramesh Mylavarapu
5c08fd5801
gpu: nvgpu: update pmu ucode version for next pmu
...
Update pmu ucode version for next pmu to 29323513.
This version is taken from P4 CL#29323216.
Changes:
- Enabled ACR task support
- Disabled few features/code for commands to work
- ELPG fifo preemption hals fixed
- Halt functions in ELPG save and restore functions
are commented as bloaded flag is not getting set. This
is not significant as this change will not have any impact
in elpg functionality.
P4 ToT CL on which above change was made: P4 CL#29322732
P4 CL link: https://p4sw-swarm.nvidia.com/changes/29323216
Bug 200666202
Signed-off-by: Ramesh Mylavarapu <rmylavarapu@nvidia.com >
Change-Id: I34581cc15889463fa363cffb369485171c603247
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2447234
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com >
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com >
2020-12-15 14:13:48 -06:00
mkumbar
8c402095db
gpu: nvgpu: PMU NS bootstrap on next core
...
PMU NEXT profile NS ucode load and bootstrap on next core
JIRA NVGPU-5215
Change-Id: I0d8f2ae7695d1d2fc830c4f6b324490d844adabe
Signed-off-by: mkumbar <mkumbar@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2411320
Reviewed-by: automaticguardword <automaticguardword@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 >
GVS: Gerrit_Virtual_Submit
2020-12-15 14:13:28 -06:00
Deepak Nibade
3b746dce0c
gpu: nvgpu: use a falcon flag instead of enabled bit
...
common.gr unit right now makes use of a capability bit
NVGPU_PMU_FECS_BOOTSTRAP_DONE to ensure the recovery path hits a
different routine. This is actually needless and a common check
cannot be used for all GR instances anyways.
Delete this capability bit. Add and use a new flag
coldboot_bootstrap_done added under struct nvgpu_gr_falcon
Jira NVGPU-5648
Change-Id: I46faea6f07cf054f17a3215d4cbbe0fc8a6382ae
Signed-off-by: Deepak Nibade <dnibade@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2409533
Reviewed-by: automaticguardword <automaticguardword@nvidia.com >
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com >
Reviewed-by: svc-mobile-misra <svc-mobile-misra@nvidia.com >
Reviewed-by: svc-mobile-cert <svc-mobile-cert@nvidia.com >
Reviewed-by: Antony Clince Alex <aalex@nvidia.com >
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com >
GVS: Gerrit_Virtual_Submit
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com >
2020-12-15 14:13:28 -06:00
rmylavarapu
d0c01fc14c
gpu: nvgpu: Support ELPG feature on nvgpu-next
...
Changes:
-Implemented pg init_send ops for legacy chips.
-Implemented RPC response handler.
-Added pg rpc function call macros for nvgpu-next.
NVGPU-5192
NVGPU-5195
NVGPU-5196
Signed-off-by: rmylavarapu <rmylavarapu@nvidia.com >
Change-Id: I4e99d3929d7db796434aaeaa6f5773e9aac9fd32
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2391029
Reviewed-by: automaticguardword <automaticguardword@nvidia.com >
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com >
Reviewed-by: svc-mobile-cert <svc-mobile-cert@nvidia.com >
Reviewed-by: Mahantesh Kumbar <mkumbar@nvidia.com >
Reviewed-by: svc-mobile-misra <svc-mobile-misra@nvidia.com >
Reviewed-by: Vijayakumar Subbu <vsubbu@nvidia.com >
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com >
GVS: Gerrit_Virtual_Submit
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com >
2020-12-15 14:13:28 -06:00
rmylavarapu
4787220ffe
gpu: nvgpu: Create ELPG cmd functions
...
In nvgpu-next ELPG unit support RPC calls and no
longer support command calls to communicate to PMU.
This change will create separate ELPG command
functions which can be called for legacy chips and
can be replaced by RPC functions for nvgpu-next chip.
NVGPU-5195
Signed-off-by: rmylavarapu <rmylavarapu@nvidia.com >
Change-Id: Iddea0f46eb3506a4f2d44d664f610215b8f1b666
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2386923
Reviewed-by: automaticguardword <automaticguardword@nvidia.com >
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com >
Reviewed-by: svc-mobile-cert <svc-mobile-cert@nvidia.com >
Reviewed-by: Vijayakumar Subbu <vsubbu@nvidia.com >
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com >
GVS: Gerrit_Virtual_Submit
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com >
2020-12-15 14:13:28 -06:00
rmylavarapu
641cc6a59c
gpu: nvgpu: Support Perfmon events for nvgpu-next
...
Created Perfmon events handling for nvgpu-next.
Nvgpu-next pmu send perfmon events in the form of
rpc events. Events are:
- Change event: This gives information of whether
it is increase/decrease event.
- Init event: This gives information of perfmon init
done in PMU.
NVGPU-5202
NVGPU-5205
NVGPU-5206
Signed-off-by: rmylavarapu <rmylavarapu@nvidia.com >
Change-Id: Ida7e77dbaf70d2b594a0801c91a168dcb4a860bd
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2395358
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
1aa64ba899
gpu: nvgpu: Check for pmu dmem alloc/free
...
On nvgpu-next all cmd/msg communication happens on
fbq and pmu dmem allocation is not needed. An extra
conditional check for pmu dmem alloc/free which will
avoid null pointer handling error.
NVGPU-5185
Signed-off-by: rmylavarapu <rmylavarapu@nvidia.com >
Change-Id: I003a754ee7e91cc5d18a73576dd775a444b72d6d
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2395747
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com >
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com >
2020-12-15 14:13:28 -06:00
mkumbar
07bed63377
gpu: nvgpu: PMU ucode version update for nvgpu-next
...
Updating PMU ucode version for nvgpu-next
Made below changes to PMU ucode on top P4 CL #28892402
-Enabled ACR task support
-Enabled PERFMON task support
-Disabled some features/code to build and commands work correctly
-Enabled INIT_APERTURE_SETTINGS feature
-ACRLib changes for ACR task
JIRA NVGPU-5180
Change-Id: Idc6975e2b7f3501fd377d7e99d8fb47adcb78a52
Signed-off-by: mkumbar <mkumbar@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2396641
Reviewed-by: automaticguardword <automaticguardword@nvidia.com >
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com >
Reviewed-by: svc-mobile-misra <svc-mobile-misra@nvidia.com >
Reviewed-by: svc-mobile-cert <svc-mobile-cert@nvidia.com >
Reviewed-by: Ramesh Mylavarapu <rmylavarapu@nvidia.com >
Reviewed-by: Deepak Nibade <dnibade@nvidia.com >
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com >
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com >
GVS: Gerrit_Virtual_Submit
2020-12-15 14:13:28 -06:00
mkumbar
3cc0dec8e7
gpu: nvgpu: update pmu init ack to support new unit id
...
Added new command management unit id which will be received
as INIT ack from PMU ucode upon boot,
For legacy chips its called as INIT id, now changed to command
management id to initialize the command/message setup.
JIRA NVGPU-5185
Change-Id: I85203b373cef032f75b053b903d8b6763585be1f
Signed-off-by: mkumbar <mkumbar@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2396450
Reviewed-by: Deepak Nibade <dnibade@nvidia.com >
Reviewed-by: automaticguardword <automaticguardword@nvidia.com >
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com >
Reviewed-by: svc-mobile-misra <svc-mobile-misra@nvidia.com >
Reviewed-by: svc-mobile-cert <svc-mobile-cert@nvidia.com >
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com >
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com >
GVS: Gerrit_Virtual_Submit
2020-12-15 14:13:28 -06:00
mkumbar
880a639a86
gpu: nvgpu: skip simulation check for pmu-lsfm unit
...
skip simulation check for pmu-lsfm unit as lsfm unit execution
is required on simulation to support secure boot of ctxsw.
JIRA NVPU-5200
Change-Id: I85b8896643551e782b59663b13c52df36169754c
Signed-off-by: mkumbar <mkumbar@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2396449
Reviewed-by: automaticguardword <automaticguardword@nvidia.com >
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com >
Reviewed-by: svc-mobile-misra <svc-mobile-misra@nvidia.com >
Reviewed-by: svc-mobile-cert <svc-mobile-cert@nvidia.com >
Reviewed-by: Deepak Nibade <dnibade@nvidia.com >
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com >
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com >
GVS: Gerrit_Virtual_Submit
2020-12-15 14:13:28 -06:00
mkumbar
b9ce3d50fc
gpu: nvgpu: pmu: Add new command line args for nvgpu-next
...
Added new command line args for nvgpu-next and made
required changes to support new args
JIRA NVGPU-5185
Change-Id: I26faa3b8498387421b798b7abf9e757ed188f7f4
Signed-off-by: mkumbar <mkumbar@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2396494
Reviewed-by: automaticguardword <automaticguardword@nvidia.com >
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com >
Reviewed-by: svc-mobile-cert <svc-mobile-cert@nvidia.com >
Reviewed-by: Deepak Nibade <dnibade@nvidia.com >
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com >
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com >
GVS: Gerrit_Virtual_Submit
2020-12-15 14:13:28 -06:00
mkumbar
e6c9c30b32
gpu: nvgpu: Add PMU ucode version for nvgpu-next
...
Adding PMU ucode version for nvgpu-next
chips_a P4 CL#: 28820694
JIRA NVGPU-5183
Change-Id: Id70bec5ad1422cce5fc0b0081f4d5924a4a15e09
Signed-off-by: mkumbar <mkumbar@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2378149
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com >
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com >
2020-12-15 14:13:28 -06:00
mkumbar
72e2f2e064
gpu: nvgpu: PMU NS ucode blob update
...
Created PMU fw ops to support mutliple version of PMU NS
boot blob creation as there is a pmu_ucode_desc interface
change between legacy and new interface.
Added pmu_ucode_desc_v1 interface to support igpu PMU on
nvgpu-next
JIRA NVGPU-5183
Change-Id: I9f132aa84681d78b05b03913c71a30dda08053f8
Signed-off-by: mkumbar <mkumbar@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2377832
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com >
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com >
2020-12-15 14:13:28 -06:00
mkumbar
918fa1a658
gpu: nvgpu: PMU NS ucode boot update
...
Removed gpmu_ucode.bin usage by fetching PMU ucode descriptor
and image from respective files for NS boot.
JIRA NVGPU-5183
Change-Id: I597c5dd17b4a58603f550b32980d7d0ca9624aed
Signed-off-by: mkumbar <mkumbar@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2376448
Reviewed-by: automaticguardword <automaticguardword@nvidia.com >
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com >
Reviewed-by: svc-mobile-cert <svc-mobile-cert@nvidia.com >
Reviewed-by: Vijayakumar Subbu <vsubbu@nvidia.com >
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com >
GVS: Gerrit_Virtual_Submit
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com >
2020-12-15 14:13:28 -06:00
mkumbar
3f75e62c26
gpu: nvgpu: update super surface for igpu
...
Add supper surface gpu_va details to super surface header member
as needed by PMU ucode to process.
This is required for iGPU PMU ucode on nvgpu-next to process command
line args and ACK back with INIT message, without this PMU ucode ends
up in hang due to DMA wait.
Update super-surface details to cmd line args for PMU ucode to
know the starting address of super-surface in SYSMEM.
JIRA NVGPU-5186
Change-Id: I56d7d3e28527e46707663c97bc8e2a58000c7f5a
Signed-off-by: mkumbar <mkumbar@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2376364
Reviewed-by: automaticguardword <automaticguardword@nvidia.com >
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com >
Reviewed-by: svc-mobile-cert <svc-mobile-cert@nvidia.com >
Reviewed-by: Vijayakumar Subbu <vsubbu@nvidia.com >
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com >
GVS: Gerrit_Virtual_Submit
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com >
2020-12-15 14:13:28 -06:00
mkumbar
e6a3540ec1
gpu: nvgpu: support nvgpu-next for PMU on iGPU
...
Support lsfm, perfmon and PG for iGPU PMU on nvgpu-next
JIRA NVGPU-5183
Change-Id: Idbe1125c2a8f347de3f59c4ec824df9600573e7a
Signed-off-by: mkumbar <mkumbar@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2376321
Reviewed-by: automaticguardword <automaticguardword@nvidia.com >
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com >
Reviewed-by: svc-mobile-misra <svc-mobile-misra@nvidia.com >
Reviewed-by: svc-mobile-cert <svc-mobile-cert@nvidia.com >
Reviewed-by: Vijayakumar Subbu <vsubbu@nvidia.com >
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com >
GVS: Gerrit_Virtual_Submit
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com >
2020-12-15 14:13:28 -06:00
Shashank Singh
71c8d998d4
gpu: nvgpu: return error if therm is uninitialized
...
If therm is not initialized then return error for getting temperature
API.
Bug 200638833
Jira NVGPU-5832
Change-Id: Iebe44218d76d39d5bf765e8de6fd74c3b64c8b68
Signed-off-by: Shashank Singh <shashsingh@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2382905
Reviewed-by: Dinesh T <dt@nvidia.com >
Reviewed-by: automaticguardword <automaticguardword@nvidia.com >
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com >
Reviewed-by: svc-mobile-misra <svc-mobile-misra@nvidia.com >
Reviewed-by: svc-mobile-cert <svc-mobile-cert@nvidia.com >
Reviewed-by: Ramesh Mylavarapu <rmylavarapu@nvidia.com >
Reviewed-by: Vaibhav Kachore <vkachore@nvidia.com >
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com >
GVS: Gerrit_Virtual_Submit
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com >
2020-12-15 14:13:28 -06:00
mkumbar
59230fe64a
gpu: nvgpu: disable PMU PSTATE support if LS PMU disabled
...
disable PMU PSTATE support if LS PMU support is disabled.
JIRA NVGPU-5474
Change-Id: Idc2d9d802473f0b3d898fddbdf4aead9d68285c9
Signed-off-by: mkumbar <mkumbar@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2365591
Reviewed-by: automaticguardword <automaticguardword@nvidia.com >
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com >
Reviewed-by: svc-mobile-misra <svc-mobile-misra@nvidia.com >
Reviewed-by: svc-mobile-cert <svc-mobile-cert@nvidia.com >
Reviewed-by: Vaibhav Kachore <vkachore@nvidia.com >
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com >
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com >
GVS: Gerrit_Virtual_Submit
2020-12-15 14:13:28 -06:00
Abdul Salam
d339d9ed33
gpu: nvgpu: segregate clk_mon from clk unit.
...
As a part of refactoring this CL removes clk_mon unit from
clk unit.
Clk_mon is used for monitoring of clk and it is an independent unit.
This patch does the following.
*Move the clk_mon struct from clk.h to clk_mon_tu104.h
*create a new clk_mon gpu_ops and assign clk_mon specific ops there.
*Move all the function to clk_mon_tu104.c
*Update the yaml file
NVGPU-4689
Change-Id: Ia72bf28a93ce9a7936c277076f365c4b6593b032
Signed-off-by: Abdul Salam <absalam@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2336230
Reviewed-by: automaticguardword <automaticguardword@nvidia.com >
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com >
Reviewed-by: svc-mobile-misra <svc-mobile-misra@nvidia.com >
Reviewed-by: Mahantesh Kumbar <mkumbar@nvidia.com >
Reviewed-by: Vaibhav Kachore <vkachore@nvidia.com >
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com >
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com >
2020-12-15 14:13:28 -06:00
Abdul Salam
97de1ba74d
gpu: nvgpu: Use unified struct to store slave freq
...
Instead of using multiple struct use a single nvgpu_clk_slave_freq
to store the slave freq of gpcclk.
With this patch single struct can be used by both clk_arb and clk_domain.
This will remove nvgpu_set_fll_clk struct as nvgpu_clk_slave_freq serves
the purpose.
NVGPU-4692
Change-Id: Ie45d63e4376b83e153a9aa75e2c4631c6dad857b
Signed-off-by: Abdul Salam <absalam@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2339213
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
700bd83b41
gpu: nvgpu: Rename/clean boardobj unit
...
-Removed unwanded boardobj includes
-Renamed functions as struct as per usage
NVGPU-4484
Signed-off-by: rmylavarapu <rmylavarapu@nvidia.com >
Change-Id: I792a4b64075d5e87f911c1073717dbe7107227a1
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2335991
Reviewed-by: automaticguardword <automaticguardword@nvidia.com >
Reviewed-by: Mahantesh Kumbar <mkumbar@nvidia.com >
Reviewed-by: Vaibhav Kachore <vkachore@nvidia.com >
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com >
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com >
GVS: Gerrit_Virtual_Submit
2020-12-15 14:13:28 -06:00
rmylavarapu
8e545ef04b
gpu: nvgpu: Fix boardobj allocation size
...
In current implementation we are allocating boardobj
in nvgpu_boardobj_construct_super for all units and assigning
that pointer to boardobj type, as the size differe for different
units assigning the boardobj pointer to a common type will
give violations. Fixing them by allocating mem a head
and later call construct_super for elements initialization.
NVGPU-4484
Change-Id: I9b5ed1a6d8418fec48a29eee38d55fc7d83fcfab
Signed-off-by: rmylavarapu <rmylavarapu@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2335989
Reviewed-by: automaticguardword <automaticguardword@nvidia.com >
Reviewed-by: Mahantesh Kumbar <mkumbar@nvidia.com >
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com >
Reviewed-by: svc-mobile-misra <svc-mobile-misra@nvidia.com >
Reviewed-by: svc-mobile-cert <svc-mobile-cert@nvidia.com >
Reviewed-by: Vaibhav Kachore <vkachore@nvidia.com >
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com >
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com >
GVS: Gerrit_Virtual_Submit
2020-12-15 14:13:28 -06:00
rmylavarapu
0115c26f1b
gpu: nvgpu: Boardobj lite unit refactor
...
As boardobj unit is used only in PMU, the plan is to move
all the boardobj related functions/structures and Macros
to boardobj specific folders. This will remove unnecessary
usage of boardobj outside PMU.
NVGPU-4484
Change-Id: I9f0fda32e6affd1fce218eb0ac638a9dfc8b99c3
Signed-off-by: rmylavarapu <rmylavarapu@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2335986
Reviewed-by: Mahantesh Kumbar <mkumbar@nvidia.com >
Reviewed-by: automaticguardword <automaticguardword@nvidia.com >
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com >
Reviewed-by: svc-mobile-misra <svc-mobile-misra@nvidia.com >
Reviewed-by: svc-mobile-cert <svc-mobile-cert@nvidia.com >
Reviewed-by: Vaibhav Kachore <vkachore@nvidia.com >
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com >
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com >
GVS: Gerrit_Virtual_Submit
2020-12-15 14:13:28 -06:00
Abdul Salam
076c85f813
gpu: nvgpu: Move clk_pmu struct from public include to unit include
...
As a part of refactoring move nvgpu_clk_pmupstate from public to
private include.
Also remove all function pointers from the struct and use functions
as only single pstate is supported.
This function pointers were created to address multiple pstate support
which no more needed now.
NVGPU-4690
Change-Id: Iee556feed4a25902faba87a606418861185e4089
Signed-off-by: Abdul Salam <absalam@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2334826
Reviewed-by: automaticguardword <automaticguardword@nvidia.com >
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com >
Reviewed-by: svc-mobile-cert <svc-mobile-cert@nvidia.com >
Reviewed-by: svc-mobile-misra <svc-mobile-misra@nvidia.com >
Reviewed-by: Mahantesh Kumbar <mkumbar@nvidia.com >
Reviewed-by: Vaibhav Kachore <vkachore@nvidia.com >
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com >
GVS: Gerrit_Virtual_Submit
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com >
2020-12-15 14:13:28 -06:00
Abdul Salam
88d3640bc5
gpu: nvgpu: Refacotor clk_domain Unit
...
As a part of refactoring this patch does the following
*Move local struct to unit specific header file
*Move nvgpu_pmu_clk_domain_freq_to_volt from clk.c to
clk_domain.c
*Move PMU specific struct to ucode_clk_inf.h
*Merge content from nvgpu/clk.h to pmu/clk/clk.h
*Update yaml file
This will help to have arch consistency across all units.
Change-Id: Ied5c6ee637e7fd5bbdee3f5bc3f6cf216454428a
Signed-off-by: Abdul Salam <absalam@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2333366
Reviewed-by: automaticguardword <automaticguardword@nvidia.com >
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com >
Reviewed-by: svc-mobile-cert <svc-mobile-cert@nvidia.com >
Reviewed-by: Mahantesh Kumbar <mkumbar@nvidia.com >
Reviewed-by: Vaibhav Kachore <vkachore@nvidia.com >
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com >
GVS: Gerrit_Virtual_Submit
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com >
2020-12-15 14:13:28 -06:00
Divya Singhatwaria
c060e754fc
gpu: nvgpu: ELPG dump stats at shutdown
...
ELPG_DISALLOW command fails during gk20a shutdown.
It was due to nvgpu_can_busy() which was returning
0 before without acknowledging the ELPG_DISALLOW
command.
Since the system is shutting down so fix this issue
by setting the ACK for disallow command without
waiting for actual ACK from PMU.
In doing so the state machine is also maintained
properly and the driver does not dump fail stats.
BUG 200588696
Change-Id: I943d8e6108fa0f9c418ccb1a7f061307823f1ec6
Signed-off-by: Divya Singhatwaria <dsinghatwari@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2308557
Reviewed-by: automaticguardword <automaticguardword@nvidia.com >
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com >
Reviewed-by: svc-mobile-misra <svc-mobile-misra@nvidia.com >
Reviewed-by: svc-mobile-cert <svc-mobile-cert@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 >
GVS: Gerrit_Virtual_Submit
2020-12-15 14:13:28 -06:00
Abdul Salam
af3311ddea
gpu: nvgpu: Refactor clock_domain unit
...
As a part of refactoring move nvgpu_clk_domain struct from public
to private.
This will help to have arch consistency across all units.
Use public functions to fetch the data across other units.
The following functions are added to access data in clk_domain unit.
*nvgpu_pmu_clk_domain_get_f_points()--> To get freq points
*nvgpu_pmu_clk_domain_update_clk_info() --> To update change seq script
with clock domain data
NVGPU-4689
Change-Id: Idc85e3cf5bbe1b80766ce6c9f07b3305ef04cbdc
Signed-off-by: Abdul Salam <absalam@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2332185
Reviewed-by: automaticguardword <automaticguardword@nvidia.com >
Reviewed-by: Ramesh Mylavarapu <rmylavarapu@nvidia.com >
Reviewed-by: Vaibhav Kachore <vkachore@nvidia.com >
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com >
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com >
2020-12-15 14:13:28 -06:00
Abdul Salam
b029f3b2b0
gpu: nvgpu: Reactor clk_fll unit
...
As a part of refactor move struct nvgpu_avfsfllobjs from public header
to private header.
This will help to have arch consistency across all units.
Use public functions to fetch the data across other units.
NVGPU-4690
Change-Id: I73a750695c2ae7d3e46d1d692d10e40f13ec3cb3
Signed-off-by: Abdul Salam <absalam@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/#/c/linux-nvgpu/+/2326675/
(cherry picked from commit 41e374461da5dc9e2b4ac67a0855fd8dd20e1450)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2328538
Reviewed-by: automaticguardword <automaticguardword@nvidia.com >
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com >
Reviewed-by: svc-mobile-misra <svc-mobile-misra@nvidia.com >
Reviewed-by: svc-mobile-cert <svc-mobile-cert@nvidia.com >
Reviewed-by: Ramesh Mylavarapu <rmylavarapu@nvidia.com >
Reviewed-by: Vaibhav Kachore <vkachore@nvidia.com >
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com >
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com >
GVS: Gerrit_Virtual_Submit
2020-12-15 14:13:28 -06:00
Thomas Fleury
28ccd63f69
gpu: nvgpu: enable CONFIG_NVGPU_LS_PMU for safety
...
Enable CONFIG_NVGPU_LS_PMU for dGPU safety build.
Add missing #ifdefs for CONFIG_NVGPU_POWER_PG and
CONFIG_NVGPU_CLK_ARB which are not defined for safety build.
Moved gm20b_mc_is_enabled to fusa code.
NVGPU_UNIT_PWR is only defined when CONFIG_NVGPU_HAL_NON_FUSA
is defined. Added #ifdefs to compile out gk20a_pmu functions
that are using it.
Jira NVGPU-4661
Change-Id: Ieb552f9374bad6f3dad777322f118931e0bc94ec
Signed-off-by: Thomas Fleury <tfleury@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2317085
Reviewed-by: automaticguardword <automaticguardword@nvidia.com >
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com >
Reviewed-by: svc-mobile-cert <svc-mobile-cert@nvidia.com >
Reviewed-by: Deepak Nibade <dnibade@nvidia.com >
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com >
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com >
GVS: Gerrit_Virtual_Submit
2020-12-15 14:13:28 -06:00
rmylavarapu
a5b3170c6f
gpu: nvgpu: Refactor allocator lite unit
...
- Changed the names of structs as per private/public
naming convention.
- Renamed allocator.c file
NVGPU-4487
Change-Id: I42ec5730f1cb0029a6bb6e6ddff151bd08d6bbd8
Signed-off-by: rmylavarapu <rmylavarapu@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2316945
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
f5acc98db3
gpu: nvgpu: Refactor Super surface lite unit
...
- Changed the names of structs as per private/public
naming convention.
- Removed unwanted code in struct super_surface.
NVGPU-4486
Change-Id: I5834c2296ccbe1545bca6a608ad88817a9104fb8
Signed-off-by: rmylavarapu <rmylavarapu@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2313989
Reviewed-by: automaticguardword <automaticguardword@nvidia.com >
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Mahantesh Kumbar <mkumbar@nvidia.com >
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com >
Reviewed-by: svc-mobile-cert <svc-mobile-cert@nvidia.com >
Reviewed-by: Vaibhav Kachore <vkachore@nvidia.com >
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com >
GVS: Gerrit_Virtual_Submit
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com >
2020-12-15 14:13:28 -06:00
rmylavarapu
147564cbd5
gpu: nvgpu: NVGPU migration to support latest ucode
...
Changes:
- Send down BOARDOBJGRP classId to the PMU. Assign each
BOARDOBJ the classId of its parent group which is set
to zero in current implementation. Changed in NVGPU to send
board obj grp classid to PMU.
- Disable IPC VMIN support as pmu-tu10a profile doesn't support.
- Change in clk vf point enumeration types.
- Change in pstate type values.
- Updated ctrl_perf_vfe_var_single_sensed_fuse_ver_vfield_info
NVGPU-PMU interface struct with b_ver_expected_is_mask to send
whether the expected version is single value or should be
interpreted as a bit mask with bits corresponding to
expected versions set.
NVBUG-200593676
NVGPU-5066
Change-Id: I17b172d88f8b74fbf78044caf7f64cd8811f9fb7
Signed-off-by: rmylavarapu <rmylavarapu@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2308533
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com >
Reviewed-by: svc-mobile-cert <svc-mobile-cert@nvidia.com >
Reviewed-by: Mahantesh Kumbar <mkumbar@nvidia.com >
Reviewed-by: Vijayakumar Subbu <vsubbu@nvidia.com >
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com >
GVS: Gerrit_Virtual_Submit
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com >
2020-12-15 14:13:28 -06:00
rmylavarapu
dc32307c13
gpu: nvgpu: Rename therm public struct
...
Renamed therm public struct to match with the other
units.
NVGPU-4449
Change-Id: I675ce43b136139420b8cc1eecdc395d9165d9f30
Signed-off-by: rmylavarapu <rmylavarapu@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2307090
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com >
Reviewed-by: svc-mobile-misra <svc-mobile-misra@nvidia.com >
Reviewed-by: svc-mobile-cert <svc-mobile-cert@nvidia.com >
Reviewed-by: Vaibhav Kachore <vkachore@nvidia.com >
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com >
GVS: Gerrit_Virtual_Submit
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com >
2020-12-15 14:13:28 -06:00
rmylavarapu
e424e4791a
gpu: nvgpu: perf: Refactor Perf unit
...
-Renamed and moved nvgpu_pmu_perf struct from public
to unit specific
-Renamed all functions as per public/private format
NVGPU-5029
Change-Id: If3f479bb1443850a5c8a8714cd1c9da346cb566a
Signed-off-by: rmylavarapu <rmylavarapu@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2300609
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com >
Reviewed-by: automaticguardword <automaticguardword@nvidia.com >
Reviewed-by: Vaibhav Kachore <vkachore@nvidia.com >
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com >
GVS: Gerrit_Virtual_Submit
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com >
2020-12-15 14:13:28 -06:00
rmylavarapu
a23d0c1c19
gpu: nvgpu: Check for timeout and indicate error
...
For every copy_back enabled PMU cmd sent by NVGPU
we are waiting for PMU response but not checking
for timeout error. This will result in copying invalid
data which causes errors. Implemented timeout check
and return error if timedout.
NVBUG-200530426
Change-Id: I32eba16eeb6f7a56724329ab6d85fae062c6fa3f
Signed-off-by: rmylavarapu <rmylavarapu@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2258947
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
ed33c465d5
gpu: nvgpu: Check for ACK from PMU before timeout
...
At present in NVGPU for every get_status cmd we wait
for a response from PMU else timeout. In present code
we look for the ACK very early then after processing
the interrupts, this may result in timeout with valid
response from PMU. To avoid this timeout a check for
ACK is implemented before every timeout check.
NVBUG-200530426
Change-Id: I6f8df51ab73066953ef7c9c05c61aaf543e53b52
Signed-off-by: rmylavarapu <rmylavarapu@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2258899
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com >
Reviewed-by: Alex Waterman <alexw@nvidia.com >
Reviewed-by: Mahantesh Kumbar <mkumbar@nvidia.com >
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com >
Reviewed-by: svc-mobile-misra <svc-mobile-misra@nvidia.com >
Reviewed-by: Vaibhav Kachore <vkachore@nvidia.com >
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com >
GVS: Gerrit_Virtual_Submit
2020-12-15 14:13:28 -06:00
Abdul Salam
29d4831780
gpu: nvgpu: Segregate volt unit members based on their accessibility
...
Currently all unit specific private members are inside ucode_volt_inf.h.
This patch moves the members specific to pmuif to ucode_volt_inf.h and
local to volt.h.
Append all unit specific local functions with volt/nvgpu.
Move volt specific rpc handler from g->pmu to g->pmu->volt.
NVGPU-4492
Change-Id: I626e002b3876c6c5330dec4396b7661b986c6119
Signed-off-by: Abdul Salam <absalam@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2299555
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com >
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com >
Reviewed-by: Vaibhav Kachore <vkachore@nvidia.com >
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com >
GVS: Gerrit_Virtual_Submit
2020-12-15 14:13:28 -06:00
Sagar Kamble
d0d8ef79d1
gpu: nvgpu: use READ_ONCE/WRITE_ONCE
...
In the upstream kernel ACCESS_ONCE is now deprecated with reason as
given in the following related commit:
commit 381f20fceba8e ("security: use READ_ONCE instead of deprecated
ACCESS_ONCE")
ACCESS_ONCE() does not work reliably on non-scalar types. For
example gcc 4.6 and 4.7 might remove the volatile tag for such
accesses during the SRA (scalar replacement of aggregates) step.
Replace usages of ACCESS_ONCE with READ_ONCE and WRITE_ONCE in nvgpu.
Bug 2834141
Change-Id: I9904c49e1a4d7b17ed2fe54360051d08595a2982
Signed-off-by: Sagar Kamble <skamble@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2294096
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com >
Reviewed-by: Vijayakumar Subbu <vsubbu@nvidia.com >
Reviewed-by: Jonathan Hunter <jonathanh@nvidia.com >
Reviewed-by: Debarshi Dutta <ddutta@nvidia.com >
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com >
2020-12-15 14:13:28 -06:00
Abdul Salam
77c220c1ae
gpu: nvgpu: Convert define to funtions in clk unit
...
As a part of refactoring this patch does the following
*Convert #define to functions, This will help in unit testing
*Remove #define which are not needed
*Merge all clk subunits to single clock unit in yaml
NVGPU-4492
Change-Id: If3f3dbd714e710398c0f860f4d5022675136db8c
Signed-off-by: Abdul Salam <absalam@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2298874
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com >
Reviewed-by: Ramesh Mylavarapu <rmylavarapu@nvidia.com >
Reviewed-by: Vaibhav Kachore <vkachore@nvidia.com >
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com >
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com >
GVS: Gerrit_Virtual_Submit
2020-12-15 14:13:28 -06:00
Abdul Salam
8e840a5af1
gpu: nvgpu: Segregate clk unit members based on their accessibility
...
Current clk unit has multiple header files under include folder.
This has combination of public struct which is accessed outside the
unit and private struct which is accessed within clk unit.
This patch segregates them based on their accessibility.
All private items are moved into ucode_clk_inf.h from include which only
clk can access.
All public items are moved into include/clk.h which other units can
access and removed the clk_xxx.h files
NVGPU-4689
Change-Id: I469270ae539e09a3f6fe6187207791732407863e
Signed-off-by: Abdul Salam <absalam@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2298220
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com >
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com >
2020-12-15 14:13:28 -06:00
Nitin Kumbhar
9770723639
gpu: nvgpu: add checks for kzalloc() allocations
...
Check kzalloc() allocations for failures and return
an error if an allocation fails.
Bug 2279948
Change-Id: I8a2c3b84904da897ad6118900c11489c8656c20f
Signed-off-by: Nitin Kumbhar <nkumbhar@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/2020123
(cherry picked from commit fadd0014da )
(cherry picked from commit 73254fc51281370b2bcce06b3e890d8da725d8d5)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2298097
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com >
Reviewed-by: svc-mobile-misra <svc-mobile-misra@nvidia.com >
Reviewed-by: Debarshi Dutta <ddutta@nvidia.com >
Reviewed-by: Deepak Nibade <dnibade@nvidia.com >
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com >
GVS: Gerrit_Virtual_Submit
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com >
2020-12-15 14:13:28 -06:00
Abdul Salam
17cc9b2b98
gpu: nvgpu: Refactor Clock unit.
...
Current clk unit has multiple header files under pmuif folder.
This has combination of public struct which is accessed outside the
unit and private struct which is accessed within clk unit.
This patch segregates them based on their accessibility.
All private items are moved into ucode_clk_inf.h from pmuif which only
clk can access.
All public items are moved into include/clk.h which other units can
access
This will help in documentation of items for public items.
NVGPU-4491
Change-Id: Iccb0571e05ecb3cb13363390bed8c7214409b543
Signed-off-by: Abdul Salam <absalam@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2292318
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com >
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com >
2020-12-15 14:13:28 -06:00
Abdul Salam
75eabece8b
gpu: nvgpu: Move volt unit from perf to pmu.
...
As a part of refactoring volt unit, move volt struct from
perf to pmu.
This will help to segregate volt from perf as both are
different units.
Add functions to allocate/free volt related structure.
Also remove macro's in Volt unit.
NVGPU-4492
Change-Id: I1b56aeee5e5f1a14c277155f147344275809f8d3
Signed-off-by: Abdul Salam <absalam@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2286477
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com >
Reviewed-by: svc-mobile-cert <svc-mobile-cert@nvidia.com >
Reviewed-by: Ramesh Mylavarapu <rmylavarapu@nvidia.com >
Reviewed-by: Vaibhav Kachore <vkachore@nvidia.com >
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com >
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com >
GVS: Gerrit_Virtual_Submit
2020-12-15 14:13:28 -06:00
Abdul Salam
b21f300db7
gpu: nvgpu: Refactor Volt unit
...
Current volt unit has multiple header files under pmuif folder.
This has combination of public struct which is accessed outside the
unit and private struct which is accessed within volt unit.
This patch segregates them based on their accessibility.
All private items are moved into ucode_volt_inf.h from pmuif which only
volt can access.
All public items are moved into include/volt.h which other units can
access
This will help in documentation of items for public items.
NVGPU-4492
Change-Id: Id40bf4922408a55f1e67d071be726839ac57718f
Signed-off-by: Abdul Salam <absalam@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2289114
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
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
Abdul Salam
e21d70574c
gpu: nvgpu: Fix mismatch in Volt boardobj parsing
...
There is a mismatch between data parsed by nvgpu struct to pmu struct.
This patch fixes this by correctly parsing the data from vbios and
sending it to pmu.
This was unnoticed till now and started poping up during refactoring.
NVGPU-4492
Change-Id: I75648de41832eadd39aa499a5354705694699238
Signed-off-by: Abdul Salam <absalam@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2289748
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com >
Reviewed-by: svc-mobile-misra <svc-mobile-misra@nvidia.com >
Reviewed-by: svc-mobile-cert <svc-mobile-cert@nvidia.com >
Reviewed-by: Ramesh Mylavarapu <rmylavarapu@nvidia.com >
Reviewed-by: Vaibhav Kachore <vkachore@nvidia.com >
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com >
GVS: Gerrit_Virtual_Submit
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com >
2020-12-15 14:13:28 -06:00
Abdul Salam
11b34e891f
gpu: nvgpu: Refactor Clk unit.
...
As a part of refactoring, need to move clk sw/pmu setup functions
from pmu_pstate unit to clk unit as it belongs there.
In this patch the public API is moved from pmu_pstate to clk unit and
named according to private/public API.
NVGPU-4491
Change-Id: I90a7dc821e3a3633c7ac657b398f90e374663d61
Signed-off-by: Abdul Salam <absalam@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2282937
Reviewed-by: Vaibhav Kachore <vkachore@nvidia.com >
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com >
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com >
GVS: Gerrit_Virtual_Submit
2020-12-15 14:13:28 -06:00