Commit Graph

7968 Commits

Author SHA1 Message Date
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
David Li
273ffae939 gpu: nvgpu: add zcull_ctx_debug and setup_debug_z_gamut_offset to access map
-3D API drivers need to write NV_PGRAPH_PRI_GPCS_ZCULL_CTX_DEBUG_ZF32_AS_Z16
  and NV_PGRAPH_PRI_GPCS_SETUP_DEBUG_Z_GAMUT_OFFSET_ZF32_AS_Z16 fields
  to get ZCULL for ZF32 depth values less than 0.25
-GM20B is already added

bug 2427703
bug 2704313

Change-Id: I07a4d7b3a1e09183c56d4c72533bc5d280bc7782
Signed-off-by: David Li <davli@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2279674
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>
GVS: Gerrit_Virtual_Submit
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
2020-12-15 14:13:28 -06:00
Vedashree Vidwans
cec089eff2 gpu: nvgpu: mm: update SWUTS with nvgpu_allocator
Add nvgpu_allocator header to SWUTS header and sources list.

Jira NVGPU-4780

Change-Id: I399de70fc4eef84522e3978c6fc0bbb795a638f1
Signed-off-by: Vedashree Vidwans <vvidwans@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2286133
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
2020-12-15 14:13:28 -06:00
Debarshi Dutta
0c47ea2b50 nvgpu: unit: rc
This patch adds unit tests coverage for rc unit for safety-build.
This patch achieves 100% branch coverage.

Following tests are added

test_rc_init
test_rc_fifo_recover
test_rc_ctxsw_timeout
test_rc_runlist_update
test_rc_preempt_timeout
test_rc_gr_fault
test_rc_sched_error_bad_tsg
test_rc_tsg_and_related_engines
test_rc_mmu_fault
test_rc_pbdma_fault
test_rc_deinit

Jira NVGPU-4385

Change-Id: I9d3e42272247eec9aa55bd520b32ef0b268e6e5d

Change-Id: I9d3e42272247eec9aa55bd520b32ef0b268e6e5d
Signed-off-by: Debarshi Dutta <ddutta@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2279730
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: Vijayakumar Subbu <vsubbu@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
GVS: Gerrit_Virtual_Submit
2020-12-15 14:13:28 -06:00
Thomas Fleury
cffefda3e4 gpu: nvgpu: unit: traceability for runlist reload
Fix 'Targets:' statement for:
- gops_runlist.reload

Jira NVGPU-4890

Change-Id: I944854c79bd8a772a4b5f3f10d342f3650fbd772
Signed-off-by: Thomas Fleury <tfleury@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2285807
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Vijayakumar Subbu <vsubbu@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
GVS: Gerrit_Virtual_Submit
2020-12-15 14:13:28 -06:00
tkudav
26406a070d gpu: nvgpu: Hardcode nvlink speed to 20G
Xavier Chip Product POR was updated to 20G only. No more qual work 
happening for 16G. So we do not plan to support 16G. Now that we have
a single speed left, remove the code added to support nvlink speed from
VBIOS as it is redundant.

JIRA NVGPU-2964

Change-Id: Icd71ebb8271240818e36d40bf73c60f0c5beb6bf
Signed-off-by: tkudav <tkudav@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2284175
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
2020-12-15 14:13:28 -06:00
ajesh
8d346debaa gpu: nvgpu: add more tests for bitops
Add more tests as part of Bitops UT.

Jira NVGPU-4478

Change-Id: Ibb81e570385ab223d0f0f4a655da2e22733bd139
Signed-off-by: ajesh <akv@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2284700
Reviewed-by: Philip Elcan <pelcan@nvidia.com>
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com>
Reviewed-by: Alex Waterman <alexw@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
ajesh
9f021d2658 gpu: nvgpu: add more tests for utils
Add more tests as part of utils UT.

Jira NVGPU-4478

Change-Id: Iaf8f29cd78b03a6a62a15dab11b67f91197eadce
Signed-off-by: ajesh <akv@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2284342
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@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>
2020-12-15 14:13:28 -06:00
shashank singh
8aac90ce53 gpu: nvgpu: define invalid and no input preemption modes
Set preemption mode to MSB set for u32 if application passes mode
outside of the supported ones. Also, define no input preemption mode as
0U.

Jira NVGPU-4378

