Commit Graph

7112 Commits

Author SHA1 Message Date
Antony Clince Alex
e469c9cd98 gpu: nvgpu: add doxygen comments for common.ecc unit
Add doxygen style comments for common.ecc unit.

Jira NVGPU-2475

Change-Id: Ie31f27a5fb253ac33e7b1b795c7268fd4a626a32
Signed-off-by: Antony Clince Alex <aalex@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/2217455
Reviewed-by: Rajesh Devaraj <rdevaraj@nvidia.com>
Reviewed-by: Philip Elcan <pelcan@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: Ankur Kishore <ankkishore@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
2020-12-15 14:10:29 -06:00
Tejal Kudav
6336c78c40 gpu: nvgpu: Doxygen for ptimer unit
Move ptimer unit HALS outside gk20a.h. This is required for
documenting the HALs. We divide the ptimer unit HALs into 3 categories:
 1. Private HALs
 2. FUSA HALs
 3. NON-FUSA HALs
This classification will help focus only on FUSA HALs in design
document and exclude the non-safety related ones from design
document.

Add ptimer HAL header file which contains the HALs exposed by ptimer
unit.

Use @cond...@endcond to skip documentation for NON-FUSA HALs and
private HALs from ptimer unit.

Add doxygen comments for
1. ptimer unit's public HAL used in safety build
	a. ptimer.isr
2. ptimer unit's public APIs
	a. ptimer_scalingfactor10x()
	b. ptimer_scale()

JIRA NVGPU-2503

Change-Id: If5fb00733e122b27826ec36503f175fae172c71b
Signed-off-by: Tejal Kudav <tkudav@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/2219427
Reviewed-by: Deepak Nibade <dnibade@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>
2020-12-15 14:10:29 -06:00
Vinod G
a57ecef829 gpu: nvgpu: doxygen udpate for common.io
Doxygen update for common.io based on review comments.

Jira NVGPU-2482

Change-Id: I8271ecf36fcd24d3170d39fee00ed0844f338544
Signed-off-by: Vinod G <vinodg@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/2222775
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Philip Elcan <pelcan@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
2020-12-15 14:10:29 -06:00
Lakshmanan M
974f72b104 gpu: nvgpu: add @file syntax in mm header files
Add @file syntax in the following mm header files,
1) page_allocator.h
2) kmem.h
3) gmmu.h
4) pd_cache.h
5) pd_cache_priv.h

JIRA NVGPU-4105

Change-Id: Ifa8b9ef5f0d11608a5d6f165ba64566a32596972
Signed-off-by: Lakshmanan M <lm@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/2223012
Reviewed-by: Rajesh Devaraj <rdevaraj@nvidia.com>
Reviewed-by: Alex Waterman <alexw@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
2020-12-15 14:10:29 -06:00
rmylavarapu
b2b09b1832 nvgpu: gpu: Update ucode firmware version
As per ucode from P4CL#27398577 the fw_version is
27397105 and same is updated in NVGPU. This is needed
for using latest ucode binaries.

Change-Id: If7b0e1de5ba383442768697e29351f87e76e9879
Signed-off-by: rmylavarapu <rmylavarapu@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/2210544
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: Mahantesh Kumbar <mkumbar@nvidia.com>
Reviewed-by: Vijayakumar Subbu <vsubbu@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
2020-12-15 14:10:29 -06:00
rmylavarapu
bdee5d7a64 nvgpu: gpu: Add boot pstate index in Pstate boardobj
In the change_seq of latest ucode, the boot pstate
index was taken from pstate board_objs instead of the
value from change_input. This forces the need of
introducing boot index in pstate board_obj structure.
The index is the performance table entry index of
P0 pstate.

The ucode change is described in P4CL #27304645

NVGPU-4081

Change-Id: Id3f4a1da7015cd6b7efe555529f1fa13c9f3b391
Signed-off-by: rmylavarapu <rmylavarapu@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/2202363
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com>
Reviewed-by: Mahantesh Kumbar <mkumbar@nvidia.com>
Reviewed-by: Vijayakumar Subbu <vsubbu@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
2020-12-15 14:10:29 -06:00
rmylavarapu
65a7896987 nvgpu: gpu: Implement PMU therm channel get status
Currently nvgpu reads the temperature by reading the
NV_THERM_I2CS_SENSOR_00 register. Below are the issues
with current approach
    1) NV_THERM_I2CS_SENSOR_00 doesn't support
       fractional precision which is POR.
    2) It doesn't support negative temperatures which
       is required for Auto.
    3) It doesn't take into account the right POR
       sensor in VFE VBIOS tables.

