Commit Graph

7128 Commits

Author SHA1 Message Date
Philip Elcan
c06a90a419 gpu: nvgpu: enabled: add doxygen documentation
Add doxygen for the common.utils SWUD to enabled.h.

JIRA NVGPU-2559

Change-Id: I1fd5741506b13a0a3e6ac10e5865b2acfb049757
Signed-off-by: Philip Elcan <pelcan@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/2216073
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
Philip Elcan
d809d21556 gpu: nvgpu: worker: add doxygen for worker
Add SWUD doxygen documentation for common.utils component worker.h.

JIRA NVGPU-2559

Change-Id: Ib5e3954cba51c8a4af87b35f3fffecaf2f364ea1
Signed-off-by: Philip Elcan <pelcan@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/2216072
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
Alex Waterman
b89f6e236d gpu: nvgpu: Update name for VM mapping function
When reviewing some VM mapping code I found the name of the function
that actually maps the passed buffer to be confusing. It was:

  nvgpu_vm_map_compression_comptags()

This function does actually do the map and work out some comptags
related stuff. But I think this would be easier to read in the code
as:

  nvgpu_vm_do_map()

As this is much more literally what the function is actually doing.

Change-Id: I9a945b198887f5fb23b8be622c8411f97358dbed
Signed-off-by: Alex Waterman <alexw@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/2220339
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
5e60c31123 gpu: nvgpu: add doxygen comments mm.mm
Add doxygen documentation for mm.mm in
mm.h and gops_mm.h.

JIRA NVGPU-4105

Change-Id: I3e257af37f41106e3b29b5c7ff04ce5a2eb7161e
Signed-off-by: Lakshmanan M <lm@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/2222351
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Alex Waterman <alexw@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
Vaibhav Kachore
860717eaa6 gpu: nvgpu: WAR to fix MISRA C-2012 Rule 10.1
This is a WAR to fix MISRA C-2012 Rule 10.1

JIRA NVGPU-4132

Change-Id: Id2e5552ba2e6ddc8abb00e0b3bcaedfe4909de99
Signed-off-by: Vaibhav Kachore <vkachore@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/2224303
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Alex Waterman <alexw@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
Lakshmanan M
c0a8f4bb84 gpu: nvgpu: add doxygen comments for mmu_fault
Add doxygen documentation for mmu_fault in mmu_fault.h

JIRA NVGPU-4105

Change-Id: I8704c636b9341e7b11d0a941d9f199dc56c4ae4a
Signed-off-by: Lakshmanan M <lm@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/2223947
Reviewed-by: Rajesh Devaraj <rdevaraj@nvidia.com>
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Alex Waterman <alexw@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
Philip Elcan
c6affb85ba gpu: nvgpu: unit: init: cleanup quiesce
The init unit test starts the quiesce feature during testing. This
includes starting the quiesce thread. The thread should be stopped when
the init unit tests complete, so call nvgpu_sw_quiesce_remove_support()
when complete.

Bug 2732985

Change-Id: I701e1dd1ce753781fa81327e3cdc7e2881a33d00
Signed-off-by: Philip Elcan <pelcan@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/2224307
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Thomas Fleury <tfleury@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>
2020-12-15 14:10:29 -06:00
Philip Elcan
c0a7556cb3 gpu: nvgpu: init: make quiesce clean function non-static
Make nvgpu_sw_quiesce_remove_support() non-static so that it can be
called from the init unit test and cleanup the running thread.

Bug 2732985

Change-Id: I01afa9c21967b39f6f9f129590189882bbc963b4
Signed-off-by: Philip Elcan <pelcan@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/2224306
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>
GVS: Gerrit_Virtual_Submit
Reviewed-by: Thomas Fleury <tfleury@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>
2020-12-15 14:10:29 -06:00
ajesh
e8d5ed7694 gpu: nvgpu: add Doxygen documentation for cond
Add Doxygen documentation details for cond unit.

Jira NVGPU-2414