Change-Id: I574d495920c4438476862ed0850e4e3c8312ef02
Signed-off-by: shashank singh <shashsingh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2283981
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>
2020-12-15 14:13:28 -06:00
Prateek sethi
5941bf04a9 gpu: nvgpu: Add fault injection instances for read_loop API
Jira NVGPU-2688

Change-Id: I6f3be889e68d1ac8f9ab4cf97fb9f4f186a115c1
Signed-off-by: Prateek sethi <prsethi@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2283970
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
7e5b8b2cce gpu: nvgpu: Refactor PERF unit
-Created perf.h file and moved all private functions
and structures into it
-Created single sw_setup/pmu_setup for whole perf
unit
-Changed public function and structure names as per
standard format
-Deleted lpwr unit specific file from make file as
it is no longer used
-Removed support_vfe and support_changeseq flags as
it is no longer used
-Removed clk_set_boot_fll_clks_per_clk_domain function
as it is no longer used for tu10a
-Removed perf unit headers from pmuif folder

NVGPU-4448

Change-Id: Ia29e5b5a1a960b5474a929d8797542bf6c0eccf1
Signed-off-by: rmylavarapu <rmylavarapu@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2283587
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
2020-12-15 14:13:28 -06:00
Sagar Kamble
b21b9bdf5d gpu: nvgpu: update debug prints in ltc isr
It was observed that some of the informational debug prints in the
LTC ISRs were printed through nvgpu_err. They should be instead
printed through nvgpu_log under flag gpu_dbg_intr.

JIRA NVGPU-4830

Change-Id: I04cf4e70a7c810014d8a6ee5e901c2b4cf2c58ac
Signed-off-by: Sagar Kamble <skamble@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2285088
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Vijayakumar Subbu <vsubbu@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
2020-12-15 14:13:28 -06:00
Philip Elcan
faec22ff7d gpu: nvgpu: utils: don't log address of unaligned word
Remove address from log print in nvgpu_mem_is_word_aligned(). This is to
meet security requirement not to log sensitive information.

JIRA NVGPu-4791

Change-Id: I5a216db9d52eb36acdb8ce3e172b0817d443ebf5
Signed-off-by: Philip Elcan <pelcan@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2284869
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: Alex Waterman <alexw@nvidia.com>
Reviewed-by: Thomas Fleury <tfleury@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
Thomas Fleury
75175d8081 gpu: nvgpu: unit: more traceability for fifo
Add/fix 'Targets:' statements for:
- nvgpu_engine_status_get_ctx_id_type
- nvgpu_engine_status_get_next_ctx_id_type
- gm20b_pbdma_reset_method
- gm20b_pbdma_restartable_0_intr_descs
- gm20b_pbdma_disable_and_clear_all_intr
- gm20b_pbdma_clear_all_intr
- gm20b_pbdma_get_fc_target
- nvgpu_bug_exit
- nvgpu_bug_cb_from_node

Jira NVGPU-4890

Change-Id: I984542aa7daace85843fe6858d7c27b310046b28
Signed-off-by: Thomas Fleury <tfleury@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2284481
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
2020-12-15 14:13:28 -06:00
Petlozu Pravareshwar
2cfdc783e5 gpu: nvgpu: unit: update fault injection handler
Update fault injection handling for following mock API:
     - NvTegraSysGetChipId()

JIRA NVGPU-3909

Change-Id: Iae39a6315ccfd0bb3e92966205827c493e3c16c4
Signed-off-by: Petlozu Pravareshwar <petlozup@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2283636
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Philip Elcan <pelcan@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
Nicolas Benech
ea2563c033 gpu: nvgpu: unit: increase coverage and docs for mm
For common.mm subunits, this patch:
- adds extra test cases for some lesser used APIs
- updates SWUTS to add several functions to Targets fields.

JIRA NVGPU-3510

Change-Id: I350fbe0927472e1a07385a8cf87e0f0a8bbb6a8c
Signed-off-by: Nicolas Benech <nbenech@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2280067
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-15 14:13:28 -06:00
Sagar Kamble
a3d91c4f47 gpu: nvgpu: build unit tests for safety qnx based on umbrella chosen
Earlier, libnvgpu-drv.so and unit tests were being built with safety
debug profile unconditionally for all qnx and l4t builds.
In order to get coverage numbers corresponding to the release build
let us remove the overriding of the build profile for safety qnx
build. This also needs that these components are built only for
safety qnx and l4t builds.

For x86 and L4T userspace build, default profile is still set to
safety-debug.

JIRA NVGPU-4830