From therm channel get status interface we can read the
current temperature from PMU.

NVBUG - 200549047

Change-Id: I2fb21926208876f3d3bebe3f2dee08edafedbc7d
Signed-off-by: rmylavarapu <rmylavarapu@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/2196224
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@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>
2020-12-15 14:10:29 -06:00
Nicolas Benech
deff8257a1 gpu: nvgpu: doxygen: apply FUSA-related flags
The doxygen config file did not have any defined flags for FUSA.
This patch adds the current known FUSA-related flags.

JIRA NVGPU-1325

Change-Id: I7c4c7cb0f3dd0270b3a020960ced041d0e4dba74
Signed-off-by: Nicolas Benech <nbenech@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/2221172
Tested-by: Rajesh Devaraj <rdevaraj@nvidia.com>
Reviewed-by: Rajesh Devaraj <rdevaraj@nvidia.com>
Reviewed-by: Seema Khowala <seemaj@nvidia.com>
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>
2020-12-15 14:10:29 -06:00
Nicolas Benech
0f5c61748a gpu: nvgpu: unit: increase coverage of mm.vm
This patch brings a number of changes to the mm.vm unit test:
- test_map_buf: add steps to check for error cases and increase
  coverage.
- test_map_buf_gpu_va: add steps to check for error cases and
  increase coverage.
- test_init_error_paths: new test to target all possible error
  paths in the VM init code.
- test_map_buffer_error_cases: new test to target all possible
  error paths in the buffer mapping logic.
- test_nvgpu_vm_alloc_va: new test to target the nvgpu_vm_alloc_va
  API and also target error paths.
- test_vm_bind: new test to target the nvgpu_vm_bind_channel API
  and also target error paths.
- test_vm_aspace_id: new test to target the vm_aspace_id API
  and also target error paths.

JIRA NVGPU-909

Change-Id: I755c89a6de09376d2624130a98966c172d850bfe
Signed-off-by: Nicolas Benech <nbenech@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/2217679
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
2020-12-15 14:10:29 -06:00
Nicolas Benech
563955aead gpu: nvgpu: posix: improve nvgpu_vm_find_mapping for testing
The nvgpu_vm_find_mapping API was always returning NULL. For test
purposes, this new implementation is similar to the one in use for
Linux.

JIRA NVGPU-909

Change-Id: Id311fe367ddfb1539fecd86fae4bb3a8f2d91491
Signed-off-by: Nicolas Benech <nbenech@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/2217678
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com>
Reviewed-by: svc-mobile-misra <svc-mobile-misra@nvidia.com>
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>
2020-12-15 14:10:29 -06:00
Nicolas Benech
6c5f67792c gpu: nvgpu: vm: remove unreachable code
There are 2 instances where some code is unreachable in vm.c
- The nvgpu_insert_mapped_buf function always returned 0, so any
  associated error handling was unreachable. This patch changes
  the function to return void instead.
- A cleanup section to unmap a buffer in case of error was also
  unreachable.

JIRA NVGPU-909

Change-Id: I6d8343b2994d314992a61dd640b10e68fbbc5e1e
Signed-off-by: Nicolas Benech <nbenech@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/2217677
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: Shashank Singh <shashsingh@nvidia.com>
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>
2020-12-15 14:10:29 -06:00
ajesh
cb97705055 gpu: nvgpu: add Doxygen documentation for bitops
Add Doxygen documentation details for bitops unit.

Jira NVGPU-2596

Change-Id: I5eb268fd24466c35cbddee1547f8b7205c9421c1
Signed-off-by: ajesh <akv@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/2201232
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Philip Elcan <pelcan@nvidia.com>
Reviewed-by: Alex Waterman <alexw@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
2020-12-15 14:10:29 -06:00
Thomas Fleury
b31038728f gpu: nvgpu: add VBIOS version for SKU601/610 QS
Add BoardID and minimal VBIOS version requirement
for SKU601 QS and SKU610 QS.

