Commit Graph

370 Commits

Author SHA1 Message Date
vinodg
c91822381b gpu: nvgpu: unit: gr: Add more gr unit tests
Rename gr register space allocation and deallocation functions
to test_gr_init_setup and test_gr_remove_setup

Add tests to support following functions
nvgpu_gr_init
nvgpu_gr_init_support
nvgpu_gr_suspend
nvgpu_gr_remove_support

Jira NVGPU-3970

Change-Id: I11418ddcb9946ef75de162fd5689fdbbbfb62e79
Signed-off-by: vinodg <vinodg@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/2194612
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
2020-12-15 14:05:52 -06:00
Vedashree Vidwans
64ecb8fb60 gpu: nvgpu: unit: SWUTS for mm.allocator.bitmap
Add bitmap_allocator.h header that contains SWUTS for the unit.

Jira NVGPU-3943

Change-Id: I13bd00f306bf66079556d775b2de83fd50760201
Signed-off-by: Vedashree Vidwans <vvidwans@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/2191878
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
2020-12-15 14:05:52 -06:00
Philip Elcan
bf49996bd2 gpu: nvgpu: unit: fuse: re-enable FUSA tests
When the non-FUSA HALs were removed, the entire fuse unit test was
removed. However, some of the fuse HALs are used in the FUSA build, so
re-enable the FUSA tests, as appropriate.

JIRA NVGPU-3943

Change-Id: I6656940492102ace335672466592b22ed9ce95fd
Signed-off-by: Philip Elcan <pelcan@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/2194569
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:05:52 -06:00
Philip Elcan
de9cb99b02 gpu: nvgpu: unit: add SWUTS docs for fuse test
This adds the SWUTS documentation for the fuse unit test.
Also, the gm20b header had declared some undefined tests, so those are
removed.

JIRA NVGPU-3943

Change-Id: I7530471df30ed95007f820c875b6cb55486e1777
Signed-off-by: Philip Elcan <pelcan@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/2194568
Reviewed-by: Thomas Fleury <tfleury@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:05:52 -06:00
Philip Elcan
acc77b6ff4 gpu: nvgpu: unit: fuse: remove inter-test dependency
The tests test_fuse_*_check_sec_invalid_gcplex were dependent on a
previous test setting up the HAL override for reading the gcplex fuse.
This updates the test_fuse_*_check_sec_invalid_gcplex tests to set this
override themselves to avoid issues if the tests are ever reordered.

JIRA NVGPU-3943

Change-Id: I3da14badd4cf0e310260cbbed98700660ef99e28
Signed-off-by: Philip Elcan <pelcan@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/2195231
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:05:52 -06:00
Vedashree Vidwans
6b8aaf3bb8 gpu: nvgpu: SWUTS for enabled
Add preprocessor directives for nvgpu-enabled.h header.

Jira NVGPU-3943

Change-Id: Ieab43fc49bafcd74a907b9dd1f175b693754f559
Signed-off-by: Vedashree Vidwans <vvidwans@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/2191262
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>
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:05:52 -06:00
Vedashree Vidwans
fda0f1a9d9 gpu: nvgpu: unit: SWUTS for mm.nvgpu_mem
Add nvgpu_mem.h header that contains the SWUTS for the unit.

Jira NVGPU-3943

Change-Id: I6d58cc96d5fa5014747e95e68a81bf5767f9a7f5
Signed-off-by: Vedashree Vidwans <vvidwans@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/2189432
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com>
Reviewed-by: svc-mobile-misra <svc-mobile-misra@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: Alex Waterman <alexw@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
2020-12-15 14:05:52 -06:00
vinodg
4af1f8a665 gpu: nvgpu: unit: add gr_init tests
Move gr_init_prepare to separate gr unit test

Use of global register spaces between two different
gr unit tests corrupt the memory in multi thread support.
Add support for local register spaces with pre initialized
register values for each gr unit test.

Jira NVGPU-3582

Change-Id: I4e47c1ca4f312335cd33a73a377f9fa9f12ccd5f
Signed-off-by: vinodg <vinodg@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/2189502
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:05:52 -06:00
Adeel Raza
252ddc4f05 gpu: nvgpu: add coverity whitelisting support
Add macros for whitelisting coverity violations. These macros use pragma
directives. The pragma directives and whitelisting macros are only
enabled when a coverity scan is being run.