Change-Id: I02f572761bda9eb0c1b8fcdf7b22a07a9d10303a
Signed-off-by: Sagar Kamble <skamble@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2275764
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: Vijayakumar Subbu <vsubbu@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
GVS: Gerrit_Virtual_Submit
2020-12-15 14:13:28 -06:00
Thomas Fleury
95fc0571d7 gpu: nvgpu: unit: traceability for tsg disable
Fix 'Targets:' statement for:
- gops_tsg.disable
- nvgpu_tsg_disable

Fix test description for:
- gv11b_tsg_enable

Jira NVGPU-4890

Change-Id: I25b4be03d59b0932f802acc41f1ee488b812ee8e
Signed-off-by: Thomas Fleury <tfleury@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2284771
Reviewed-by: Automatic_Commit_Validation_User
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
ajesh
eac3137c60 gpu: nvgpu: add more tests for bug
Add more tests as part of Bug UT.

Jira NVGPU-4478

Change-Id: If9141ded41e9b9e97d03fa26c7404b85fa253014
Signed-off-by: ajesh <akv@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2284669
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: 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
Thomas Fleury
5589e60822 gpu: nvgpu: add doxygen for tsg enable/disable
Add doxygen for the following HALs:
- gops_tsg.enable
- gops_tsg.disable

Jira NVGPU-4783

Change-Id: Ibdac39a4fdb6576bde78626118d0f55e5ceb2713
Signed-off-by: Thomas Fleury <tfleury@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2284777
Reviewed-by: Philip Elcan <pelcan@nvidia.com>
Reviewed-by: Vinod Gopalakrishnakurup <vinodg@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
vinodg
1cbe70a9c6 gpu: nvgpu: Fix unit test build break.
Remove nvgpu-gr library usage from Makefile.
mock-iospace is enough to support for the needed
iospace.

Jira NVGPU-2192

Change-Id: I21a5158c69ca23039dac5e509a9a0c711848e178
Signed-off-by: vinodg <vinodg@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2284451
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Seshendra Gadagottu <sgadagottu@nvidia.com>
Reviewed-by: Nicolas Benech <nbenech@nvidia.com>
Reviewed-by: Alex Waterman <alexw@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
GVS: Gerrit_Virtual_Submit
Tested-by: Nicolas Benech <nbenech@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
2020-12-15 14:13:28 -06:00
smadhavan
26ce83862f gpu: nvgpu: unit: Add ACR DBG/PROD bins.
This patch adds acr_ucode_dbg/prod.bin
The two new bin files are copies of the TOT acr_ucode.bin. They will
act as placeholders till acr ucode with UCODE encryption gets production
signed.

This change also adds a check to select ACR ucode based on board type.
Note: This support is added only for t19x.

P4CL 27814148

Bug 2672836

Change-Id: Ib2f9fc2b23a8c50480a07baa130851c94533f345
Signed-off-by: smadhavan <smadhavan@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2270657
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:26 -06:00
smadhavan
2db5c623c4 nvgpu: gpu: adds support for ACR dbg/prod.
ACR ucode is encrypted using different keys for prod/dbg boards.
This change adds a check to select ACR ucode based on board type.
Note: This support is added only for t19x.

This patch also enables the prints "DEBUG MODE" indicative of board/
acr_ucode signature type and sctl and cpuctl reg values.

Bug 2350733
Bug 2672832
Bug 2672836
JIRA NVGPU-4001

Change-Id: I936b811b5836152206b11ec615ee75d201939968
Signed-off-by: smadhavan <smadhavan@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2268880
Reviewed-by: Deepak Goyal <dgoyal@nvidia.com>
Reviewed-by: Sagar Kamble <skamble@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:10:29 -06:00
Thomas Fleury
c5437867f7 gpu: nvgpu: remove ce_app from fusa build
Remove ce_app from safety build since it is only used for dGPU.

Jira NVGPU-4783

Change-Id: Ib243d5109d6fc2ff839bb3f8782f2b9abaf41d07
Signed-off-by: Thomas Fleury <tfleury@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2284448
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
2020-12-15 14:10:29 -06:00
shashank singh
105dbab24e gpu: nvgpu: update description for stall, non-stall counters
Update description for stall and non-stall counters which is now having
values 1 on entering the handler and 0 on exiting it. It's corresponding
to https://git-master.nvidia.com/r/c/linux-nvgpu/+/2247819/ change.