Bug 2723463

Change-Id: I64fb1ee3d4abf63c170420fbdb4233b88be6d62f
Signed-off-by: Thomas Fleury <tfleury@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/2221225
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: Vijayakumar Subbu <vsubbu@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
2020-12-15 14:10:29 -06:00
Thomas Fleury
ef050f57c8 gpu: nvgpu: doxygen for usermode HAL
Add documentation for usermode HALs that are called
from other units:
- base
- doorbell_token

Jira NVGPU-4040

Change-Id: I1f5faf7b0b5a23849459d24f1a51b6605769496d
Signed-off-by: Thomas Fleury <tfleury@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/2217642
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
2020-12-15 14:10:29 -06:00
dinesh
2240c543ca gpu: nvgpu: SWUD for nvhost-sync point unit
This is adding Doxygen for nvhost-sync point unit.

Change-Id: I7a45f2a265beee479638bcd5c837c450ef8e986e
Signed-off-by: dinesh <dt@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/2211714
Reviewed-by: Rajesh Devaraj <rdevaraj@nvidia.com>
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Ankur Kishore <ankkishore@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
2020-12-15 14:10:29 -06:00
Lakshmanan M
da274f1fbc gpu: nvgpu: add doxygen comments mm.pd_cache
Add doxygen documentation for mm.pd_cache in
pd_cache.h and pd_cache_priv.h.

JIRA NVGPU-4105

Change-Id: Ie914847ba6e01af39599d4b40caa7f84a787ec49
Signed-off-by: Lakshmanan M <lm@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/2220041
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Alex Waterman <alexw@nvidia.com>
GVS: Gerrit_Virtual_Submit
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:10:29 -06:00
Vinod G
6907aee633 gpu: nvgpu: Update Doxygen comments for gr units
Update  struct nvgpu_fecs_ecc_status comments for doxygen.

Move structures for method, mailbox and cond outside
the nvgpu_fecs_method_op struct, for better doxygen
format. Defining sturct within struct doesnot look
good in doxygen.

Jira NVGPU-4107

Change-Id: I34b2249119e5578c568139f958e6edab9d75d7c8
Signed-off-by: Vinod G <vinodg@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/2219748
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
2020-12-15 14:10:29 -06:00
Tejal Kudav
835ef0f3f7 gpu: nvgpu: Skip documentation for few TOP HALs
Use @cond...@endcond to skip documentation for NON-FUSA HALs and
private HALs from TOP unit.

JIRA NVGPU-2500

Change-Id: I48aef109b8f179205b8969784fccaaf68f24505f
Signed-off-by: Tejal Kudav <tkudav@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/2217576
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Vijayakumar Subbu <vsubbu@nvidia.com>
Reviewed-by: Sagar Kamble <skamble@nvidia.com>
Reviewed-by: Ankur Kishore <ankkishore@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
2020-12-15 14:10:29 -06:00
Tejal Kudav
fb48897e42 gpu: nvgpu: Doxygen for Top unit HAL
Add doxygen documentation for the public HALs exposed by TOP unit
and which are part of the safety build.

JIRA NVGPU-2500

Change-Id: I61bcbff29f1291702339e9c36203b0352d774006
Signed-off-by: Tejal Kudav <tkudav@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/2217560
Reviewed-by: Vijayakumar Subbu <vsubbu@nvidia.com>
Reviewed-by: Sagar Kamble <skamble@nvidia.com>
Reviewed-by: Ankur Kishore <ankkishore@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
2020-12-15 14:10:29 -06:00
Tejal Kudav
73695a0960 gpu: nvgpu: move Top unit HALs outside gk20a.h
This move is required for documenting the HALs. We divide the
Top unit HALs into 3 categories:
 1. Private HALs
 2. FUSA HALs
 3. NON-FUSA HALs
This classification will help focus only on FUSA HALs in design
document and exclude the non-safety related ones from design
document.

Also, add this HAL header file to yaml.

JIRA NVGPU-2500