The whitelisting macros have been added to a new header called
static_analysis.h. The contents of safe_ops.h (CERT C safe ops) have
been moved into static_analysis.h because this will be the new header
for static analysis related macros/defines/etc.

JIRA NVGPU-3820

Change-Id: I9c63f20f670880b420415535738034619314b7c3
Signed-off-by: Adeel Raza <araza@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/2180600
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
2020-12-15 14:05:52 -06:00
vinodg
ff4610e910 gpu: nvgpu: unit: add gr_prepare test
Add support gr_prepare for sw and hw.
Add needed registers using nvgpu_posix_io_add_reg_space calls.

Add unit tests covering following functions
nvgpu_gr_prepare_sw
nvgpu_gr_enable_hw

install-unit.sh modified to copy the firmware binaries under
nvgpu-unit/firmware directory

Currently the gr_init_prepare test is called as part of the
gr_config test, later this will be moved as separate unit test.

Jira NVGPU-3582
Bug 2693908

Change-Id: If8f5ac4988deba0db477b2177981f7912bdb8eec
Signed-off-by: vinodg <vinodg@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/2191254
GVS: Gerrit_Virtual_Submit
Reviewed-by: Alex Waterman <alexw@nvidia.com>
Reviewed-by: Seshendra Gadagottu <sgadagottu@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
2020-12-15 14:05:52 -06:00
vinodg
213954927c gpu: nvgpu: posix support for firmware files
Add posix support for nvgpu_request_firmware and
nvgpu_release_firmware calls.

In x86, needed firmware are copied under userspace/firmware
directory.For jetson, firmware files will be copied under
nvgpu_unit/firmware directory.

Update Makefile.tmk to copy firmware in systemimage under
nvgpu_unit/firmware directory.

Jira NVGPU-3582
Bug 2693908

Change-Id: I5f5e5819dc5501e587bc8afc0a3944c18a8e9bef
Signed-off-by: vinodg <vinodg@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/2189493
GVS: Gerrit_Virtual_Submit
Reviewed-by: Alex Waterman <alexw@nvidia.com>
Reviewed-by: Seshendra Gadagottu <sgadagottu@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
2020-12-15 14:05:47 -06:00
Petlozu Pravareshwar
3d9939a9b4 gpu: nvgpu: userspace: Add sdl SWUTS reference
Add reference to sdl SWUTS in the the main SWUTS document.

JIRA NVGPU-3943

Change-Id: I39e41bc563e0f8561772039128e8546ae22327d6
Signed-off-by: Petlozu Pravareshwar <petlozup@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/2190845
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
2020-12-15 14:01:38 -06:00
Philip Elcan
2bd4e4d8e0 gpu: nvgpu: unit: atomic: add SWUT documentation
Add the doxygen documentation for the SWUT for the atomic unit test.

JIRA NVGPU-3943

Change-Id: I7ff2e4f4f212299896a1efb4f92d2a34ace6cf19
Signed-off-by: Philip Elcan <pelcan@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/2190148
GVS: Gerrit_Virtual_Submit
Reviewed-by: Nicolas Benech <nbenech@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:01:38 -06:00
ajesh
81d24e41d0 gpu: nvgpu: add ut for posix sizes unit
Add unit test cases for posix sizes unit.

Jira NVGPU-2654

Change-Id: I567e249c824fd75c617b43f196c36780ec75101f
Signed-off-by: ajesh <akv@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/2189786
Reviewed-by: Philip Elcan <pelcan@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:01:38 -06:00
Philip Elcan
b10ff42480 gpu: nvgpu: unit: init: add SWUT linkages
The SWUT framework wasn't complete when the init unit test was
developed. The SWUT documentation for the init unit test was written
during the test development already. Now that the SWUT framework
exists, this adds the linkages to include the init SWUT documentation
in the actual SWUT.

JIRA NVGPU-2239

Change-Id: I47da36bb31c86c742d300e6ab7dca27ca34b9ca6
Signed-off-by: Philip Elcan <pelcan@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/2190019
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:01:38 -06:00
Philip Elcan
5f23a16bdd gpu: nvgpu: unit: atomic: decrease test time for xchg tests
The threaded xchg tests were running long and causing failures with the
QNX framework. This decreases the number of iterations for these tests.

JIRA NVGPU-3954