Change-Id: I0f94ac68461994557a024c5b2597227b39cfcc69
Signed-off-by: shashank singh <shashsingh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2283988
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:10:29 -06:00
Thomas Fleury
945de82433 gpu: nvgpu: dump_stack after BUG() callbacks
Dump stack after running BUG() callbacks in UT,
so that we do not get a stack dump when
EXPECT_BUG() is used.

Jira NVGPU-4512

Change-Id: I43336508ead7ba540bd79bd3af7e611b7f9c6e8f
Signed-off-by: Thomas Fleury <tfleury@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2283727
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: Philip Elcan <pelcan@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:10:29 -06:00
Divya Singhatwaria
5e1f7475ec gpu: nvgpu: Add unit test cases to cover pmu hal
Add test cases to cover following functions in PMU HAL:
- gv11b_pmu_bar0_error_status()
- gk20a_pmu_isr()

JIRA NVGPU-2192

Change-Id: Icf7f4f35a9365826bb95ca624501eed272b001d8
Signed-off-by: Divya Singhatwaria <dsinghatwari@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2277703
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com>
Reviewed-by: Sagar Kamble <skamble@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:10:29 -06:00
ajesh
1041167668 gpu: nvgpu: remove usage of __must_check
Remove the usage of __must_check compiler directive.
Also rename __user as nvgpu_user and make the required
changes for linux and posix builds.

Jira NVGPU-4903

Change-Id: If4a18761cca84eb12e0babc0d528666673fca9e8
Signed-off-by: ajesh <akv@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2283404
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: Alex Waterman <alexw@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:10:29 -06:00
Seshendra Gadagottu
86e4b52169 gpu: nvgpu: top: hooks for nvgpu_next
Include additional gops for nvgpu_next top.
Also additional device info for nvgpu_next top is
included in nvgpu_device_info.

JIRA NVGPU-4405

Change-Id: Id0b824a28b3a460a859b4340b7f9ed9e0d86ee7c
Signed-off-by: Seshendra Gadagottu <sgadagottu@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2248143
Reviewed-by: Automatic_Commit_Validation_User
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>
2020-12-15 14:10:29 -06:00
ajesh
129b0a28d4 gpu: nvgpu: make sort as non safe unit
Mark sort unit as non safe as the functionality is not
used by any of the safe files.

Jira NVGPU-4903

Change-Id: Iba5475d91bae217657a03b4b1cb20ca7e2b549cd
Signed-off-by: ajesh <akv@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2283546
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Sagar Kamble <skamble@nvidia.com>
Reviewed-by: Deepak Nibade <dnibade@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:10:29 -06:00
Abdul Salam
90a974d271 gpu: nvgpu: Refactor Volt sub-unit
As a part of refactoring, we need to move the volt functions from
pmu_pstate.c to volt.c as it belongs there and also move the
arbitor specific functions under CLK_ARB as they will be removed
from safety build.

This patch does the following
*Move volt setup from pmu_pstate to volt
*Move clk freq related functions into CLK_ARB
*Replace pmu.h with nvgpu_mem.h in boardobj.h
*Rename obj_volt to nvgpu_pmu_volt

NVGPU-4491
NVGPU-4492

Change-Id: I9abc96f695fce41893311982a80dc3656aaa64d6
Signed-off-by: Abdul Salam <absalam@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2282361
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:10:29 -06:00
Thomas Fleury
726d2a8d4a gpu: nvgpu: unit: improve coverage for quiesce
Add more cases for branch coverage of the following functions:
- nvgpu_sw_quiesce
- nvgpu_sw_quiesce_init_support
- nvgpu_sw_quiesce_bug_cb

Add SWUTS steps for test_quiesce.

Jira NVGPU-4905

Change-Id: Ib14c03f30bb7556123faf4d49abf2b307b82014b
Signed-off-by: Thomas Fleury <tfleury@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2280610
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: Philip Elcan <pelcan@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:10:29 -06:00
Scott Long
1f2f414fde gpu: nvgpu: fix misra 8.13 violation
MISRA Advisory Rule 8.13 states that a pointer should point to a
const-qualified type wherever possible.

This change eliminates such violations from the use of
nvgpu_timeout_expired_msg_cpu() by marking the temporary
struct nvgpu_timeout pointer const.

Jira NVGPU-3178

Change-Id: Id0c77f2a18db29dcc1125540fdc02ab246c68092
Signed-off-by: Scott Long <scottl@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2283774
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Adeel Raza <araza@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:10:29 -06:00
Petlozu Pravareshwar
bbaea596ea gpu: nvgpu: userspace: Add devctl_ctrl SWUTS ref
Add reference to devctl_ctrl SWUTS in the the main SWUTS document.