Change-Id: I8325b4bb2677cba9be94e15ec2683d1c9e0bc68e
Signed-off-by: Tejal Kudav <tkudav@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/2215228
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
2020-12-15 14:10:29 -06:00
Philip Elcan
c0ad64cd77 gpu: nvgpu: add more doxygen to gk20a.h
Add more doxygen to common members of struct gk20a. Use @cond/@endcond
to limit inclusion of non-FUSA members. There's a number of
unit-specific members that are still undocumented.

JIRA NVGPU-2532

Change-Id: Ie0cb419e620b08405f9ed5890c712a937eb5c88d
Signed-off-by: Philip Elcan <pelcan@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/2220456
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>
2020-12-15 14:10:29 -06:00
Petlozu Pravareshwar
f3048853f8 gpu: nvgpu: add fault injection for posix routine
This change enables fault injection in nvgpu_thread_should_stop() API
which is a POSIX implementation of thread routine.

JIRA NVGPU-2679

Change-Id: Ib90764a5a81ccacfe8832c23e7752f723fc87788
Signed-off-by: Petlozu Pravareshwar <petlozup@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/2210959
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
2020-12-15 14:10:29 -06:00
ajesh
9588aa80c5 gpu: nvgpu: add Doxygen documentation for timers
Add Doxygen documentation details for timers unit.

Jira NVGPU-2596

Change-Id: If733bf0ceeff8c165aa8694e948ec9a6913c2e35
Signed-off-by: ajesh <akv@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/2200501
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>
2020-12-15 14:10:29 -06:00
ajesh
d3d7990835 gpu: nvgpu: add Doxygen details for posix units
Add Doxygen documentation for the following posix units,
	-thread
	-types
	-sort
	-os_sched
	-sizes

Jira NVGPU-2596

Change-Id: I141e236ce136a28aacfad26c4fcbc551dc2c9084
Signed-off-by: ajesh <akv@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/2198684
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Philip Elcan <pelcan@nvidia.com>
Reviewed-by: Alex Waterman <alexw@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
2020-12-15 14:10:29 -06:00
Nitin Kumbhar
9fdc70c22e gpu: nvgpu: add doxygen for common.defaults
Update defaults header to include doxygen documentation
for various default values used in NvGPU.

Currently, the header defines default values only for
timeouts.

JIRA NVGPU-2418

Change-Id: I4a29024dc6bf19c32a5070d0d75aa84ddebc3379
Signed-off-by: Nitin Kumbhar <nkumbhar@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/2219271
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Seshendra Gadagottu <sgadagottu@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>
2020-12-15 14:10:29 -06:00
Prateek sethi
6ba13726f5 gpu: nvgpu: add Doxygen documentation for firmware
Jira NVGPU-4147

Change-Id: If40d80b6b45d9902aaad4a5967917969b37a350b
Signed-off-by: Prateek sethi <prsethi@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/2216976
GVS: Gerrit_Virtual_Submit
Reviewed-by: Nitin Kumbhar <nkumbhar@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:10:29 -06:00
Nitin Kumbhar
98d8acb672 gpu: nvgpu: add doxygen for common.therm
Move therm HALs to its own header and add doxygen
documentation for public HALs.

JIRA NVGPU-4142

Change-Id: I7c4bec843bb8fed507b8d2dcaf46e4e55bbde298
Signed-off-by: Nitin Kumbhar <nkumbhar@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/2219111
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
2020-12-15 14:10:29 -06:00
ajesh
c6bbb0213d gpu: nvgpu: add Doxygen documentation for lock
Add Doxygen documentation for lock unit.

Jira NVGPU-2596

Change-Id: I5761b1bc1bedf000b0d417e4dfa740606c70fe6d
Signed-off-by: ajesh <akv@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/2199379
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Philip Elcan <pelcan@nvidia.com>
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>
2020-12-15 14:10:29 -06:00
ajesh
a9b9157e4d gpu: nvgpu: add Doxygen documentation for atomic
Add Doxygen documentation details for atomic unit.

Jira NVGPU-2596

Change-Id: I6b6d63569bd3452b3e9a9e49d45b1524dd1a10f3
Signed-off-by: ajesh <akv@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/2203511
Reviewed-by: Philip Elcan <pelcan@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>
2020-12-15 14:10:29 -06:00
Nicolas Benech
2f1d251d79 gpu: nvgpu: doxygen: fix param syntax
Doxygen requires a space between in/out qualifiers and the parameter
name. This patch fixes 500+ occurences of the issue.

