Thomas Fleury
76295a5aeb
gpu: nvgpu: redundant dependency on driver
...
Makefile.units.common.tmk already specifies dependency
on nvgpu driver interface.
Remove redundant dependency in units makefiles.
Jira NVGPU-5217
Change-Id: I94cbe707c25f41f0e61915c243fd55fd4bda9ccf
Signed-off-by: Thomas Fleury <tfleury@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2322205
(cherry picked from commit d9bdd8f589c121802c74da53945baa677578f71c)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2325907
Reviewed-by: automaticguardword <automaticguardword@nvidia.com >
Reviewed-by: Deepak Nibade <dnibade@nvidia.com >
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com >
GVS: Gerrit_Virtual_Submit
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com >
2020-12-15 14:13:28 -06:00
Vedashree Vidwans
c6908922e5
gpu: nvgpu: move generic preempt hals to common
...
- Move fifo.preempt_runlists_for_rc and fifo.preempt_tsg hals to common
source file as nvgpu_fifo_preempt_runlists_for_rc and
nvgpu_fifo_preempt_tsg.
Jira NVGPU-4881
Change-Id: I31f7973276c075130d8a0ac684c6c99e35be6017
Signed-off-by: Vedashree Vidwans <vvidwans@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2323866
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com >
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com >
2020-12-15 14:13:28 -06:00
Antony Clince Alex
fa73b73ba7
nvgpu: userspace: update priv_ring testcase
...
Init below new hals in test_priv_ring_setup:
- priv_ring.isr_handle_0
- priv_ring.isr_handle_1
Jira NVGPU-4669
Change-Id: Ia93a4ffca8335d71a463415d018e0746fc24e07e
Signed-off-by: Antony Clince Alex <aalex@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2321415
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com >
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com >
2020-12-15 14:13:28 -06:00
Konsta Hölttä
4f80c6b8a9
gpu: nvgpu: add channel_user_syncpt
...
Refactor user managed syncpoints out of the channel sync infrastructure
that deals with jobs submitted via the kernel api. The user syncpt only
needs to expose the id and gpu address of the reserved syncpoint. None
of the rest (fences, priv cmdbufs) is needed for that, so it hasn't been
ideal to couple with the user-allocated syncpts.
With user syncpts now provided by channel_user_syncpt, remove the
user_managed flag from the kernel sync api.
This allows moving all the kernel submit sync code to be conditionally
compiled in only when needed, and separates the user sync functionality
in a more clear way from the rest with a minimal API.
[this is squashed with commit 5111caea601a (gpu: nvgpu: guard user
syncpt with nvhost config) from
https://git-master.nvidia.com/r/c/linux-nvgpu/+/2325009 ]
Jira NVGPU-4548
Change-Id: I99259fc9cbd30bbd478ed86acffcce12768502d3
Signed-off-by: Konsta Hölttä <kholtta@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2321768
(cherry picked from commit 1095ad353f5f1cf7ca180d0701bc02a607404f5e)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2319629
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com >
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com >
2020-12-15 14:13:28 -06:00
vinodg
9d577b8d9a
gpu: nvgpu: unit: remove gv11b_channel_debug_dump test
...
dump_channel hal is moved to common code.
Remove the test_gv11b_channel_debug_dump
Jira NVGPU-5109
Signed-off-by: vinodg <vinodg@nvidia.com >
Change-Id: If04314c09d9f7f0c789752a8a003e012a629d9be
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2323553
Reviewed-by: automaticguardword <automaticguardword@nvidia.com >
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 >
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com >
GVS: Gerrit_Virtual_Submit
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com >
2020-12-15 14:13:28 -06:00
Nicolas Benech
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
Konsta Hölttä
d0ffb335dc
gpu: nvgpu: move nvgpu_has_syncpoints
...
nvgpu_has_syncpoints is more general than a channel synchronization
related, so move it to nvhost.c from channel_sync.c. Move the
declaration from gk20a.h to nvhost.h.
As the debugfs knob is Linux related, move it from struct gk20a to
struct nvgpu_os_linux.
Jira NVGPU-4548
Change-Id: I4236086744993c3daac042f164de30939c01ee77
Signed-off-by: Konsta Hölttä <kholtta@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2318814
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com >
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com >
2020-12-15 14:13:28 -06:00
Terje Bergstrom
cc2e1be0bb
gpu: nvgpu: unit: atomic: Use labs when operating on long
...
Use labs() instead of abs() when operating with longs.
Change-Id: Ibb1f2c69099387478b41b66cf68539b460bc2be3
Signed-off-by: Terje Bergstrom <tbergstrom@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2318390
Reviewed-by: automaticguardword <automaticguardword@nvidia.com >
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com >
Reviewed-by: svc-mobile-misra <svc-mobile-misra@nvidia.com >
Reviewed-by: Alex Waterman <alexw@nvidia.com >
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com >
GVS: Gerrit_Virtual_Submit
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com >
2020-12-15 14:13:28 -06:00
Terje Bergstrom
caf9ba229f
gpu: nvgpu: unit: Remove invalid dereference
...
test_tsg_format_gen() accessed test_args->timeslice when test_args
has not been initialized.
Change-Id: Ia72c5371c8634b7b1fe54c9aa20693edc47cb762
Signed-off-by: Terje Bergstrom <tbergstrom@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2318389
Reviewed-by: automaticguardword <automaticguardword@nvidia.com >
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: Thomas Fleury <tfleury@nvidia.com >
Reviewed-by: Alex Waterman <alexw@nvidia.com >
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com >
GVS: Gerrit_Virtual_Submit
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com >
2020-12-15 14:13:28 -06:00
Terje Bergstrom
7a71aba234
gpu: nvgpu: unit: Fix header guards
...
Fix cases where header guard #ifdef and #define had a mismatch.
Change-Id: I74aec2736c467f79e9786880d3e3847ee86a2466
Signed-off-by: Terje Bergstrom <tbergstrom@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2318388
Reviewed-by: automaticguardword <automaticguardword@nvidia.com >
Reviewed-by: Automatic_Commit_Validation_User
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
Terje Bergstrom
3569e21518
gpu: nvgpu: unit: Several fixes for initializations
...
Structs with structs inside them need to be initialized with double
braces. Also add a couple of missing initializations.
Change-Id: I0aa5f7ac008b8db4bececa92807f598f2f3081bd
Signed-off-by: Terje Bergstrom <tbergstrom@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2318387
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com >
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com >
2020-12-15 14:13:28 -06:00
Konsta Hölttä
46761356e5
gpu: nvgpu: make channel sync ops const
...
The function pointers for the syncpoint and semaphore implementations of
struct nvgpu_channel_sync do not change in runtime. Make this more
explicit by having the pointers in predefined private structures. Each
instance of a sync (which there are one per open channel) gets a pointer
to an ops structure instead of a list of all the individual ops.
Jira NVGPU-4548
Change-Id: I361b74bdfe32470203760d11c30e048cb4d20b77
Signed-off-by: Konsta Hölttä <kholtta@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2318242
Reviewed-by: automaticguardword <automaticguardword@nvidia.com >
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com >
Reviewed-by: svc-mobile-misra <svc-mobile-misra@nvidia.com >
Reviewed-by: svc-mobile-cert <svc-mobile-cert@nvidia.com >
Reviewed-by: Alex Waterman <alexw@nvidia.com >
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com >
GVS: Gerrit_Virtual_Submit
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com >
2020-12-15 14:13:28 -06:00
Antony Clince Alex
fa6cf4598e
nvgpu: userspace: update therm unit init
...
Update therm unit testcase: test_setup_env to include assignment of hal
function: therm_max_fpdiv_factor.
Jira: NVGPU-4860
Change-Id: I644191cdd4d4538d0c189af9cb80cea3d6368820
Signed-off-by: Antony Clince Alex <aalex@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2317074
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com >
Reviewed-by: automaticguardword <automaticguardword@nvidia.com >
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: Lakshmanan M <lm@nvidia.com >
Reviewed-by: Alex Waterman <alexw@nvidia.com >
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com >
GVS: Gerrit_Virtual_Submit
2020-12-15 14:13:28 -06:00
vinodg
8da4c91ad5
gpu: nvgpu: move userspace firmware files to gv11b dir
...
Move all userspaces firmware files from firmware dir
to firmware/gv11b dir.
Fix for unit.sh test failure in local host.
Update Makefile.tmk and install-unit.sh scripts to
copy from firmware/gv11b dir.
Jira NVGPU-5144
Signed-off-by: vinodg <vinodg@nvidia.com >
Change-Id: I706af069f6796db085947278e56a8598a9e3fff2
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2311071
Reviewed-by: automaticguardword <automaticguardword@nvidia.com >
Reviewed-by: Deepak Nibade <dnibade@nvidia.com >
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com >
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com >
GVS: Gerrit_Virtual_Submit
2020-12-15 14:13:28 -06:00
Thomas Fleury
0fa55ffac9
gpu: nvgpu: units: pramin build issues for dGPU
...
Fix pramin related build issues in unit tests, when enabling dGPU
in safety build.
pram_data032_r is now defined as a macro which cannot be used to
initialize g->ops.pramin.data032_r in unit tests.
Instead, use nvgpu_pramin_ops_init, and check that
g->ops.pramin.data032_r is non NULL.
Jira NVGPU-4661
Change-Id: I33522fc42bfe5f8c23b579126a21680fd5880fd8
Signed-off-by: Thomas Fleury <tfleury@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2314206
Reviewed-by: automaticguardword <automaticguardword@nvidia.com >
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: Alex Waterman <alexw@nvidia.com >
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com >
GVS: Gerrit_Virtual_Submit
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com >
2020-12-15 14:13:28 -06:00
Thomas Fleury
8ec4395e82
gpu: nvgpu: build flag for deterministic channel
...
Add CONFIG_NVGPU_DETERMINISTIC_CHANNELS and fix
preprocessor #ifdefs to allow compiling kernel mode
submit without deterministic feature enabled.
Jira NVGPU-4661
Change-Id: I4aa678715824e8981d39bd8db0c5ae61ef3a675c
Signed-off-by: Thomas Fleury <tfleury@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2310325
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com >
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com >
2020-12-15 14:13:28 -06:00
Vedashree Vidwans
75f79cea47
gpu: nvgpu: unit: modify mmu-fault-gv11b-fusa UT
...
Modify mmu-fault-gv11b-fusa tests to reset environment at end of each
test. Also, re-write test asserts for
test_gv11b_mm_mmu_fault_disable_hw().
Jira NVGPU-4987
Change-Id: If1866d39444717f5d5f3e0d30e29263a083ab56d
Signed-off-by: Vedashree Vidwans <vvidwans@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2310544
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com >
Reviewed-by: Philip Elcan <pelcan@nvidia.com >
Reviewed-by: automaticguardword <automaticguardword@nvidia.com >
Reviewed-by: Vijayakumar Subbu <vsubbu@nvidia.com >
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com >
GVS: Gerrit_Virtual_Submit
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com >
2020-12-15 14:13:28 -06:00
Thomas Fleury
f38a5a4f09
gpu: nvgpu: build flag for compression_page_size
...
Use CONFIG_NVGPU_COMPRESSION flag instead of CONFIG_NVGPU_DGPU
for g->ops.fb.compression_page_size.
This is to allow compiling dGPU without compression in safety build.
Jira NVGPU-4661
Change-Id: Ida53bb79ee10ff875a70bcad00cde6f6ada3c8fe
Signed-off-by: Thomas Fleury <tfleury@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2310232
GVS: Gerrit_Virtual_Submit
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com >
Reviewed-by: Deepak Nibade <dnibade@nvidia.com >
Reviewed-by: automaticguardword <automaticguardword@nvidia.com >
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com >
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 >
2020-12-15 14:13:28 -06:00
Vedashree Vidwans
ad227d9c31
gpu: nvgpu: unit: fix mutex acquire fail for l4t
...
In hal.mm.mmu_fault UT, some tests are dependent on each other. Reset
environment variables at the end of test_gv11b_mm_mmu_fault_setup_sw(),
Modify test_gv11b_mm_mmu_fault_setup_hw() to avoid destroying mmu_fault
setup for branch coverage.
Jira NVGPU-4987
Change-Id: I2e6904cb5304285123a29c24d00bd4dcd035e0ff
Signed-off-by: Vedashree Vidwans <vvidwans@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2306652
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com >
Reviewed-by: Philip Elcan <pelcan@nvidia.com >
Reviewed-by: Alex Waterman <alexw@nvidia.com >
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com >
GVS: Gerrit_Virtual_Submit
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com >
2020-12-15 14:13:28 -06:00
Prateek sethi
451797a6d5
gpu: nvgpu: move userspace firmware files to gv11b
...
qnx unit test access ucode from /proc/boot/gv11b. QNX Unit test face
issues like permission, platform dependency etc when test tries to
access ucode from /proc/boot. To fix issue updating qnx firmware unit
to read ucode from firmware/gv11b in case of unit test. Patch also
updates firmware access path for posix as well.
Jira NVGPU-3582
Bug 2693908
Change-Id: I1b28c8475b6bc4fe5ec3d6a525cb3af152feb887
Signed-off-by: Prateek sethi <prsethi@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2306278
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Sagar Kamble <skamble@nvidia.com >
Reviewed-by: Nicolas Benech <nbenech@nvidia.com >
Reviewed-by: Dinesh T <dt@nvidia.com >
Reviewed-by: Vaibhav Kachore <vkachore@nvidia.com >
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com >
GVS: Gerrit_Virtual_Submit
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com >
2020-12-15 14:13:28 -06:00
Vedashree Vidwans
0220409d0f
gpu: nvgpu: unit: fix mutex reacquire fail for l4t
...
Currently, setup_sw_s2 case of test_gv11b_mm_mmu_fault_setup_sw() in
hal.mm.mmu_fault fails for L4T OS. setup_sw_s2 test case executes
gv11b_mm_mmu_fault_info_mem_destroy() twice consecutively. This makes
the test acquire hub_isr_mutex after being destroyed; leading to failure
This patch removes setup_sw_s2 case to resolve this error. Local GCOV
report shows that there is no change in coverage with this change.
Jira NVGPU-4780
Change-Id: I7b9470180d8f3146ac09318ed34281f723cc7e1a
Signed-off-by: Vedashree Vidwans <vvidwans@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2302212
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com >
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com >
2020-12-15 14:13:28 -06:00
Philip Elcan
d9c6faa102
gpu: nvgpu: unit: mm: fix double destroy of mutex
...
Update mm unit test for nvgpu_mm_remove_support() to avoid calling the
HAL info_mem_destroy() a second time. info_mem_destroy() destroys a
mutex, so if it is called a second time, it will errantly try to destroy
it again.
JIRA NVGPU-4987
Change-Id: I6e384b15955d4059662ded3679293456d9697a0e
Signed-off-by: Philip Elcan <pelcan@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2304124
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com >
Reviewed-by: svc-mobile-misra <svc-mobile-misra@nvidia.com >
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Vinod Gopalakrishnakurup <vinodg@nvidia.com >
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com >
GVS: Gerrit_Virtual_Submit
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com >
2020-12-15 14:13:28 -06:00
Philip Elcan
d01ab94537
gpu: nvgpu: unit: mm: remove errant call to info_mem_destroy
...
Remove the second call to info_mem_destroy() in the unit test
test_page_faults_clean(). This did not add any additional coverage
and causes an attempt to access an invalid mutex since it is destroyed
by the first call.
JIRA NVGPU-4987
Change-Id: Ibbf5c4c300802566b6260f0236f705d48bebf3ee
Signed-off-by: Philip Elcan <pelcan@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2302644
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com >
Reviewed-by: svc-mobile-misra <svc-mobile-misra@nvidia.com >
Reviewed-by: Vinod Gopalakrishnakurup <vinodg@nvidia.com >
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com >
GVS: Gerrit_Virtual_Submit
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com >
2020-12-15 14:13:28 -06:00
Divya Singhatwaria
7fb3410d72
gpu: nvgpu: Updated traceability in ACR and PMU
...
Updated unit test specifcation in ACR and PMU
unit and add traceability from test to design.
JIRA NVGPU-4319
JIRA NVGPU-2192
Change-Id: Iadffaf42f0844c556ba6d9b898d2896863ff0237
Signed-off-by: Divya Singhatwaria <dsinghatwari@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2301579
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com >
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com >
2020-12-15 14:13:28 -06:00
Thomas Fleury
85ba7321e7
gpu: nvgpu: unit: fix traceability for syncpt
...
Fixed 'Targets:' statement for test_sync_usermanaged_syncpt_apis.
This will solve SWUD traceability issues for:
- nvgpu_channel_sync_get_syncpt_id
- nvgpu_channel_sync_get_syncpt_address
Jira NVGPU-4890
Change-Id: Ibd104152d87104b3a741266c035efafbb21a4bc4
Signed-off-by: Thomas Fleury <tfleury@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2300836
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com >
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com >
2020-12-15 14:13:28 -06:00
Sagar Kamble
dd1f2cd89e
gpu: nvgpu: fix the traceability for falcon hal functions
...
The falcon unit hal functions were not referenced in the "Targets" tag
hence traceability was not established. Fix it.
JIRA NVGPU-4787
Change-Id: Ia07c6063c278beb2c29d43958e77744507871fca
Signed-off-by: Sagar Kamble <skamble@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2300254
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com >
Reviewed-by: Deepak Nibade <dnibade@nvidia.com >
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com >
GVS: Gerrit_Virtual_Submit
2020-12-15 14:13:28 -06:00
ajesh
ef5935c7b3
gpu: nvgpu: update the thread swuts
...
Fix issue with the targets paragraph in thread SWUTS.
Jira NVGPU-4910
Change-Id: If2ab7d05f3e0de2fefe09f5dede7e1c55603dbe1
Signed-off-by: ajesh <akv@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2298588
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Sagar Kamble <skamble@nvidia.com >
Reviewed-by: Vijayakumar Subbu <vsubbu@nvidia.com >
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com >
GVS: Gerrit_Virtual_Submit
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com >
2020-12-15 14:13:28 -06:00
shashank singh
a987a244c2
gpu: nvgpu: add test type for boundary values checks in SWUTs
...
-Allow only usermode submit, check for gpfifo max size.
-Map buffer offset must be page aligned and in multiple of page size.
-Check for unmapped address whether it's alloced or not.
-Offset in alloc space must be multiple of page size.
-Free space offset must be in the range of alloced space.
Jira NVGPU-4470
Change-Id: I9d5e4eb121d6d462f8b8d17b31c839b34d7d6c1d
Signed-off-by: shashank singh <shashsingh@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2298188
Reviewed-by: Vaibhav Kachore <vkachore@nvidia.com >
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com >
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com >
GVS: Gerrit_Virtual_Submit
2020-12-15 14:13:28 -06:00
shashank singh
0b4ccc7247
gpu: nvgpu: ignore deterministic submit flag for safety
...
Safety only supports usermode submits so there is no need to process
DETERMINISTIC submit flag. For safety, while processing DETERMINISTIC
submit flag we are only setting deterministic field of struct
channel_gk20a and taking power reference with gk20a_busy(). On qnx
safety deterministic field is just used to check the syncpoint
allocation and taking power reference is a noop.
Jira NVGPU-4378
Change-Id: I1dc256db7d9fab93bef8fcc42bdb36f611b3ef40
Signed-off-by: shashank singh <shashsingh@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2284644
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com >
Reviewed-by: svc-mobile-misra <svc-mobile-misra@nvidia.com >
Reviewed-by: Konsta Holtta <kholtta@nvidia.com >
Reviewed-by: Thomas Fleury <tfleury@nvidia.com >
Reviewed-by: Vaibhav Kachore <vkachore@nvidia.com >
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com >
GVS: Gerrit_Virtual_Submit
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com >
2020-12-15 14:13:28 -06:00
Petlozu Pravareshwar
c2fbc99967
gpu: nvgpu: Address Vectorcast gap for posix queue
...
Update unit test for posix queue unit to cover Vectorcast gap.
Jira NVGPU-4478
Change-Id: I0d79861f173d511d25cf45051c399e3193eabdbe
Signed-off-by: Petlozu Pravareshwar <petlozup@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2294146
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com >
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com >
2020-12-15 14:13:28 -06:00
Petlozu Pravareshwar
566b1df08c
gpu: nvgpu: unit: Update interface.lock unit tests
...
Implement APIs which mimic below QNX standard APIs and use them in
interface.lock unit tests. This is required because as part of writing
UTs for "daemon_igpu.c" file, the below standard APIs are mocked.
- sem_init()
- sem_wait()
- sem_post()
JIRA NVGPU-3909
Change-Id: I8f7e9c031b2a840e04e03a0f871a9e5d72c3e4dd
Signed-off-by: Petlozu Pravareshwar <petlozup@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2293634
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com >
Reviewed-by: Philip Elcan <pelcan@nvidia.com >
Reviewed-by: Vijayakumar Subbu <vsubbu@nvidia.com >
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com >
GVS: Gerrit_Virtual_Submit
2020-12-15 14:13:28 -06:00
sagar
8c04d2f000
gpu: nvgpu: skip classes in obj_alloc
...
Currently, we are performing obj ctx alloction for bellow classes
1. VOLTA_COMPUTE_A
2. VOLTA_DMA_COPY_A
3. VOLTA_CHANNEL_GPFIFO_A
In safety, we use Async CE but not GRCE.
So allocating obj context only for COMPUTE_A and return success(0) for
all other valid classes, after setting class in the channel struct.
Jira NVGPU-4378
Change-Id: Ie99872e062cc66f9ddf699397a13df85c3d8d59e
Signed-off-by: sagar <skadamati@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2287486
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com >
Reviewed-by: Deepak Nibade <dnibade@nvidia.com >
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com >
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com >
GVS: Gerrit_Virtual_Submit
2020-12-15 14:13:28 -06:00
Abdul Salam
17cc9b2b98
gpu: nvgpu: Refactor Clock unit.
...
Current clk unit has multiple header files under pmuif folder.
This has combination of public struct which is accessed outside the
unit and private struct which is accessed within clk unit.
This patch segregates them based on their accessibility.
All private items are moved into ucode_clk_inf.h from pmuif which only
clk can access.
All public items are moved into include/clk.h which other units can
access
This will help in documentation of items for public items.
NVGPU-4491
Change-Id: Iccb0571e05ecb3cb13363390bed8c7214409b543
Signed-off-by: Abdul Salam <absalam@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2292318
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com >
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com >
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
5137e51da8
gpu: nvgpu: unit: increase commom.mm test coverage
...
This patch adds some corner cases tests to increase coverage.
JIRA NVGPU-4413
Change-Id: I77ed2f1cc4e31336f4815468be80b880f015dde7
Signed-off-by: Nicolas Benech <nbenech@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2293848
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
b85094e045
gpu: nvgpu: unit: increase hal.fb test coverage
...
This patch adds some corner cases tests to increase coverage.
JIRA NVGPU-4413
Change-Id: Ifb58c595a0953fdc91580e3d491a1f04143ad9f6
Signed-off-by: Nicolas Benech <nbenech@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2293847
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com >
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 >
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com >
GVS: Gerrit_Virtual_Submit
2020-12-15 14:13:28 -06:00
Nicolas Benech
e8c02f121b
gpu: nvgpu: vm: plausibility check for nvgpu_vm_bind_channel
...
Ensure that the channel pointer passed to nvgpu_vm_bind_channel
is not NULL.
Update unit test accordingly.
JIRA NVGPU-4947.
Change-Id: I3f987ee9042066df83cc6101b20b4add3661fae8
Signed-off-by: Nicolas Benech <nbenech@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2291034
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com >
Reviewed-by: svc-mobile-misra <svc-mobile-misra@nvidia.com >
Reviewed-by: svc-mobile-cert <svc-mobile-cert@nvidia.com >
Reviewed-by: Deepak Nibade <dnibade@nvidia.com >
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com >
GVS: Gerrit_Virtual_Submit
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com >
2020-12-15 14:13:28 -06:00
Philip Elcan
8366e2980d
gpu: nvgpu: unit: fix typo in static_analysis SWUTS
...
Fix a typo in the doxygen for the static_analysis unit test was
preventing it from being included in the generated SWUTS.
JIRA NVGPU-4825
Change-Id: I3cbc1bb275c28d6d51adce48c74f88593d36ea72
Signed-off-by: Philip Elcan <pelcan@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2293623
Reviewed-by: Vinod Gopalakrishnakurup <vinodg@nvidia.com >
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com >
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com >
GVS: Gerrit_Virtual_Submit
2020-12-15 14:13:28 -06:00
Prateek sethi
51913163a6
gpu: nvgpu: Remove nvgpu_hr_timestamp from safety build
...
nvgpu_hr_timestamp() is not being called from any safe API, so it cab
be removed from the safety build. Patch moves this function and unit
test covers this function to under CONFIG_NVGPU_NON_FUSA flag.
Jira NVGPU-4994
Change-Id: I47d5c22b5a407626d75b10c1c67cdb3e765397b9
Signed-off-by: Prateek sethi <prsethi@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2292895
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
b342b29600
gpu: nvgpu: add tests for posix thread
...
Add more tests as part of Thread unit test to increase the
branch coverage.
Move struct instances to C file as part of cleanup.
Jira NVGPU-4478
Change-Id: Ie750f67a38abecae4d85327e002d3163539bfef0
Signed-off-by: ajesh <akv@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2292278
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com >
Reviewed-by: svc-mobile-cert <svc-mobile-cert@nvidia.com >
Reviewed-by: Sagar Kamble <skamble@nvidia.com >
Reviewed-by: Vijayakumar Subbu <vsubbu@nvidia.com >
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com >
GVS: Gerrit_Virtual_Submit
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com >
2020-12-15 14:13:28 -06:00
Divya Singhatwaria
374a0a1dbe
gpu: nvgpu: Add traceability and UTS in ACR and PMU
...
- Add unit test specification for PMU unit
- Updated unit test specifcation in ACR unit and add
traceability from test to design.
JIRA NVGPU-4319
JIRA NVGPU-2192
Change-Id: Ic483ec18844cb828002ed7d354cf112f3ea03898
Signed-off-by: Divya Singhatwaria <dsinghatwari@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2289559
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com >
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com >
2020-12-15 14:13:28 -06:00
Divya Singhatwaria
6b7527dd0e
gpu: nvgpu: Add more branch coverage for PMU and ACR
...
Adding test scenarios to cover branches for
g->ops.pmu.pmu_isr
nvgpu_pmu_reset
nvgpu_acr_bootstrap_hs_acr
nvgpu_acr_init
Adding new test test_is_pmu_supported()
Also, moved gv11b_write_dmatrfbase() and the related ops
.write_dmatrfbase to non-fusa code under the flag
CONFIG_NVGPU_LS_PMU
JIRA NVGPU-2192
JIRA NVGPU-4319
Change-Id: I489ec5078756d68a4fdb37658e4a89b0d45f8963
Signed-off-by: Divya Singhatwaria <dsinghatwari@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2283715
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: Vijayakumar Subbu <vsubbu@nvidia.com >
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com >
GVS: Gerrit_Virtual_Submit
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com >
2020-12-15 14:13:28 -06:00
ajesh
33c9379b8b
gpu: nvgpu: add test for thread unit
...
Add test as part of Thread UT to increase the branch coverage.
Jira NVGPU-4478
Change-Id: I774e9677fde51d33505081d33193c93ef25617a9
Signed-off-by: ajesh <akv@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2291448
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com >
Reviewed-by: svc-mobile-cert <svc-mobile-cert@nvidia.com >
Reviewed-by: Rajesh Devaraj <rdevaraj@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 >
GVS: Gerrit_Virtual_Submit
2020-12-15 14:13:28 -06:00
vinodg
740f26cee5
gpu: nvgpu: fix branch coverage for gr unit
...
Fix branch coverage to the change added in
driver code for checking su_coalesce and lg_coalesce
hal pointers as valid.
Jira NVGPU-4868
Change-Id: I88b34226051697c941811c40b3a0f7928f3b1e2a
Signed-off-by: vinodg <vinodg@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2291208
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com >
Reviewed-by: svc-mobile-misra <svc-mobile-misra@nvidia.com >
Reviewed-by: svc-mobile-cert <svc-mobile-cert@nvidia.com >
Reviewed-by: Deepak Nibade <dnibade@nvidia.com >
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com >
GVS: Gerrit_Virtual_Submit
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com >
2020-12-15 14:13:28 -06:00
vinodg
7852d452ee
gpu: nvgpu: Add test to cover FECS watchdog timeout
...
Add unit test to cover the FECS watch timeout method
in gm20b.
Correct the file and function name to gm20b from gk20a.
Bug 200586923
Change-Id: I447e26c7d898f3967ad2de7a7e4a7457264941b5
Signed-off-by: vinodg <vinodg@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2290643
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
249418b90b
gpu: nvgpu: addon to RC unit
...
Added entries to SWUTS.sources and required_tests.json
Jira NVGPU-4385
Change-Id: I8300645d0ea63e9e016d602f1cc4cf1d4104f45b
Signed-off-by: Debarshi Dutta <ddutta@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2287600
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
73df40d9d4
gpu: nvgpu: add kmem in SWUTS
...
Add posix kmem unit in SWUTS files.
Jira NVGPU-4478
Change-Id: I700d2f81b63ea0e4e8b1aa9621a02dddf4841d78
Signed-off-by: ajesh <akv@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2290219
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
f206c1df9c
gpu: nvgpu: unit: update sync SWUTS for sync_ro_map
...
Adds gops_sync.gops_sync_syncpt.get_sync_ro_map to sync SWUTS.
JIRA NVGPU-3510
Change-Id: I94e0859727a91d997d69bd64ddbb40cd2c723919
Signed-off-by: Nicolas Benech <nbenech@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2289245
Reviewed-by: Vinod Gopalakrishnakurup <vinodg@nvidia.com >
Reviewed-by: Alex Waterman <alexw@nvidia.com >
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com >
GVS: Gerrit_Virtual_Submit
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com >
2020-12-15 14:13:28 -06:00
Nicolas Benech
f97335e723
gpu: nvgpu: unit: update bug SWUTS for nvgpu_assert
...
Adds nvgpu_assert to bug SWUTS.
JIRA NVGPU-3510
Change-Id: I7fcb00cf435d70d5536a783ad0fd4c159a77a0e3
Signed-off-by: Nicolas Benech <nbenech@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2289244
Reviewed-by: Vinod Gopalakrishnakurup <vinodg@nvidia.com >
Reviewed-by: Alex Waterman <alexw@nvidia.com >
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com >
GVS: Gerrit_Virtual_Submit
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com >
2020-12-15 14:13:28 -06:00
Nicolas Benech
acd459237a
gpu: nvgpu: unit: update FIFO SWUTS for inst_block
...
Adds nvgpu_inst_block_addr and nvgpu_free_inst_block to FIFO SWUTS.
JIRA NVGPU-3510
Change-Id: Ia65a53dfe7f976c271c2f7cc5da9ffa9d676aac4
Signed-off-by: Nicolas Benech <nbenech@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2289243
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com >
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com >
2020-12-15 14:13:28 -06:00