JIRA NVGPU-2665

Change-Id: I8a9ee6020dd3e09a30475b59bf9927320efb487c
Signed-off-by: Petlozu Pravareshwar <petlozup@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2278487
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
2020-12-15 14:10:29 -06:00
Thomas Fleury
198b7638ec scripts: rfr: add regex to match patch number
Add regex rule to match patch number, e.g
./rfr 2279114
./rfr https://git-master.nvidia.com/r/c/linux-nvgpu/+/2279114

Would be equivalent.

Change-Id: I3ffa5f233951d5e4d404517362e984c7a04b9849
Signed-off-by: Thomas Fleury <tfleury@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2283726
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Alex Waterman <alexw@nvidia.com>
Reviewed-by: Vinod Gopalakrishnakurup <vinodg@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:10:29 -06:00
vinodg
719186cca0 gpu: nvgpu: fix error in gr.falcon header documentation
Remove # from function name in target section.
Fix missing comma to separate function names.
Add missing gops_gr_falcon hal function to target section.

Jira NVGPU-4888

Change-Id: I8ef8a035767c06c41c1daf60c295249c5a50c7fc
Signed-off-by: vinodg <vinodg@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2283719
Reviewed-by: Seshendra Gadagottu <sgadagottu@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:10:29 -06:00
Adeel Raza
fa0dcc265f gpu: nvgpu: whitelist misra violations for Linux
Coverity 2019.06 has a bug due to which it scans and reports violations
for uncompiled code. This change whitelists violations which are only
visible for the Linux build. Linux is not part of the safety build.
Therefore, these violations can be whitelisted.

Bug 2799838

Change-Id: Ief24b121741d36d1c34a117122f1d6fd3e31f35f
Signed-off-by: Adeel Raza <araza@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2283210
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: Vedashree Vidwans <vvidwans@nvidia.com>
Reviewed-by: Alex Waterman <alexw@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
GVS: Gerrit_Virtual_Submit
2020-12-15 14:10:29 -06:00
Vedashree Vidwans
1145edad11 gpu: nvgpu: fifo: move non-fusa files to non-safe
Source files ramfc_gk20a.h, runlist_ram_gk20a.c and runlist_ram_gk20a.h
are incorrectly included in respective fusa tags. Functions in these
sources files ae not used in safety build. This patch moves the
mentioned files to non-fusa tags.

Jira NVGPU-4817

Change-Id: I6c79fffda22a635cddebef14884da68936a8c447
Signed-off-by: Vedashree Vidwans <vvidwans@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2283068
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Thomas Fleury <tfleury@nvidia.com>
Reviewed-by: Vinod Gopalakrishnakurup <vinodg@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:10:29 -06:00
Petlozu Pravareshwar
61b14b226f gpu: nvgpu: Update unit test for posix queue unit
Update unit test for posix queue unit to cover a missing branch.
Also add posix queue SWUTS file path in "SWUTS.sources".

Jira NVGPU-4478

Change-Id: Ib32969bc358d76686a03708f120da7da113c9533
Signed-off-by: Petlozu Pravareshwar <petlozup@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2282988
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
2020-12-15 14:10:29 -06:00
Vedashree Vidwans
f46c3064ed gpu: nvgpu: unit: mm: add coverage & traceability
This patch adds new tests to improve test coverage. Also, updating test
target tags to increase traceability.

Jira NVGPU-4780

Change-Id: I87341efa3fa7d741f7abb611ff28ad6d5e1c6880
Signed-off-by: Vedashree Vidwans <vvidwans@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2279644
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
2020-12-15 14:10:29 -06:00
ajesh
4bcd419a0b gpu: nvgpu: add unit tests for utils unit
Add unit tests for posix utils unit.

Jira NVGPU-4478

Change-Id: I426e2b8cc7ed508f4e66db3796ab21eb3ce3e85f
Signed-off-by: ajesh <akv@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2282760
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
2020-12-15 14:10:29 -06:00
Divya Singhatwaria
4b0499498b gpu: nvgpu: Unit tests for common.hal.pmu.pmu
Updating the test case to cover the
following ECC API:
- gv11b_pmu_ecc_init()

Also, since g->ops.pmu.secured_pmu_start is
called from nvgpu_pmu_rtos_init() (non-safe code)
so moved gv11b_secured_pmu_start() function under
CONFIG_NVGPU_LS_PMU flag