JIRA NVGPU-4120

Change-Id: Iaa3a7c69e1bed9b528796b669e11a2f13aa63301
Signed-off-by: Nicolas Benech <nbenech@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/2219641
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
2020-12-15 14:10:29 -06:00
dinesh
25abe6a352 gpu: nvgpu: Compile out linux nvhost
This is added to compile out some non safety code from safety build.

JIRA NVGPU-4146

Change-Id: Ie2b05f7c1bf1d0400184ae95d39103828c28de1e
Signed-off-by: dinesh <dt@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/2217415
Reviewed-by: Philip Elcan <pelcan@nvidia.com>
Reviewed-by: Debarshi Dutta <ddutta@nvidia.com>
Reviewed-by: Ankur Kishore <ankkishore@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
2020-12-15 14:10:29 -06:00
Philip Elcan
9169e8c048 gpu: nvgpu: mc: move mc declarations to mc.h
Move declarations that belong to mc from gk20a.h to mc.h where they
belong.

JIRA NVGPU-2532

Change-Id: I91934ff60e2735c61d16459c04507fed6e1c96d7
Signed-off-by: Philip Elcan <pelcan@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/2214421
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
2020-12-15 14:10:29 -06:00
Philip Elcan
5efefe169c gpu: nvgpu: init: move is_nvgpu_gpu_state_valid out of gk20a.h
Move the declaration of is_nvgpu_gpu_state_valid() from gk20a.h to
nvgpu_init.h and add doxygen for it.

JIRA NVGPU-2532

Change-Id: I79dcb145c9a3ea70a8d5b7cd639f799b7320e04b
Signed-off-by: Philip Elcan <pelcan@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/2214420
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
2020-12-15 14:10:29 -06:00
Philip Elcan
07e5dfc577 gpu: nvgpu: swud: doxygen for nvgpu.common.nvgpu
Add more doxygen documentation for nvgpu.common.nvgpu unit in gk20a.h
and nvgpu_common.h.

Add ifdefs for some variables that were unnecessary in all builds.

JIRA NVGPU-2532

Change-Id: I6bcd6108f78dbdf12c4001a086d707eac45dfaaa
Signed-off-by: Philip Elcan <pelcan@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/2214419
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
2020-12-15 14:10:29 -06:00
Philip Elcan
6c9c51f366 gpu: nvgpu: add doxygen for static_analysis.h
This adds doxygen documentation needed for the SWUD for the functions
and macros in static_analysis.h

JIRA NVGPU-2532

Change-Id: I85bbb3d86c211d94677343c48c18a161bfb652df
Signed-off-by: Philip Elcan <pelcan@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/2214418
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
2020-12-15 14:10:29 -06:00
Mahantesh Kumbar
fbf219d8ba gpu: nvgpu: ACR func/struct version update for FUSA
-Renamed ACR structs for FUSA, ACR FUSA code has struct names
 ending with _v1 & ACR non-FUSA with _v0, removed _v1 for FUSA
 code to keep struct without any versioning for doxygen.
-Renamed acr_blob_construct_v1.c/h to  acr_blob_construct.c/h

JIRA NVGPU-2516

Change-Id: Id2d5e48e8169ce59371c2b08d04c5a65ba94c685
Signed-off-by: Mahantesh Kumbar <mkumbar@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/2218265
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
2020-12-15 14:10:29 -06:00
Lakshmanan M
9e1b540d87 gpu: nvgpu: add doxygen comments mm.gmmu
Add doxygen documentation for mm.gmmu in gmmu.h.

JIRA NVGPU-4105

Change-Id: If1c33cbab26de2351a88ae74a3eb1eaecc06a0a1
Signed-off-by: Lakshmanan M <lm@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/2219158
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Rajesh Devaraj <rdevaraj@nvidia.com>
Reviewed-by: Nicolas Benech <nbenech@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: Ankur Kishore <ankkishore@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
2020-12-15 14:10:29 -06:00
Peter Daifuku
8f42de2775 gpu: nvgpu: channel_setup_bind: must be bound to TSG
In nvgpu_channel_setup_bind, return an error if the
channel isn't bound to a TSG, as future operations
rely on being bound.

