Debarshi Dutta
200777b854
gpu: nvgpu: bvec for channel and tsg
...
Below changes are added.
1) Added checks in
nvgpu_channel_from_id__func, nvgpu_tsg_check_and_get_from_id
2) Added BVEC tests for
nvgpu_channel_open_new, nvgpu_channel_from_id,
nvgpu_tsg_check_and_get_from_id, nvgpu_tsg_set_error_notifier
3) Added common function get_random_u32.
Jira NVGPU-6905
Change-Id: I374d6f5503dc05e3224213d772a1752d82cbdc91
Signed-off-by: Debarshi Dutta <ddutta@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2548304
(cherry picked from commit 39b2529b3e96cfd3cbd3bb020f32ee2cca0ea363)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2554021
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com >
Reviewed-by: svc_kernel_abi <svc_kernel_abi@nvidia.com >
Reviewed-by: Sachin Nikam <snikam@nvidia.com >
Reviewed-by: Vaibhav Kachore <vkachore@nvidia.com >
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com >
GVS: Gerrit_Virtual_Submit
2021-07-07 12:25:50 -07:00
Seeta Rama Raju
a03da4a077
gpu: nvgpu: compile out bsearch.c from safety build
...
- We are compiling “os/posix/bsearch.c” as part of safety-build,
but we are not using bsearch.c file API from any safety file.
JIRA NVGPU-6172
Change-Id: Id0ebf00287f7564e629c28190f90edd68288dd70
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2424541
(cherry picked from commit ce822b1c8766faf5642079f0d5dde347ac2c5087)
Signed-off-by: srajum <srajum@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2447418
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com >
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com >
2021-01-13 09:14:02 -08:00
tkudav
2ca4f145e4
gpu: nvgpu: Fix HAL checker pointed mismatches
...
Add new HALs for register field definition/value changes in
GV11B as compared to Pascal. Update the HALs for recent
chips too if applicable.
Bug 200604892
Change-Id: I14ee9440859007e86a1ffa937df399a31e2628bd
Signed-off-by: Tejal Kudav <tkudav@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2437564
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com >
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com >
2020-12-15 14:13:28 -06:00
Alex Waterman
5f0fdf085c
nvgpu: unit: Add new mock register framework
...
Many tests used various incarnations of the mock register framework.
This was based on a dump of gv11b registers. Tests that greatly
benefitted from having generally sane register values all rely
heavily on this framework.
However, every test essentially did their own thing. This was not
efficient and has caused a some issues in cleaning up the device and
host code.
Therefore introduce a much leaner and simplified register framework.
All unit tests now automatically get a good subset of the gv11b
registers auto-populated. As part of this also populate the HAL with
a nvgpu_detect_chip() call. Many tests can now _probably_ have all
their HAL init (except dummy HAL stuff) deleted. But this does
require a few fixups here and there to set HALs to NULL where tests
expect HALs to be NULL by default.
Where necessary HALs are cleared with a memset to prevent unwanted
code from executing.
Overall, this imposes a far smaller burden on tests to initialize
their environments.
Something to consider for the future, though, is how to handle
supporting multiple chips in the unit test world.
JIRA NVGPU-5422
Change-Id: Icf1a63f728e9c5671ee0fdb726c235ffbd2843e2
Signed-off-by: Alex Waterman <alexw@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2335334
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com >
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com >
2020-12-15 14:13:28 -06:00
Nicolas Benech
fee7b81061
gpu: nvgpu: unit: required tests system
...
When running unit testing, we need to ensure that all expected unit
tests were actually run. This used to be done by an external Python
script, but it is not suitable for some OSes. This patch brings this
mechanism into the unit testing framework, and makes use of an INI
file to provide the list of expected tests.
JIRA NVGPU-3072
Change-Id: I9ed590de9005fe10324c594ea33ebc8fda482019
Signed-off-by: Nicolas Benech <nbenech@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2317220
Reviewed-by: automaticguardword <automaticguardword@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:13:28 -06:00
Prateek sethi
a9f3890ad6
gpu: nvgpu: unit test for common-io
...
This patch covers unit test for nvgpu_writel_check().
Jira NVGPU-4810
Change-Id: I173afd59a9e8fe9e647f260a70012f2c7c2d02f9
Signed-off-by: Prateek sethi <prsethi@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2293538
Reviewed-by: Rajesh Devaraj <rdevaraj@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 >
GVS: Gerrit_Virtual_Submit
2020-12-15 14:13:28 -06:00
Nicolas Benech
da0fb30256
gpu: nvgpu: unit: add SWUTS for interface.list
...
This patch adds SWUTS for interface.list and moves the unit test
files to the appropriate 'interface' folder.
JIRA NVGPU-3510
Change-Id: I6d67d784fcf4d89ba4ee7cfe5f5d7a0e558d71a8
Signed-off-by: Nicolas Benech <nbenech@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2289225
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
d794ec926c
gpu: nvgpu: add unit tests for log2
...
Add unit tests for posix log2 unit.
Fix the build issue with rounddown_pow_of_two macro.
Jira NVGPU-4417
Change-Id: I244aa4ae2f8c5e682e263784b4efbf9cd372379e
Signed-off-by: ajesh <akv@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2286955
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
d4d5da4aa0
gpu: nvgpu: add tests for circ_buf
...
Add unit tests for posix circ_buf unit.
Jira NVGPU-4417
Change-Id: Ic0b04961cdd7813aed6f9b16fd0724b0e3cfeb2a
Signed-off-by: ajesh <akv@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2287141
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
245cf29bc0
gpu: nvgpu: add tests for kref
...
Add unit tests for kref unit.
Jira NVGPU-4417
Change-Id: Ie5c6efc72b95aa1f200a59fd9184f20e65548fee
Signed-off-by: ajesh <akv@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2287553
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
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
Philip Elcan
cdaa77c40c
gpu: nvgpu: unit: add bit-utils test
...
Add test for common.utils.bit-utils.
JIRA NVGPU-4818
Change-Id: Ibb07d01fdf312e661bba76fe3c09b69424b62420
Signed-off-by: Philip Elcan <pelcan@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2279609
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com >
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com >
2020-12-15 14:10:29 -06:00
Philip Elcan
2cf72837ec
gpu: nvgpu: unit: add nvgpu_gk20a test
...
Add test for common.nvgpu.gk20a unit.
JIRA NVGPU-4818
Change-Id: Iae23d39675789fad141411162774c05f976c9831
Signed-off-by: Philip Elcan <pelcan@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2279562
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
ee255ef8eb
gpu: nvgpu: add unit tests for posix queue unit
...
Add unit tests for posix queue unit.
Jira NVGPU-4478
Change-Id: I0a0e39be5e350d34c3546d177abfc523e174d607
Signed-off-by: Petlozu Pravareshwar <petlozup@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2275967
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
50af902b71
gpu: nvgpu: unit: fifo: preempt-gv11b unit test
...
This unit test covers all nvgpu.hal.fifo.preempt.gv11b module lines and
branches.
Jira NVGPU-4675
Change-Id: I5b7104c242e07fc61c4d155de3c0003b2bea7dfe
Signed-off-by: Vedashree Vidwans <vvidwans@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2274044
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
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
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
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
Vedashree Vidwans
0033a4402e
gpu: nvgpu: fix userspace build failure
...
This patch adds a missing backslash to escape newline character.
Jira NVGPU-4675
Change-Id: I9ca82c4fa5dd26905ee4ea983e2a69e2cd04acea
Signed-off-by: Vedashree Vidwans <vvidwans@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/2267877
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Alex Waterman <alexw@nvidia.com >
Reviewed-by: Debarshi Dutta <ddutta@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
Antony Clince Alex
7849577918
nvgpu: userpace: add test for ecc unit
...
Add the test cases to valid the following unit interfaces:
- nvgpu_ecc_init_support
- nvgpu_ecc_finalize_support
- nvgpu_ecc_counter_init
- nvgpu_ecc_free
Jira: NVGPU-2179
Change-Id: I8181c85ff2762bd8170b51eaa685476d0850386b
Signed-off-by: Antony Clince Alex <aalex@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/2264643
GVS: Gerrit_Virtual_Submit
Reviewed-by: Prateek Sethi <prsethi@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
Vedashree Vidwans
7dd618980a
gpu: nvgpu: fix build errors in userspace make
...
Recent patches added new dependency of mock-iospace for FIFO unit tests.
However, mock-iospace binaries are generated after compiling FIFO UTs.
This leads to "cannot find -lmock-iospace" errors. This patch moves
mock-iospace compilation before FIFO UTs.
Jira NVGPU-4675
Change-Id: Ice2dc42412e06cc9e41b31bc852c220b09974ae2
Signed-off-by: Vedashree Vidwans <vvidwans@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/2265396
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
ae8f71a462
gpu: nvgpu: unit: add therm unit test
...
Add unit test for common.therm and gv11b therm HALs.
JIRA NVGPU-936
Change-Id: Iff857ad24eac729b5f7bf9868c1f05becefbaaad
Signed-off-by: Philip Elcan <pelcan@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/2260441
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
8ffbd7faff
nvgpu: userspace: bundle mocked IO space definitions into library
...
At present each nvgpu test unit defines its own mocked IO space. This is used to
intialize the qnx/posix IO framework. This results in unwanted redefinitions,
bloating of the binary. This patch creates a shared library which contains all
the mocked IO space definitions and it exports a function which enable units to
query, get access to the mocked IO space.
Jira: NVGPU-4520
Change-Id: Ied19f14e25274953e15a785b3a73053d84012b80
Signed-off-by: Antony Clince Alex <aalex@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/2260042
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
fdb8046812
gpu: nvgpu: unit: add negative tests for common.gr.obj_ctx
...
Add negative tests that inject memory allocation failures and
HAL function call errors to verify error handling path in
common.gr.obj_ctx unit.
Update common.gr.setup test to cover invalid class input while
setting preemption mode.
Jira NVGPU-4457
Change-Id: I74d1ba63ba8aace6087b51fd50e2c136822d3a00
Signed-off-by: Deepak Nibade <dnibade@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/2260939
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
71040ef04f
gpu: nvgpu: unit: mm: mmu_fault gv11b_fusa UT
...
This unit test covers most of the nvgpu.hal.mm.mmu_fault.gv11b_fusa
module lines and almost all branches.
Jira NVGPU-2218
Change-Id: I7c95876a0b1b4bb4b86eb15e21ca0da747d06162
Signed-off-by: Vedashree Vidwans <vvidwans@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/2258545
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
8e37e590b4
gpu: nvgpu: unit: unit tests for common.bus
...
Add unit tests for common.bus unit.
JIRA NVGPU-928
Change-Id: I0ac146e270890ea703b1a45add7f36c1b08451a5
Signed-off-by: tkudav <tkudav@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/2258297
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
c404af5575
gpu: nvgpu: unit: mm: hal/gmmu/ unit tests
...
This unit test covers most of the nvgpu.hal.gmmu module lines and
almost all branches.
Jira NVGPU-2218
Change-Id: Ibf73a090ec1195b7dc1c8827967f0e7c773228da
Signed-off-by: Vedashree Vidwans <vvidwans@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/2254733
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
Vedashree Vidwans
f31171a667
gpu: nvgpu: unit: mm: flush_gv11b_fusa unit test
...
This unit test covers most of the nvgpu.hal.mm.cache.flush_gv11b_fusa
module lines and almost all branches.
Jira NVGPU-2218
Change-Id: I565cf289079f754d3f76b6680e853d1859c52283
Signed-off-by: Vedashree Vidwans <vvidwans@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/2248383
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
Vedashree Vidwans
1fa65bcc13
gpu: nvgpu: unit: mm: gp10b_fusa unit test
...
This unit test covers most of the nvgpu.hal.mm.gp10b_fusa module lines
and almost all branches.
Jira NVGPU-2218
Change-Id: I16be22aefd10b8a8ee456f33619ecaf28776a072
Signed-off-by: Vedashree Vidwans <vvidwans@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/2248083
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
Vedashree Vidwans
80e9a7428a
gpu: nvgpu: unit: mm: gv11b_fusa unit test
...
This unit test covers most of the nvgpu.hal.mm.gv11b_fusa module lines
and almost all branches.
Jira NVGPU-2218
Change-Id: I5f0e766329321d29ef1d22ce1e07264562ca124a
Signed-off-by: Vedashree Vidwans <vvidwans@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/2248082
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
92d5c53c59
gpu: nvgpu: unit: add fb HAL unit tests
...
Unit tests covering the FB related HALs.
JIRA NVGPU-932
Change-Id: I46de25ea2a495e22ca6485d1fae1778261a804bd
Signed-off-by: Nicolas Benech <nbenech@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/2259666
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
0285ca6d98
gpu: nvgpu: unit: fifo: preempt unit test
...
This unit test covers most of the nvgpu.common.fifo.preempt module lines
and almost all branches.
Jira NVGPU-3698
Change-Id: I3960cd77c88126659e4d990f4d27dc43850f9ae4
Signed-off-by: Vedashree Vidwans <vvidwans@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/2236730
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
5f0d1f39c2
gpu: nvgpu: unit: create mc unit test
...
JIRA NVGPU-2224
Change-Id: Ic433e8bc2ac583c1735203d1b5f0fd61942c33d4
Signed-off-by: Philip Elcan <pelcan@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/2257128
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
Deepak Nibade
80f408632a
gpu: nvgpu: unit: add negative tests for common.gr.ctx
...
Add negative tests that inject memory allocation failures and verify
error handling path in common.gr.ctx unit.
Update common.gr.global_ctx unit test to check if global context
buffers are ready after allocation call.
Jira NVGPU-4373
Change-Id: Ia373441819257890f9f10667e6e2e363081a6757
Signed-off-by: Deepak Nibade <dnibade@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/2259074
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
83ef099d19
gpu: nvgpu: unit: add negative tests for common.gr.global_ctx
...
Add negative tests that inject memory allocation failures and verify
error handling path in common.gr.global_ctx unit.
Jira NVGPU-4373
Change-Id: Ic180f5eda0d25d5a713bdd513a617dc7c3a29d53
Signed-off-by: Deepak Nibade <dnibade@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/2255770
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
4f45ec7d5f
gpu: nvgpu: unit: mm: flush_gk20a_fusa unit test
...
This unit test covers most of the nvgpu.hal.mm.cache.flush_gk20a_fusa
module lines and almost all branches.
Jira NVGPU-2218
Change-Id: I1c090a301a7d1fddb675248287e7d4c7b9da0538
Signed-off-by: Vedashree Vidwans <vvidwans@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/2248084
GVS: Gerrit_Virtual_Submit
Reviewed-by: Alex Waterman <alexw@nvidia.com >
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com >
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com >
2020-12-15 14:10:29 -06:00
Thomas Fleury
23bbce1102
gpu: nvgpu: unit: add tests for gv11b fifo HAL
...
Add unit tests for the following HALs:
- gv11b_init_fifo_reset_enable_hw
- gv11b_init_fifo_setup_hw
- gv11b_fifo_mmu_fault_id_to_pbdma_id
- gv11b_fifo_intr_0_enable
- gv11b_fifo_handle_sched_error
- gv11b_fifo_intr_0_isr
- gv11b_fifo_intr_set_recover_mask
- gv11b_fifo_intr_unset_recover_mask
Jira NVGPU-4386
Change-Id: I888aca62e8eb8223a1def693a5ed51500baa37fc
Signed-off-by: Thomas Fleury <tfleury@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/2256265
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
4c43d83032
gpu: nvgpu: unit: add tests for gk20a fifo HAL
...
Add unit tests for the following HALs:
- gk20a_fifo_init_pbdma_map
- gk20a_fifo_get_runlist_timeslice
- gk20a_fifo_get_pb_timeslice
- gk20a_fifo_intr_1_enable
- gk20a_fifo_intr_1_isr
- gk20a_fifo_intr_handle_chsw_error
- gk20a_fifo_intr_handle_runlist_event
- gk20a_fifo_pbdma_isr
Jira NVGPU-4386
Change-Id: Iab518e3bc3f8fabdfb32172db8de300dd4142a53
Signed-off-by: Thomas Fleury <tfleury@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/2256264
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
76adb91f60
gpu: nvgpu: unit: add CE unit test
...
Add unit test for the common.ce unit and the gv11b CE FUSA HALs.
JIRA NVGPU-930
Change-Id: Idee75a1a5b53d397047edbead0db68ae999ce640
Signed-off-by: Philip Elcan <pelcan@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/2255473
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
24210bdbc9
gpu: nvgpu: unit: add tests for gp10b pbdma HAL
...
Add unit tests for the following HALs:
- gp10b_pbdma_get_signature
- gp10b_pbdma_get_fc_runlist_timeslice
- gp10b_pbdma_get_config_auth_level_privileged
Jira NVGPU-3694
Change-Id: I672acc76490db358951b31c1231fb8542852dfee
Signed-off-by: Thomas Fleury <tfleury@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/2253635
GVS: Gerrit_Virtual_Submit
Reviewed-by: Alex Waterman <alexw@nvidia.com >
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com >
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com >
2020-12-15 14:10:29 -06:00
Thomas Fleury
7b1f5a327f
gpu: nvgpu: unit: add tests for gm20b pbdma HAL
...
Add tests for the following HALs:
- gm20b_pbdma_acquire_val
- gm20b_pbdma_handle_intr
- gm20b_pbdma_read_data
- gm20b_pbdma_reset_header
- gm20b_pbdma_device_fatal_0_intr_descs
- gm20b_pbdma_restartable_0_intr_descs
- gm20b_pbdma_format_gpfifo_entry
- gm20b_pbdma_get_gp_base
- gm20b_pbdma_get_gp_base_hi
- gm20b_pbdma_get_fc_subdevice
- gm20b_pbdma_get_userd_aperture_mask
- gm20b_pbdma_get_userd_addr
- gm20b_pbdma_get_userd_hi_addr
Jira NVGPU-3694
Change-Id: I3d97f2e70d6c364d673a4f231ff1a3fad349c14e
Signed-off-by: Thomas Fleury <tfleury@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/2253634
GVS: Gerrit_Virtual_Submit
Reviewed-by: Alex Waterman <alexw@nvidia.com >
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com >
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com >
2020-12-15 14:10:29 -06:00
Thomas Fleury
ecab3ddbce
gpu: nvgpu: unit: add tests for gv11b pbdma HAL
...
Add tests for the following HALs:
- gv11b_pbdma_setup_hw
- gv11b_pbdma_intr_enable
- gv11b_pbdma_handle_intr_0
- gv11b_pbdma_handle_intr_1
- gv11b_pbdma_channel_fatal_0_intr_descs
- gv11b_pbdma_get_fc_pb_header
- gv11b_pbdma_get_fc_target
- gv11b_pbdma_set_channel_info_veid
- gv11b_pbdma_config_userd_writeback_enable
Jira NVGPU-3694
Change-Id: Ieea746e07cae4a3c1b5289674d93654edf7de941
Signed-off-by: Thomas Fleury <tfleury@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/2253633
GVS: Gerrit_Virtual_Submit
Reviewed-by: Alex Waterman <alexw@nvidia.com >
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com >
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com >
2020-12-15 14:10:29 -06:00
Thomas Fleury
63de725df9
gpu: nvgpu: unit: add tests for usermode gv11b HAL
...
Add unit tests for the following usermode HALs:
- gv11b_usermode_base
- gv11b_usermode_bus_base
- gv11b_usermode_doorbell_token
- gv11b_usermode_ring_doorbell
Jira NVGPU-4389
Change-Id: I7fdad23b0482c1437d309e8eeab239aad1fb5c99
Signed-off-by: Thomas Fleury <tfleury@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/2254548
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
4e9c117848
gpu: nvgpu: unit: add tests for userd gk20a HAL
...
Add unit test for the following HAL:
- gk20a_userd_entry_size
Jira NVGPU-4389
Change-Id: I8da4fcc3c3e3aadf69e7cf1ae26fba6f2701a557
Signed-off-by: Thomas Fleury <tfleury@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/2254547
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com >
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com >
2020-12-15 14:10:29 -06:00