JIRA NVGPU-2192

Change-Id: Ia8d0386e81010b21b40437654c1f1667a450e060
Signed-off-by: Divya Singhatwaria <dsinghatwari@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2274227
Reviewed-by: Deepak Nibade <dnibade@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:10:29 -06:00
shashank singh
d34bad0a27 nvgpu: gpu: simplify waiting logic for interrupt handler
The atomic counter in interrupt handler can overflow and result in
calling of BUG() which will crash the process. The equivalent
functionality can be implemented with just setting an atomic variable at
start of handler and resetting at end of handler. The wait can be longer
in case there is constant interrupts coming but ultimately it will end.
Generally the wait path is not time critical so it should not be an
issue. Also, fix the unit tests for mc.

Change-Id: I9b8a236f72e057e89a969d2e98d4d3f9be81b379
Signed-off-by: shashank singh <shashsingh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2247819
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:10:29 -06:00
Antony Clince Alex
bd5604bba7 nvgpu: userspace: make channel-devctl visible to SWUTS
Add reference link to channel-devctl in SWUTS.

Fix unresolved merge conflict which managed to sneak into the branch.

Jira: NVGPU-4827

Change-Id: I99ba52603412ad3d4cb467e1dbdd6bbc5b31c344
Signed-off-by: Antony Clince Alex <aalex@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2282371
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
2020-12-15 14:10:29 -06:00
vinodg
7f73c5fc20 gpu: nvgpu: add missing gops_gr hal to target section.
Add missing gops_gr_setup, gops_gr_init, obj_ctx, global_ctx,
fs_state, gops_gr_falcon hal function  to the the target section.
Remove # from the target function name to keep consistency.

Jira NVGPU-4888

Change-Id: Ife9f2435d0e52cec490cfdf1809cc86809832cf2
Signed-off-by: vinodg <vinodg@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2280202
Reviewed-by: Seshendra Gadagottu <sgadagottu@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:10:29 -06:00
Thomas Fleury
d5833d1b8e gpu: nvgpu: add BUG callbacks to SW quiesce
After initializing support for SW quiesce, register
callback to be invoked in case of BUG().

The callback will invoke nvgpu_sw_quiesce with "g" parameter.

Jira NVGPU-4512

Change-Id: Id6bd73268d832e003cf66534bd0cbaa4b1f32a6c
Signed-off-by: Thomas Fleury <tfleury@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2283011
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com>
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: svc-mobile-misra <svc-mobile-misra@nvidia.com>
Reviewed-by: svc-mobile-cert <svc-mobile-cert@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>
2020-12-15 14:10:29 -06:00
smadhavan
a46abe4d64 gpu: nvgpu: Reduce ACR timeout wait to 100msec
10s wait for ACR timeout is longer than time allowed for
entire GPU boot sequence. Hence we need to reduce it.

This patch reduces ACR timeout wait period to 100msec
for silicon platforms and retains the existing 10s for
non silicon.

JIRA NVGPU-4898

Change-Id: I29e58b34f09ed595336bf833ed6db13553794827
Signed-off-by: smadhavan <smadhavan@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2282857
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:10:29 -06:00
vinodg
2ea4dfb5c7 gpu: nvgpu: add gr.falcon hal function to target section
Add gr.falcon hal functions being used from gr.falcon
unit test to the target section.

Jira NVGPU-4888

Change-Id: Id90ac8babfae95805421e4b9aded6a055e10e85b
Signed-off-by: vinodg <vinodg@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2280795
Reviewed-by: Philip Elcan <pelcan@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:10:29 -06:00
vinodg
0003c7d13e gpu: nvgpu: add gr.config hal functions to target section
Add gr.config hal functions to target section
Remove # from function names in target section

Jira NVGPU-4888

Change-Id: Ia8d8e91e731ad477ec330d79af69f60c0990fa70
Signed-off-by: vinodg <vinodg@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2280794
Reviewed-by: Philip Elcan <pelcan@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:10:29 -06:00
vinodg
d0a029eadf gpu: nvgpu: add missing gr.falcon hal header to SWUTS
add nvgpu-gr-falcon-gk20a.h to the SWUTS sources.

Jira NVGPU-4888

Change-Id: I4b407a5321ea67b3edcec7df7f3c07eb1e81c395
Signed-off-by: vinodg <vinodg@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2280793
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
2020-12-15 14:10:29 -06:00