Update usermode setup_bind test to bind channel to
the tsg before calling nvgpu_setup_bind

Manual port from rel-32

Bug 200543218

Change-Id: If33b01b8176c7488445c23080ad9d11f341bff43
Signed-off-by: Peter Daifuku <pdaifuku@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/2215160
(cherry picked from commit 56f8e5b878)
Reviewed-on: https://git-master.nvidia.com/r/2218885
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com>
Reviewed-by: svc-mobile-misra <svc-mobile-misra@nvidia.com>
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>
2020-12-15 14:10:29 -06:00
Thomas Fleury
8048ead0ae gpu: nvgpu: doxygen for sync HAL
Add documentation for sync HAL that is called
from other units:
- get_sync_ro_map

Jira NVGPU-4156

Change-Id: Ie8cff8694b667304ccdcb5860de134a69e57d342
Signed-off-by: Thomas Fleury <tfleury@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/2218502
Reviewed-by: Seema Khowala <seemaj@nvidia.com>
Reviewed-by: Vinod Gopalakrishnakurup <vinodg@nvidia.com>
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>
2020-12-15 14:10:29 -06:00
Peter Daifuku
05c892f3f1 nvgpu: fix get_maxrate when no dvfs
In nvgpu_linux_get_maxrate, if tegra_dvfs_get_maxrate
returns 0 (a sign that there is no dvfs support), call
nvgpu_clk_arb_get_arbiter_clk_range to get the max
gpu frequency.

Bug 200543218

Change-Id: I4f9bc0acaef98cd9dfa22f709656f4bb7e9fd349
Signed-off-by: Peter Daifuku <pdaifuku@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/2215161
(cherry picked from commit 12202fbdcf)
Reviewed-on: https://git-master.nvidia.com/r/2217945
GVS: Gerrit_Virtual_Submit
Reviewed-by: Luis Dib <ldib@nvidia.com>
Reviewed-by: Alex Waterman <alexw@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
2020-12-15 14:10:29 -06:00
Thomas Fleury
76eb949edb gpu: nvgpu: add flag to disable SW quiesce
Add NVGPU_DISABLE_SW_QUIESCE flag which can be set in unit tests
to avoid entering SW quiesce.

Jira NVGPU-4089

Change-Id: Ie44b28bf69ff86908a66bb1be8aab3d365945178
Signed-off-by: Thomas Fleury <tfleury@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/2217828
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: Deepak Nibade <dnibade@nvidia.com>
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>
2020-12-15 14:10:29 -06:00
Thomas Fleury
dabc5dd8b8 gpu: nvgpu: use init framework for sw quiesce
Add NVGPU_INIT_TABLE_ENTRY for nvgpu_sw_quiesce_init_support.
Add g->sw_quiesce_init_done to avoid multiple initializations,
and check if deinit is needed in nvgpu_sw_quiesce_remove_support.
This avoids issues in common.init unit tests.

Jira NVGPU-4089

Change-Id: Ife3aa43d5f1f86899a895e4576e38ecc28a8e371
Signed-off-by: Thomas Fleury <tfleury@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/2217779
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
2020-12-15 14:10:29 -06:00
Thomas Fleury
5e688c35f8 gpu: nvgpu: set error notifier in SW quiesce
For MMU and PBDMA faults, error notifier needs to be set
before entering SW quiesce. Otherwise it ends up with
default NVGPU_ERR_NOTIFIER_FIFO_ERROR_IDLE_TIMEOUT.

Added nvgpu_rc_mmu_fault to:
- call g->ops.fifo.recover when recovery is enabled
- set MMU error when recovery is disabled

Updated nvgpu_rc_pbdma_fault to set PBDMA error when
recovery is disabled as well.

Wait for deferred interrupts to complete before actually
entering SW quiesce state, to make sure error notifier has
been set.

Jira NVGPU-4127

Change-Id: Ia84c723e021e397391c6c609d4bb96c06afdcc47
Signed-off-by: Thomas Fleury <tfleury@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/2210909
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com>
Reviewed-by: Deepak Nibade <dnibade@nvidia.com>
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>
2020-12-15 14:10:29 -06:00
Thomas Fleury
10adb9accc gpu: nvgpu: unit: fix build w/ recovery disabled
nvgpu_gr_falcon_get_fecs_mutex is compiled out when
CONFIG_NVGPU_ENGINE_RESET is undefined.

