Commit Graph

17 Commits

Author SHA1 Message Date
Thomas Fleury
10adb9accc gpu: nvgpu: unit: fix build w/ recovery disabled
nvgpu_gr_falcon_get_fecs_mutex is compiled out when
CONFIG_NVGPU_ENGINE_RESET is undefined.

g->ops.fifo.recovery is compiled out when
CONFIG_NVGPU_RECOVERY is undefined.

Jira NVGPU-4089

Change-Id: I637517e17f5853a2b79568724177c7a411e3c1ba
Signed-off-by: Thomas Fleury <tfleury@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/2209500
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: Deepak Nibade <dnibade@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: Vinod Gopalakrishnakurup <vinodg@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
Divya Singhatwaria
d1d400b36e gpu: nvgpu: ACR unit tests
Add unit tests for ACR unit for the following
function:
- nvgpu_acr_prepare_ucode_blob_v1()
- nvgpu_acr_is_lsf_lazy_bootstrap()

JIRA NVGPU-3978

Change-Id: I41ea1faf5a0aaf90c14006bb2ede00f20cec1064
Signed-off-by: Divya Singhatwaria <dsinghatwari@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/2206929
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:24 -06:00
vinodg
94b0b5838c gpu: nvgpu: unit: Add interrupt unit test with channel
Add support for interrupt unit tests for following use cases
1. with channel and without tsg.
2. with channel and tsg, without setting the context to local cache.
3. with channel and tsg, setting the context to local cache

Jira NVGPU-4096

Change-Id: Ib9e5b49f5c5b94d785b9e225a84f3b2829fd3cf7
Signed-off-by: vinodg <vinodg@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/2213089
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
babdf69f8b gpu: nvgpu: unit: Add more test to gr ecc unit
Add test for FUSES_OVERRIDE support and FECS_FEATURE_OVERRIDE
support in gr ecc unit

Jira NVGPU-4095

Change-Id: Icaaaae009109c5249026bbdcef7b67f2a0d471ac
Signed-off-by: vinodg <vinodg@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/2210430
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com>
Reviewed-by: Seshendra Gadagottu <sgadagottu@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:05:52 -06:00
vinodg
3d546ad863 gpu: nvgpu: unit: more coverage for gr interrupt unit
Add support for nonstall isr call from unit test
Add support for setting global esr for sm exception
Add null functions for tex exception and log_mme_exception

Jira NVGPU-4085

Change-Id: I8f4650008fa9e45f81f151e1acb13718801c8f8b
Signed-off-by: vinodg <vinodg@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/2209874
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com>
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>
2020-12-15 14:05:52 -06:00
vinodg
16a07a66ec gpu: nvgpu: unit: gr unit test for fecs errors
Add gr interrupt unit test to cover all fecs errors.

Jira NVGPU-4085

Change-Id: Ia5b2bb61473348e993a26432bd45b781900a2d71
Signed-off-by: vinodg <vinodg@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/2207585
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@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:05:52 -06:00
vinodg
63d333e324 gpu: nvgpu: unit: add more gr interrupt test
Add gr interrupt unit test to cover gpc and tpc
exceptions.

Jira NVGPU-4085

Change-Id: I514c376d46b5ded345846465ef54d7b132341907
Signed-off-by: vinodg <vinodg@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/2207482
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@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:05:52 -06:00
vinodg
c9e7f17986 gpu: nvgpu: unit: gr unit test for illegal method
Add interrupt unit test to handle illegal method
exceptions.

Jira NVGPU-3970

Change-Id: I0ebe7d187100930b40d2263fb390ab2ffe238911
Signed-off-by: vinodg <vinodg@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/2205034
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com>
Reviewed-by: Seshendra Gadagottu <sgadagottu@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:05:52 -06:00
Seshendra Gadagottu
bc83d6aa9c gpu: nvgpu: unit: gr: add gr falcon unit test
Added following unit tests to cover common gr falcon unit:
gr_falcon_init
gr_falcon_init_ctxsw
gr_falcon_nonsecure_gpccs_init_ctxsw
gr_falcon_recovery_ctxsw
gr_falcon_nonsecure_gpccs_recovery_ctxsw
gr_falcon_query_test
gr_falcon_init_ctx_state
gr_falcon_deinit

JIRA NVGPU-3930

Change-Id: I46f02ac62d8fbdd8704bca34a8088e2de4e2483a
Signed-off-by: Seshendra Gadagottu <sgadagottu@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/2201977
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
98495234c7 gpu: nvgpu: unit: gr: Add gr interrupt unit test
Add test for gr interrupt unit.
This test make gr interrupt isr call, without a channel allocation
and interrupt registers set for all bits.

Jira NVGPU-3970

Change-Id: Ie225663088f35c2cdeb384d9904bff7ebcbac84e
Signed-off-by: vinodg <vinodg@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/2200882
Reviewed-by: Seshendra Gadagottu <sgadagottu@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:05:52 -06:00
vinodg
a15aaba53c gpu: nvgpu: units: gr: Add gr ecc_init support
Enable gr ecc_init_support as part of the gr_init_support.

Jira NVGPU-3970

Change-Id: I4d1026b3025e5d54988f7612e1ed07a6ad8b34f5
Signed-off-by: vinodg <vinodg@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/2199131
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@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:05:52 -06:00
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
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
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
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
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
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