Change-Id: I7cd455499a6b703d9150f5dbdb80a4344c634775
Signed-off-by: ajesh <akv@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/2200393
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Vijayakumar Subbu <vsubbu@nvidia.com>
Reviewed-by: Sagar Kamble <skamble@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
Mahantesh Kumbar
43e9263bc2 gpu: nvgpu: ACR unit doxygen update
-Added detailed description for init, blob construct &
 bootstrap functionality.
-Made some nit changes

JIRA NVGPU-2516

Change-Id: I5857d92975e8c2917898ded2c146e41772db314d
Signed-off-by: Mahantesh Kumbar <mkumbar@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/2218386
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
Sagar Kamble
698c79a89a gpu: nvgpu: handle input buffer alignment for misra 11.3 deviation in copy to falcon memory
Functions for copying to falcon memory typecast from pointer to char of
input buffer to pointer to u32 since falcon data registers are written
in 4-bytes. Firmware data is generally byte stream and hence we won't
be able to deal with input buffer as pointer to u32.

Hence, misra rule 11.3 deviation is required for these casts. Firmware
data is also not aligned at word boundary sometimes hence we need to
copy it to aligned buffer to conform to the deviation recommendation.

hal/falcon/falcon_gk20a_fusa.c:136
  Checker: MISRA C-2012 Rule 11.3 (Required)
  misra_c_2012_rule_11_3_violation: The object pointer expression "src"
  of type "u8 *" is cast to type "u32 *".

This patch implements copy to falcon memory from unaligned source byte
by byte and casts the input buffer to u32 pointer otherwise.

JIRA NVGPU-4128

Change-Id: Iff3cc1010b8e209ec453c10c6d46953cf5a8adbe
Signed-off-by: Sagar Kamble <skamble@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/2210321
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com>
Reviewed-by: Mahantesh Kumbar <mkumbar@nvidia.com>
Reviewed-by: svc-mobile-misra <svc-mobile-misra@nvidia.com>
Reviewed-by: svc-mobile-cert <svc-mobile-cert@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
Seshendra Gadagottu
3d179bb2e8 gpu: nvgpu: ltc: doxygen for common.ltc hals
Moved ltc hals from gk20a.h to newly created file gops_ltc.h.
Added doxygen documentation for ltc hal functions.

JIRA NVGPU-2417

Change-Id: I2b793d7cc27bd54722f37f09af8aea70b5f0dff9
Signed-off-by: Seshendra Gadagottu <sgadagottu@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/2220582
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
Rajesh Devaraj
8486885cf3 gpu: nvgpu: fix issues in function descriptions
This patch addresses issues in function descriptions related to SDL.

JIRA NVGPU-4034

Change-Id: I613c9e26caadc6d6d3a3ede2a14541028e73670d
Signed-off-by: Rajesh Devaraj <rdevaraj@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/2222385
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Vaibhav Kachore <vkachore@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
41f38d8a5b gpu: nvgpu: Update common.top doxygen comments
Add more details on how we parse the device_info table.
Add @defgroup to pull in the external #defines related documentaion
into SWUD.

JIRA NVGPU-2500

Change-Id: I293631a7c19d5e73b4fbe164b11a94ebdb6acd82
Signed-off-by: Tejal Kudav <tkudav@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/2221229
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
Mahantesh Kumbar
3abe9be8be gpu: nvgpu: Rename pmuif/pmu.h to pmuif/init.h
-Rename pmuif/pmu.h to pmuif/init.h as this file has interface for
 PMU RTOS init
-Had multiple pmu.h file in nvgpu which is causing doxygen
 Warning for PMU unit.

Change-Id: I6e0449d5ca141fb8d07d700df261f036b1044806
Signed-off-by: Mahantesh Kumbar <mkumbar@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/2220214
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
cb63f7db2f gpu: nvgpu: Moved NVGPU-ACR interfaces to separate file
-Moved NVGPU-ACR interfaces to separate header file from
 ACR blob/bootstrap header files.
-Separation needed for NVGPU-ACR interface specification
 doxygen.

JIRA NVGPU-4152

Change-Id: Ia502380e62f53e0372549544e31ffff150e05017
Signed-off-by: Mahantesh Kumbar <mkumbar@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/2219038
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
2020-12-15 14:10:29 -06:00
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