Change-Id: Ie4153b815ad81664ed3b4d4cb058c522cce3e609
Signed-off-by: Philip Elcan <pelcan@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/2189348
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com>
Reviewed-by: svc-mobile-misra <svc-mobile-misra@nvidia.com>
Reviewed-by: Nicolas Benech <nbenech@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:01:38 -06:00
Philip Elcan
fa002fac86 gpu: nvgpu: unit: atomic: improve reliability of *and_test tests
The threaded tests for inc_and_test, dec_and_test, and sub_and_test were
not "passing" reliably for the "not_atomic" variants.

This updates these tests (atomic and non-atomic) to increase concurrency
of the operations by having each thread execute the operation 100 times
each rather than just once. For the sake of test time, it creates new
args for the threaded versions to keep iterations reasonable.

JIRA NVGPU-3954

Change-Id: I1fe2baa73ed1b9d4a8e13c97656411329b141db0
Signed-off-by: Philip Elcan <pelcan@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/2189347
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com>
Reviewed-by: Nicolas Benech <nbenech@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:01:38 -06:00
ajesh
8a927abdce gpu: nvgpu: add unit test for thread unit
Add unit test cases for thread unit.

Jira NVGPU-2662

Change-Id: I84a108fa83f66a3a5194f2553bf336ef2373cabf
Signed-off-by: ajesh <akv@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/2164113
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
2020-12-15 14:01:38 -06:00
Vedashree Vidwans
434242cd54 gpu: nvgpu: unit: SWUTS for enabled
Add nvgpu-enabled.h header that contains the SWUTS for the unit.

Jira NVGPU-3943

Change-Id: I5a2dd6b8cc42e19246e7ed5bc2ba4192d21a3c32
Signed-off-by: Vedashree Vidwans <vvidwans@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/2185700
Reviewed-by: Nicolas Benech <nbenech@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:01:38 -06:00
Bo Yan
df8f8e24b2 Revert "gpu: nvgpu: unit: add gr_prepare tests"
This reverts commit 9bfdb2ba03f90f0cf828f08b99101a3a3e6c4532.

Bug 2693908

Change-Id: I3ef56773e46aad3626f16b84ea5e51c2fdcc3f1c
Signed-off-by: Bo Yan <byan@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/2189200
2020-12-15 14:01:33 -06:00
Bo Yan
d6a4cf11e3 Revert "gpu: nvgpu: posix support for firmware files"
This reverts commit 2a7e6a1111c2e52df2eae22fd084f0c955ed0759.

Bug 2693908

Change-Id: Id9ed7a6b18929cf1b319a54aca227c7c36515f26
Signed-off-by: Bo Yan <byan@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/2189199
2020-12-15 14:00:22 -06:00
vinodg
55a3d10719 gpu: nvgpu: posix support for firmware files
Add posix support for nvgpu_request_firmware and
nvgpu_release_firmware calls.

In x86, needed firmware are copied under userspace/firmware
directory. For jetson, firmware files will be copied under
nvgpu_unit/firmware directory.

Update Makefile.tmk to copy firmware under systemimage under
nvgpu_unit/firmware directory

Jira NVGPU-3582

Change-Id: I9ce729af797e59c8d41a1aa4ee964d7d9b8b666e
Signed-off-by: vinodg <vinodg@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/2181572
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:00:22 -06:00
vinodg
ac8afda036 gpu: nvgpu: unit: add gr_prepare tests
Add support gr_prepare for sw and hw.
Add needed registers using nvgpu_posix_io_add_reg_space calls.

Add unit tests covering following functions
nvgpu_gr_prepare_sw
nvgpu_gr_enable_hw

Copy the falcon ucode binaries under userspace/firmware
directory
install-unit.sh modified to copy the firmware binaries
under nvgpu-unnit/firmware directory

Jira NVGPU-3582

Change-Id: If2131d2c48e828251208da86688b0594e62de82e
Signed-off-by: vinodg <vinodg@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/2184293
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:00:13 -06:00
Philip Elcan
cf81afa4dc gpu: nvgpu: unit: init: add required_tests entries
Add the entries to the required_tests.json for the new init unit tests.

JIRA NVGPU-2239

Change-Id: If297fea63bde5c567c2e09875de3afee977192f2
Signed-off-by: Philip Elcan <pelcan@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/2184930
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>
2019-08-28 16:55:39 -07:00
Philip Elcan
529d40103f gpu: nvgpu: unit: init: improve branch coverage for nvgpu_put
This adds tests for testing some NULL pointer checks in the nvgpu_put()
code paths that weren't covered.