g->ops.fifo.recovery is compiled out when
CONFIG_NVGPU_RECOVERY is undefined.

Jira NVGPU-4089

Change-Id: I637517e17f5853a2b79568724177c7a411e3c1ba
Signed-off-by: Thomas Fleury <tfleury@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/2209500
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: Deepak Nibade <dnibade@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: Vinod Gopalakrishnakurup <vinodg@nvidia.com>
Reviewed-by: Alex Waterman <alexw@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
2020-12-15 14:10:29 -06:00
Thomas Fleury
825381b4ae gpu: nvgpu: disable recovery for safety build
Disable CONFIG_NVGPU_RECOVERY for safety build.

Uncorrectable errors will cause the GPU to be put gracefully into
a non-functioning state to ensure that no corrupted work is
completed because of the fault. This is because the freedom
from interference may not always be shown between the faulted and
the non-faulted TSG contexts.

Jira NVGPU-4089

Change-Id: Ice60722a3be3df980ac81c26f1370f22192bab36
Signed-off-by: Thomas Fleury <tfleury@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/2197255
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Deepak Nibade <dnibade@nvidia.com>
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>
2020-12-15 14:10:29 -06:00
Seshendra Gadagottu
6663a1feaf gpu: nvgpu: netlist: add doxygen for netlist.h
Added doxygen documentation for netlist public functions and data
structures.

Moved struct ctxsw_buf_offset_map_entry to correct location from
netlist.h to gr/hwpm_map.h.

JIRA NVGPU-3929

Change-Id: Ibefd89475bcf59d01cfad83a1e702e10d70a0de1
Signed-off-by: Seshendra Gadagottu <sgadagottu@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/2216186
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: Vinod Gopalakrishnakurup <vinodg@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
2020-12-15 14:10:29 -06:00
Thomas Fleury
3e26a25e36 gpu: nvgpu: skip doxygen for userd HAL
All userd HALs are called from common.fifo or hal.fifo
Skip doxygen since no HAL is called from external unit.

Jira NVGPU-4157

Change-Id: Ie1d27faeb0d20b1d5f1634b1a6bb7a5e3c3c97e1
Signed-off-by: Thomas Fleury <tfleury@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/2218536
Reviewed-by: Automatic_Commit_Validation_User
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>
2020-12-15 14:10:29 -06:00
Nitin Kumbhar
2a1c899fa5 gpu: nvgpu: add doxygen for common.fuse
Create gops header for common.fuse unit and add doxygen comments
for the public interfaces and HALs.

JIRA NVGPU-2454

Change-Id: Ic7f6e5994b3ca360185674488c24ad9a0f044fe7
Signed-off-by: Nitin Kumbhar <nkumbhar@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/2217228
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
2020-12-15 14:10:29 -06:00
Prateek sethi
72e5be2690 nvrm: nvgpu_rmos: add Doxygen documentation for soc
- Add Doxygen documentation for soc.
- Add CONFIG_NVGPU_NON_FUSA flag for nvgpu_us_counter.

Jira NVGPU-4147

Change-Id: Ie0a9879a4bf681411f0efe16590370e12f7c3b70
Signed-off-by: Prateek sethi <prsethi@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/2215155
Reviewed-by: Rajesh Devaraj <rdevaraj@nvidia.com>
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com>
Reviewed-by: svc-mobile-misra <svc-mobile-misra@nvidia.com>
GVS: Gerrit_Virtual_Submit
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:10:29 -06:00
Vedashree Vidwans
14d64640e5 gpu: nvgpu: add doxygen comments mm.page_allocator
Add doxygen documentation for mm.page_allocator in page_allocator.h.

Jira NVGPU-4048

Change-Id: I78ef99e3683b443eddeec30bab1bef4c74aa14bc
Signed-off-by: Lakshmanan M <lm@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/2206502
Reviewed-by: Vaibhav Kachore <vkachore@nvidia.com>
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
2020-12-15 14:10:29 -06:00