Vedashree Vidwans
318bd53f1d
gpu: nvgpu: unit: modify posix-timers unit test
...
Modify posix-timers unit test to improve coverage for modified posix
timer functions.
Jira NVGPU-4675
Change-Id: I5ce915db9046df333a6ba782d5b68b05d6977496
Signed-off-by: Vedashree Vidwans <vvidwans@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2275291
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com >
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com >
2020-12-15 14:10:29 -06:00
vinodg
d1e6b80a6f
gpu: nvgpu: update common.gr intr unit test document.
...
Update common.gr intr unit test document for missing api
functions being called from interrupt unit tests.
Jira NVGPU-4359
Change-Id: Ia5ea7f59c91c6d11616458708631d525dd9e91cb
Signed-off-by: vinodg <vinodg@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2278627
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
005d41afc9
gpu: nvgpu: unit: ltc: use gops for init/remove funcs
...
The HAL/gops pointers should be used for initializing and removing
support for ltc rather than directly calling the functions.
JIRA NVGPU-4818
Change-Id: I274580be4f5c78b8a5107fde7886d8fb1f55abcb
Signed-off-by: Philip Elcan <pelcan@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2278500
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com >
Reviewed-by: svc-mobile-cert <svc-mobile-cert@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
Philip Elcan
57b13ff0c3
gpu: nvgpu: unit: ltc: update SWUTS
...
Update Test Type
Update the Targets keyword to use the gops_ltc members for traceability.
JIRA NVGPU-4818
Change-Id: I00dcf0d36326c8a6ae8e66af793a77feed3ac0c5
Signed-off-by: Philip Elcan <pelcan@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2278499
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 >
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
7883d7185e
gpu: nvgpu: unit: fuse: update SWUTS
...
This adds the Targets keyword for the fuse tests.
JIRA NVGPU-4818
Change-Id: I98b6bdad30f3fc09c41fc7c192cce20e1323b035
Signed-off-by: Philip Elcan <pelcan@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2278498
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
a8426d6c75
gpu: nvgpu: unit: rbtree: update SWUTS
...
Add Targets keyword
JIRA NVGPU-4818
Change-Id: Iee33a2e2f7246b8b58e8f38945f77bb3196fb363
Signed-off-by: Philip Elcan <pelcan@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2278497
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
087010464c
gpu: nvgpu: unit: enabled: update SWUTS
...
Add Targets tag
Update Test Type
JIRA NVGPU-4818
Change-Id: If1a8c6beced40b9bc6a79d9134eb1c8080533408
Signed-off-by: Philip Elcan <pelcan@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2278496
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
a9f63a9cd0
gpu: nvgpu: unit: ptimer: update SWUTS
...
Add Targets keyword
Update Test Type
JIRA NVGPU-4818
Change-Id: I6c9bace91725df937e367074e08e4c181c60d1be
Signed-off-by: Philip Elcan <pelcan@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2278495
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
tkudav
36024a917a
gpu: nvgpu:Add Targets in common.priv_ring SWUTS
...
Update the "Targets:" field entries to match the names of
gops function pointers in SWUD.
JIRA NVGPU-4679
Change-Id: Ib4fde3f4ebcf709170bb7a7f4f2c953a141e472b
Signed-off-by: tkudav <tkudav@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2277117
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Deepak Nibade <dnibade@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
tkudav
78ce6672c9
gpu: nvgpu: Update Targets in common.bus SWUTS
...
Update the "Targets:" field entries to match the names of
gops function pointers in SWUD.
JIRA NVGPU-4679
Change-Id: I145f362dee433109e6b98b1620bbc4b740f7934d
Signed-off-by: tkudav <tkudav@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2277111
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Deepak Nibade <dnibade@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
tkudav
7525e87d59
gpu: nvgpu: Update Targets in common.top SWUTS
...
Update the "Targets:" field entries to match the names of
gops function pointers in SWUD.
JIRA NVGPU-4679
Change-Id: I2723fa51329943e2d8fe6f30cb8954d05344389d
Signed-off-by: tkudav <tkudav@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2277095
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Deepak Nibade <dnibade@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
tkudav
9cc80a7234
gpu: nvgpu: Update Targets in common.class SWUTS
...
Update the "Targets:" field entries to match the names of
gops function pointers in SWUD.
JIRA NVGPU-4679
Change-Id: I06489c0b0b01143b410f53bfd382f1a50a40a8c9
Signed-off-by: tkudav <tkudav@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2277088
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Deepak Nibade <dnibade@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
Philip Elcan
5152391572
gpu: nvgpu: unit: update missing SWUTS files
...
A few unit tests went in without updating the SWUTS file/group info in
SWUTS.h and SWUTS.sources.
JIRA NVGPU-4818
Change-Id: I483e6703a8d4bb5d663795c70ecd8b75a514a97d
Signed-off-by: Philip Elcan <pelcan@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2275468
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
Philip Elcan
f2e2b29194
gpu: nvgpu: unit: add test for common.utils.string
...
Add unit test for the common.utils.string unit.
JIRA NVGPU-4826
Change-Id: I4bfca346fb2202f9572199590f33a0461443fbc9
Signed-off-by: Philip Elcan <pelcan@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2275456
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com >
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com >
2020-12-15 14:10:29 -06:00
vinodg
c0eee06799
gpu: nvgpu: test for negative code coverage in gr init
...
Add test_gr_init_error_injections function which help to
cover the negative tests like allocation failure and
condition failures.
Jira NVGPU-4676
Change-Id: Ieec2e234947676e17a1a2f772c00eb116cdcc536
Signed-off-by: vinodg <vinodg@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2275220
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
1a3c1ee984
gpu: nvgpu: unit: add test for BUG() callbacks
...
Add unit tests for the following functions:
- nvgpu_bug_register_cb
- nvgpu_bug_unregister_cb
Jira NVGPU-4512
Change-Id: I21a4bd55cfff080373b6234e517c1ee9cb51cb8a
Signed-off-by: Thomas Fleury <tfleury@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2266392
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com >
Reviewed-by: svc-mobile-cert <svc-mobile-cert@nvidia.com >
Reviewed-by: Deepak Nibade <dnibade@nvidia.com >
Reviewed-by: Shashank Singh <shashsingh@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
Deepak Nibade
04285893f7
gpu: nvgpu: unit: add test case for no SM detected
...
Set a stub that returns 0 instead of number of SM detected.
Ensure nvgpu_gr_fs_state_init() triggers a BUG and returns error.
Jira NVGPU-4778
Change-Id: I53ce36152a7f4bfe061ed9b5a532aa3b6995825a
Signed-off-by: Deepak Nibade <dnibade@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2277157
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com >
Reviewed-by: svc-mobile-cert <svc-mobile-cert@nvidia.com >
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
Deepak Nibade
12bc49a078
gpu: nvgpu: unit: update dummy pes_tpc_mask for better coverage
...
Update gr_test_config_get_pes_tpc_mask() to return 0x2F when called
for third time.
There are 2 PES in a GPC. So essentially we want to cover below two
cases
1. pes_tpc_count[pes0][gpc0] > pes_tpc_count[pes1][gpc0]
2. pes_tpc_count[pes0][gpc0] < pes_tpc_count[pes1][gpc0]
Also, run gr_test_diff_gpc_skip_mask() before gr_test_diff_pes_tpc_mask()
so that gpc_skip_mask calculation can generate above two cases first.
Jira NVGPU-4778
Change-Id: I1c34bbc36b0e126d34529725b6c45b59b7e66b67
Signed-off-by: Deepak Nibade <dnibade@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2277156
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: 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
dfc0f3342a
gpu: nvgpu: unit: complete tsg coverage
...
Previous pruning rules in test_tsg_unbind_channel were
skipping the case where both tsg unbind and update runlist
fail.
Modified pruning rules to cover all cases.
Jira NVGPU-4673
Change-Id: I38a63347483252deb83fa079545cead59c7ec594
Signed-off-by: Thomas Fleury <tfleury@nvidia.com >
Reviewed-on: http://git-master.nvidia.com/r/c/linux-nvgpu/+/2276011
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: 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
2540a98aa4
gpu: nvgpu: unit: update 'Targets' for fifo units
...
This patch adds a number of missing 'Targets' fields in the SWUTS of
various fifo units, fixes some missing ones and adds gops based
targets.
Jira NVGPU-4376
Change-Id: I445196e7092b01853786f40b860b29abc5d68371
Signed-off-by: Thomas Fleury <tfleury@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/2276680
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
cbf5b0c75b
gpu: nvgpu: unit: ptimer: add case for uncovered lines
...
This adds a test for one case in scale_ptimer() that wasn't previously
covered by the test.
NVGPU-4818
Change-Id: Ifdf92b68a921d288701b2a9ecd45e07f96e229d8
Signed-off-by: Philip Elcan <pelcan@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/2274670
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: Sagar Kamble <skamble@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 >
2020-12-15 14:10:29 -06:00
Lakshmanan M
1c991a58af
gpu: nvgpu: Add SM diversity support
...
To achieve permanent fault coverage, the CTAs launched by
each kernel in the mission and redundant contexts must execute on
different hardware resources. This feature proposes modifications
in the software to modify the virtual SM id to TPC mapping across
the mission and redundant contexts. The virtual SM identifier to TPC
mapping is done by nvgpu when setting up the patch context.
The recommendation for the redundant setting is to offset the
assignment by one TPC, and not by one GPC. This will ensure that both
GPC and TPC diversity. The SM and Quadrant diversity will happen
naturally. For kernels with few CTAs, the diversity is guaranteed
to be 100%. In case of completely random CTA allocation,
e.g. large number of CTAs in the waiting queue, the diversity is
1 - 1/#SM, or 87.5% for GV11B, 97.9% for TU104.
Added NvGpu CFLAGS to enable/disable the SM diversity support
"CONFIG_NVGPU_SM_DIVERSITY".
This support is only enabled on gv11b and tu104 QNX non safety build.
JIRA NVGPU-4685
Change-Id: I8e3eaa72d8cf7aff97f61e4c2abd10b2afe0fe8b
Signed-off-by: Lakshmanan M <lm@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/2268026
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com >
Reviewed-by: svc-mobile-misra <svc-mobile-misra@nvidia.com >
Reviewed-by: Seshendra Gadagottu <sgadagottu@nvidia.com >
Reviewed-by: Shashank Singh <shashsingh@nvidia.com >
Reviewed-by: svc-mobile-cert <svc-mobile-cert@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
Philip Elcan
7601d1c620
gpu: nvgpu: unit: add static_analysis unit test
...
Add unit test for common.utils static_analysis unit.
JIRA NVGPU-4825
Change-Id: Id103ab101bbca8424dd7f0d136f1101ddf4bc2b5
Signed-off-by: Philip Elcan <pelcan@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/2276814
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
6afd472abe
gpu: nvgpu: add test case target functions
...
Add the target function names for posix unit tests.
Jira NVGPU-4478
Change-Id: I393c3d6ba99c96e54812e29dedc8abfe7afcebab
Signed-off-by: ajesh <akv@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/2276656
Reviewed-by: Philip Elcan <pelcan@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
Philip Elcan
796781313e
gpu: nvgpu: unit: worker: add more coverage
...
This adds a test to cover a missing branch in the worker thread.
JIRA NVGPU-4818
Change-Id: I6e4a1f4615954a666549d063020308b592286347
Signed-off-by: Philip Elcan <pelcan@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/2276649
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@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
Thomas Fleury
0836f31c47
gpu: nvgpu: unit: improve gv11b tsg coverage
...
test_gv11b_tsg_bind_channel_eng_method_buffers was missing
in the list of tests for the module.
Added the test, and fixed couple issues:
- wrong test on gpu_va in valid case.
- NULL pointer assignment during test setup, when
tsg->eng_method_buffers is NULL.
Jira NVGPU-4673
Change-Id: I2478425f0380540e8295325ffd3df672dc5d9fd0
Signed-off-by: Thomas Fleury <tfleury@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/2276068
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
a252ab1b0d
gpu: nvgpu: unit: improve gm20b pbdma coverage
...
Add the following cases:
- timeout == 0 in gm20b_pbdma_acquire_val
- 32-bit overflow in pbdma_method1_r computation.
Note: 32-bit overflow for pbdma_method0_r in
gm20b_pbdma_is_sw_method_subch is hindered by overflow
in pbdma_method1_r which occurs first.
Jira NVGPU-4673
Change-Id: If8202a4397115efb5af490b1ce974b43699e15c6
Signed-off-by: Thomas Fleury <tfleury@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/2276051
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
b3960b2628
gpu: nvgpu: unit: improve gm20b channel coverage
...
Add cases to trigger BUG() when passing invalid ch->chid.
This causes BUG() when computing register address for
ccsr_channel_inst_r(i) and ccsr_channel_r(i).
Jira NVGPU-4673
Change-Id: I313c6e6e65b38310af39f9817bb2398edf118d89
Signed-off-by: Thomas Fleury <tfleury@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/2276022
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com >
Reviewed-by: svc-mobile-cert <svc-mobile-cert@nvidia.com >
Reviewed-by: Deepak Nibade <dnibade@nvidia.com >
Reviewed-by: svc-mobile-misra <svc-mobile-misra@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
vinodg
97ce51215b
gpu: nvgpu: remove NVC0C0_SET_SHADER_EXCEPTIONS from gr intr test
...
Remove unused NVC0C0_SET_SHADER_EXCEPTIONS from gr intr unit test.
Update the mock io register with valid class number value.
Jira NVGPU-4454
Change-Id: I1b6772c7c8d2c75f05d57cb5eb2a630aa7b6b6e0
Signed-off-by: vinodg <vinodg@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/2275286
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: Seshendra Gadagottu <sgadagottu@nvidia.com >
Reviewed-by: Deepak Nibade <dnibade@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
seshendra
4ce4cdcd0f
gpu: nvgpu: t23x: init hal for nvgpu-next
...
Add hooks for nvgpu-next init hal.
JIRA NVGPU-4383
Change-Id: Ia899878743bca35d911c74444749f254ba94bbe0
Signed-off-by: seshendra <sgadagottu@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/2243694
Reviewed-by: Seema Khowala <seemaj@nvidia.com >
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
Prateek sethi
5f74899178
gpu: nvgpu: flush the UTF fprintf buffer on each call
...
In case of segmentation fault or hang unit test prints are not coming
in GVS logs which has already run. It makes difficult to find exact
faulty test/unit.
Adds fflush which flush the msg buffer after each call.
Bug 200577095
Change-Id: Ib77ec40636d9416414ef1a00dcf8886b7aae0f3b
Signed-off-by: Prateek sethi <prsethi@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/2275538
Reviewed-by: Shashank Singh <shashsingh@nvidia.com >
Reviewed-by: Deepak Nibade <dnibade@nvidia.com >
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com >
Reviewed-by: Philip Elcan <pelcan@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
4649631d38
gpu: nvgpu: unit: fix channel UT failures
...
Currently, it seems that channel UT triggers segmentation fault in the
UT framework. Modify test_ch_referenceable_cleanup to confirm test
results using fifo pointer instead of channel pointer. This patch adds
error messages in some tests in case of failures.
Jira NVGPU-4817
Change-Id: I70121e5d082bae5e71cf1dab28a75a888a62ad40
Signed-off-by: Vedashree Vidwans <vvidwans@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/2275296
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com >
Reviewed-by: svc-mobile-cert <svc-mobile-cert@nvidia.com >
Reviewed-by: Nicolas Benech <nbenech@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
Philip Elcan
50f3a94317
gpu: nvgpu: unit: init: add coverage in quiesce
...
This adds an additional test for where the cond init fails which was not
previously covered.
JIRA NVGPU-4818
Change-Id: I61f9808b3b438bacce6e41a7d1f84a3206837a8e
Signed-off-by: Philip Elcan <pelcan@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/2275222
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com >
Reviewed-by: svc-mobile-cert <svc-mobile-cert@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
Thomas Fleury
6828487f70
gpu: nvgpu: unit: coverage for gm20b pbdma status
...
Add coverage for the following function:
- gm20b_read_pbdma_status_info
Jira NVGPU-4673
Change-Id: I30c20932f84aac4a96efcb023ca85c5fbaecac1c
Signed-off-by: Thomas Fleury <tfleury@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/2270924
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
1f782b8fa9
gpu: nvgpu: update the falcon and cg unit test types and targets
...
Fix the test types and update targets for falcon and cg unit tests.
This will add the SWUD<->SWUTS traceability.
JIRA NVGPU-4429
JIRA NVGPU-4431
Change-Id: Ib1f7f50aedf0711fd5f943fc7552c15dfea30504
Signed-off-by: Sagar Kamble <skamble@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/2274787
GVS: Gerrit_Virtual_Submit
Reviewed-by: Deepak Nibade <dnibade@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
Nicolas Benech
dd37730672
gpu: nvgpu: unit: update gcov.sh to patch paths
...
To keep consistency between host and target runs, this patch
adds some post processing to HTML files to include a path from
the TOP folder to GCOV reports.
JIRA NVGPU-3510
Change-Id: I50ea5614fa665d257384a23acbf7b4e5b9d69925
Signed-off-by: Nicolas Benech <nbenech@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/2274714
GVS: Gerrit_Virtual_Submit
Reviewed-by: Philip Elcan <pelcan@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 >
2020-12-15 14:10:29 -06:00
Deepak Nibade
3c6d4ede34
gpu: nvgpu: unit: update test type for test_gr_setup_set_preemption_mode
...
Test case test_gr_setup_set_preemption_mode emulates user mode sequence
to set the preemption mode once after creating the context. This test is
used to show that there is no race or deadlock involved while setting
the preemption mode from user space.
This test is used to prove one of the action coming from FMEA of
common.gr unit. Hence update the test type to include "Safety".
Jira NVGPU-4125
Change-Id: I3153772dfe790e6e4dba99dd94fbfd40c9d6f129
Signed-off-by: Deepak Nibade <dnibade@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/2274968
Reviewed-by: Nitin Kumbhar <nkumbhar@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
Thomas Fleury
6fa5da61d7
gpu: nvgpu: use engine_id to access engine_info
...
Generalize use of "engine_id" variable name to index f->engine_info.
Jira NVGPU-4511
Change-Id: Ie3bc2c701dc3bab833d6ac134273dd6a102528c2
Signed-off-by: Thomas Fleury <tfleury@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/2262219
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 >
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
Thomas Fleury
66b68edd6b
gpu: nvgpu: iterator name for active_engines
...
Some functions used engine_id or eng_id to index active_engines_list,
which could get confusing when used in conjunction with similar
variable as active_engine_id or act_eng_id.
Use generic iterator name i or j instead, to make it clear that
f->active_engines_list is NOT indexed by engine id.
Jira NVGPU-4511
Change-Id: I07a6bf00dfb6d4e608b10f2f79e38a70e557428c
Signed-off-by: Thomas Fleury <tfleury@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/2262218
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 >
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
Antony Clince Alex
cae36cdc35
gpu: nvgpu: userspace: make common.ecc unit test visible to doxygen
...
The unit test files for common.ecc unit was not included in the doxygen
source file list, causing them not be parsed by doxygen. Updated doxygen
source list to include them.
Fixed doxyen targets tag for unit test functions within common.ecc unit.
Jira: NVGPU-4819
Change-Id: Idacf3d4d5f297950255c47b6380386be88fbd606
Signed-off-by: Antony Clince Alex <aalex@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/2274725
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
67696c6870
gpu: nvgpu: conditionally compile tsg event ids
...
event_id_list and event_id_list_locks fields are only
needed in nvgpu_tsg when CONFIG_NVGPU_CHANNEL_TSG_CONTROL
is defined.
Conditionally compile those fields and related code,
so that they are removed from safety build.
Jira NVGPU-4376
Change-Id: I8678aa1b8cd4166aa37bcb42cda1eb9c703fd32f
Signed-off-by: Thomas Fleury <tfleury@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/2273261
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
2f29272d61
gpu: nvgpu: line coverage for gk20a_runlist_wait_pending
...
Use fault injection to test nvgpu_timeout_init failure case
in gk20a_runlist_wait_pending.
Jira NVGPU-4673
Change-Id: I62810db0877339909d99f1de8d14847557ecb8fd
Signed-off-by: Thomas Fleury <tfleury@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/2272458
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: 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
Deepak Nibade
fa90056392
gpu: nvgpu: unit: add unit test for gr idle hal
...
Add unit test coverage for HAL function g->ops.gr.init.wait_idle
exposed by common.gr.init subunit.
Jira NVGPU-4458
Change-Id: I66b24b335961dfaf9315b9fcd3a3df421b80a30a
Signed-off-by: Deepak Nibade <dnibade@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/2274184
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
1513061fdd
gpu: nvgpu: falcon: test and code updates for more branch coverage
...
Passing branch of nvgpu_timeout_peek_expired was not covered due to jump
over it in nvgpu_falcon_mem_scrub_wait. Remove that jump to cover the
branch.
Add unit test for covering the error handling in case of read from
DMEM control register returns invalid data using fault injection.
JIRA NVGPU-4814
Change-Id: I9f99186bd2b1c5f39ead130d3161d3e7fa622ac4
Signed-off-by: Sagar Kamble <skamble@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/2272937
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com >
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com >
2020-12-15 14:10:29 -06:00
tkudav
7774669a30
gpu: nvgpu: Add branch coverage for common.fbp
...
Add missing branch coverage for nvgpu_fbp_remove_support()
corresponding to g->fbp == NULL case.
JIRA NVGPU-4679
Change-Id: I2d8e97b0d35a5a6738dc649500e2172560fe121f
Signed-off-by: tkudav <tkudav@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/2272934
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: Sagar Kamble <skamble@nvidia.com >
Reviewed-by: Deepak Nibade <dnibade@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
Philip Elcan
6800aa7c51
gpu: nvgpu: unit: add worker unit test
...
Add unit test for worker unit.
To get full coverage, a new fault injection is added for the thread API
nvgpu_thread_is_running to return true after a number of executions.
JIRA NVGPU-915
Change-Id: Ib631d4af7dac3dde37bed3b5de81f3164a6df1b0
Signed-off-by: Philip Elcan <pelcan@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/2265714
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
399a8f3125
gpu: nvgpu: unit: nvgpu.hal.fifo.ctxsw_timeout UT
...
This unit test covers most of the nvgpu.hal.fifo.ctxsw_timeout module
lines and all branches.
Jira NVGPU-4388
Change-Id: I3b3855e6710073c1f878a2f7155a975373094da1
Signed-off-by: Vedashree Vidwans <vvidwans@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/2264345
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
6ef960dbc7
gpu: nvgpu: unit: nvgpu.hal.fifo.ramfc unit test
...
This unit test covers most of the nvgpu.hal.fifo.ramfc module lines and
all branches.
Jira NVGPU-4390
Change-Id: I7ef596089deab6fdb351f239124e59dc416a3aa7
Signed-off-by: Vedashree Vidwans <vvidwans@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/2260493
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
9c7051d37f
gpu: nvgpu: unit: nvgpu.hal.fifo.ramin unit test
...
This unit test covers most of the nvgpu.hal.fifo.ramin module lines and
almost all branches.
Jira NVGPU-4391
Change-Id: Iaae4240305822707dd6446cec0ecc9e833ebffdc
Signed-off-by: Vedashree Vidwans <vvidwans@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/2259638
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
0ca906a6ad
gpu: nvgpu: unit: fifo: fifo unit test
...
This unit test covers most of the nvgpu.common.fifo.fifo module lines
and almost all branches.
Jira NVGPU-3697
Change-Id: I5722277a3e1630a902f63b707eb3de1c4e1876b0
Signed-off-by: Vedashree Vidwans <vvidwans@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/2237796
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com >
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com >
2020-12-15 14:10:29 -06:00