JIRA NVGPU-2239

Change-Id: I7b4e3d26644bab0aadff4d3bf5ecdb951e391ec8
Signed-off-by: Philip Elcan <pelcan@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/2184929
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>
2019-08-28 16:55:29 -07:00
Philip Elcan
373e7e8452 gpu: nvgpu: unit: init: add tests for poweron/poweroff
Add unit test cases for nvgpu_finalize_poweron() and
nvgpu_prepare_poweroff().

JIRA NVGPU-2239

Change-Id: I5735b1d04095aae41532750a6ba0f1fb186261ce
Signed-off-by: Philip Elcan <pelcan@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/2184928
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>
2019-08-28 16:55:20 -07:00
Philip Elcan
88e167ad98 gpu: nvgpu: unit: init: cleanup init test header
Remove include files and replace with forward declarations.
Remove 'static' modifier in header and source.

JIRA NVGPU-2239

Change-Id: Ie7b6d34be446a7c9a163179c0fc443275278489a
Signed-off-by: Philip Elcan <pelcan@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/2184927
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>
2019-08-28 16:55:10 -07:00
Philip Elcan
bb2aee6d1a gpu: nvgpu: unit: add nvgpu.common.init unit test
This creates the basic test and validates all interfaces besides poweron
and poweroff.

JIRA NVGPU-3642

Change-Id: Idd36a1d7eaa8b459500ca642c742396dea677ff2
Signed-off-by: Philip Elcan <pelcan@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/2182348
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>
2019-08-26 16:07:58 -07:00
Nicolas Benech
053ddbb365 gpu: nvgpu: add root SWUTS document
This patch adds the main SWUTS document (Software Unit Test
Specification) from which all individual unit SWUTS will be
referenced.

JIRA NVGPU-3943

Change-Id: Ieee23509563cb543d4e8f41be3278679d0b9c4e2
Signed-off-by: Nicolas Benech <nbenech@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/2178798
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
2019-08-26 16:07:15 -07:00
Nicolas Benech
4169311f00 gpu: nvgpu: unit: SWUTS for mm.vm
Adds vm.h header that contains the SWUTS for the unit.

JIRA NVGPU-3943

Change-Id: I980e5dfc82e4a2ca88f06b022d7f8d7b994d92c3
Signed-off-by: Nicolas Benech <nbenech@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/2178797
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com>
Reviewed-by: svc-mobile-misra <svc-mobile-misra@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: Alex Waterman <alexw@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
2019-08-26 16:07:00 -07:00
Nicolas Benech
3bc55a1bf2 gpu: nvgpu: hal: remove non-FUSA runlist HALs from FUSA build
A number of gk20a_runlist HALs are not used in FUSA builds and are
removed by this patch. It also removes dependencies on those HALs
in the runlist unit test.

JIRA NVGPU-3690

Change-Id: If00bdedd59cf12e91609dd075c9732c6e80a05ff
Signed-off-by: Nicolas Benech <nbenech@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/2174743
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
2019-08-21 16:26:59 -07:00
vinodg
e157195be9 gpu: nvgpu: unit: update required tests
Update required test with gr config unit tests.

Jira NVGPU-3582

Change-Id: I96f31424386c7e401821849c220aff267388d5e5
Signed-off-by: vinodg <vinodg@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/2178775
GVS: Gerrit_Virtual_Submit
Reviewed-by: Seshendra Gadagottu <sgadagottu@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
2019-08-21 12:17:55 -07:00
vinodg
dc2084c723 gpu: nvgpu: unit: add gr_config tests
Add support for the fuse and gv11b_gr related
registers and with initialized values need for
gr_config tests.

Add unit tests covering following functions
nvgpu_gr_alloc
nvgpu_gr_config_init
nvgpu_gr_config_deinit
nvgpu_gr_free

Most of the gr_config.h get and set functions
will be used in config_check_set_get test

Jira NVGPU-3582

Change-Id: I69637b3047d844559ac5b44ffd366551af8ea12c
Signed-off-by: vinodg <vinodg@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/2176369
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
2019-08-18 08:17:04 -07:00
Divya Singhatwaria
6344cd3892 gpu: nvgpu: PMU unit test
Add unit tests for the PMU unit for the following:
nvgpu_pmu_early_init()
nvgpu_pmu_remove_support()
nvgpu_pmu_reset()

JIRA NVGPU-2159

Change-Id: I6207a1f4f713401249e47086c2ea59cbd604d077
Signed-off-by: Divya Singhatwaria <dsinghatwari@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/2148471
Reviewed-by: Sagar Kamble <skamble@nvidia.com>
Tested-by: Sagar Kamble <skamble@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>
2019-08-14 01:36:55 -07:00
Sagar Kamble
967a05a18a gpu: nvgpu: remove globals from falcon utf shared library
utf_falcons in libfalcon_utf.so are used by multiple unit tests and
since unit tests are run out of order it might lead to inconsistent
access to these structs.
Move these to falcon unit test. Updated the logic in the falcon utf
shared library to only export the interfaces to read/write to flcn
registers/memory.

JIRA NVGPU-2159

Change-Id: I3a1f80cce205747de4085802199ecc355bb95d6f
Signed-off-by: Sagar Kamble <skamble@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/2174187
GVS: Gerrit_Virtual_Submit
Reviewed-by: Divya Singhatwaria <dsinghatwari@nvidia.com>
Reviewed-by: Nicolas Benech <nbenech@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>
2019-08-14 01:36:45 -07:00
Alex Waterman
67714f0b3c nvgpu: userspace: Delete unused config file
Long ago I made a config file for the userspace build but that file
has now been superseded by the Makefile.shared.configs file. So
delete this file as it's clutter that causes a lot of confusion.

Change-Id: I6bff1e6e7576e310b79988c51ecebec04a1e8781
Signed-off-by: Alex Waterman <alexw@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/2174554
Reviewed-by: Philip Elcan <pelcan@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
2019-08-13 13:17:15 -07:00
Nicolas Benech
697dd143c9 gpu: nvgpu: units: add mm.mm unit tests
This unit covers the generic functions of the mm.mm module.

JIRA NVGPU-3649

Change-Id: I5b362b19e13ad3b5ba83c7c1e88411d9944be500
Signed-off-by: Nicolas Benech <nbenech@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/2161457
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
2019-08-08 10:55:46 -07:00
Divya Singhatwaria
83e28e54eb gpu: nvgpu: Add function to set falcon dmactl register
Add nvgpu_utf_falcon_set_dmactl() function in falcon UTF
to set the falcon dmactl register with desired value
required for pmu reset test

Also, update the register size for falcon from 0x300 to 0x400
for including pmu reset register.

Rename userspace/units/facon/falcon folder to
userspace/units/facon/falcon_tests

JIRA NVGPU-2159

Change-Id: I0b22cff4699af6947e87019751aa85508dfdb185
Signed-off-by: Divya Singhatwaria <dsinghatwari@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/2155124
Reviewed-by: Sagar Kamble <skamble@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>
2019-08-07 04:56:40 -07:00
Divya Singhatwaria
b1a11e71bf gpu: nvgpu: libfalcon_utf for tmake makefiles
Accessing falcon_utf objects from another directory
introduces build dependencies and also stale .o files
could be used. Fix this by generating a shared library:
libfalcon_utf.so for falcon.

JIRA NVGPU-2159

Change-Id: Ie117f553ad792a1652852b433456d86d264d0bb8
Signed-off-by: Divya Singhatwaria <dsinghatwari@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/2154211
Reviewed-by: Sagar Kamble <skamble@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>
2019-08-07 04:56:31 -07:00
Divya Singhatwaria
35799f369e gpu: nvgpu: libfalcon_utf for host makefiles
Accessing falcon_utf objects from another directory
introduces build dependencies and also stale .o files
could be used. Fix this by generating a shared library:
libfalcon_utf.so for falcon.

JIRA NVGPU-2159

Change-Id: I510accbee2cddcf5c130f55bc993a393d90a802b
Signed-off-by: Divya Singhatwaria <dsinghatwari@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/2154158
Reviewed-by: Mahantesh Kumbar <mkumbar@nvidia.com>
Reviewed-by: Vijayakumar Subbu <vsubbu@nvidia.com>
Reviewed-by: Sagar Kamble <skamble@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
2019-08-06 09:55:49 -07:00
Debarshi Dutta
48c00bbea9 gpu: nvgpu: rename channel functions
This patch makes the following changes

1) rename public channel functions to use nvgpu_channel prefix
2) rename static channel functions to use channel prefix

Jira NVGPU-3248

Change-Id: Ib556a0d6ac24dc0882bfd3b8c68b9d2854834030
Signed-off-by: Debarshi Dutta <ddutta@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/2150729
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
2019-08-01 04:37:31 -07:00
Debarshi Dutta
92d009e796 gpu: nvgpu: add safety build flag CONFIG_NVGPU_SW_SEMAPHORE
Added the safety build flag CONFIG_NVGPU_SW_SEMAPHORE to compile out
sw semaphore implementation in NVGPU. sw semaphore is only used for
presilicon bringup of GPU and hence is not needed for safety build.

Jira NVGPU-3172

Change-Id: I6a46ef22f1e2059437f710198f4ea49a47656fef
Signed-off-by: Debarshi Dutta <ddutta@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/2164216
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com>
Reviewed-by: svc-mobile-misra <svc-mobile-misra@nvidia.com>
Reviewed-by: Sagar Kamble <skamble@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>
2019-07-31 23:26:19 -07:00
Sagar Kamble
cde8c5fc3e gpu: nvgpu: unit: falcon bootstrap test
Add unit test for functions nvgpu_falcon_bootstrap and
nvgpu_falcon_bl_bootstrap.

JIRA NVGPU-898

Change-Id: I32267d994c8f3afc188234227dd56c38a28c5898
Signed-off-by: Sagar Kamble <skamble@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/2160243
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>
2019-07-29 07:48:03 -07:00
Sagar Kamble
1759211915 gpu: nvgpu: unit: falcon mailbox test
Add unit test for functions nvgpu_falcon_mailbox_read|write.

JIRA NVGPU-898

Change-Id: I65020b85900a7777da6392f6e29c67e76f05e9ad
Signed-off-by: Sagar Kamble <skamble@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/2160242
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>
2019-07-29 07:47:54 -07:00
Sagar Kamble
74094aa8ea gpu: nvgpu: unit: falcon wait for halt test
Add unit test for function nvgpu_falcon_wait_for_halt.

JIRA NVGPU-898

Change-Id: Ifc5519e9d813ba03e7bf531f18a65012fa24d9e6
Signed-off-by: Sagar Kamble <skamble@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/2160241
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>
2019-07-29 07:47:43 -07:00
Sagar Kamble
1f6f9f10d2 gpu: nvgpu: unit: falcon wait for idle test
Add unit test for function nvgpu_falcon_wait_idle.

JIRA NVGPU-898

Change-Id: Iac68eb324a061efd4e6c69654590aad84bf69224
Signed-off-by: Sagar Kamble <skamble@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/2160240
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>
2019-07-29 07:47:33 -07:00
Sagar Kamble
a6f2dd2451 gpu: nvgpu: unit: falcon memory scrub test
Add unit test for function nvgpu_falcon_mem_scrub_wait.

JIRA NVGPU-898

Change-Id: Id78360ce744ac18e06bed3df9a7826db40a0a2d6
Signed-off-by: Sagar Kamble <skamble@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/2160239
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>
2019-07-29 07:47:23 -07:00
Sagar Kamble
4c89ec1cdf gpu: nvgpu: unit: falcon reset test
Add unit test for function nvgpu_falcon_reset.

JIRA NVGPU-898

Change-Id: I2794bd28dc5389385b9bbd80a1a13b50478753ea
Signed-off-by: Sagar Kamble <skamble@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/2160238
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>
2019-07-29 07:47:13 -07:00
Sagar Kamble
e0a7659add gpu: nvgpu: unit: falcon sw state init|free test
Add unit tests for functions nvgpu_falcon_sw_init and
nvgpu_falcon_sw_free.

JIRA NVGPU-898

Change-Id: I119bba900e6d1abe6e8f92a6c404d0fa49faf076
Signed-off-by: Sagar Kamble <skamble@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/2160237
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>
2019-07-29 07:47:02 -07:00
Thomas Fleury
35b84884da gpu: nvgpu: make userd optional for safety build
Most of userd code is only needed for kernel mode submit.
Compile out userd code if kernel submit is disabled.

Jira NVGPU-3537

Change-Id: Id7e5950f658695a266102b760a55d2f85ad3776c
Signed-off-by: Thomas Fleury <tfleury@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/2156322
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
2019-07-24 17:04:53 -07:00