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
Nicolas Benech
c70a3a9fff
gpu: nvgpu: unit: update FB SWUTS for gops_fb and gv11b*
...
Adds some gops_fb.* and several gv11b HALs to FB SWUTS.
JIRA NVGPU-3510
Change-Id: Id68be50a06e1cd52be8413e2aed9d59ada776459
Signed-off-by: Nicolas Benech <nbenech@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2289242
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
e903146040
gpu: nvgpu: unit: update ECC SWUTS for gops_ecc
...
Adds some gops_ecc.* to ecc SWUTS.
JIRA NVGPU-3510
Change-Id: I9e5d783b7cde60434279bcc77f04b4a519c4caf1
Signed-off-by: Nicolas Benech <nbenech@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2289241
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
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
Vedashree Vidwans
f2446737fd
gpu: nvgpu: fifo: add coverage & traceability
...
This patch adds new channel and sync test to improve coverage. This
patch also updates SWUTs target tag to increase function traceability
and updates test type.
Jira NVGPU-4817
Change-Id: I52a7fa27f61e7e465d2ede25b92745413f17e50b
Signed-off-by: Vedashree Vidwans <vvidwans@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2280963
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com >
Reviewed-by: svc-mobile-cert <svc-mobile-cert@nvidia.com >
Reviewed-by: svc-mobile-misra <svc-mobile-misra@nvidia.com >
Reviewed-by: Thomas Fleury <tfleury@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
Sagar Kamble
57f3968cb9
gpu: nvgpu: mc: address code inspection gaps
...
Address following issues uncovered during inspection:
1. Remove the doxygen comment from nvgpu_wait_for_deferred_interrupts
definition.
2. Use NVGPU_MC_INTR_STALLING instead of hardcoding the index.
3. Define doxygen groups NVGPU_MC_UNIT_ENUMS,
NVGPU_MC_INTR_TYPE_DEFINES, NVGPU_MC_INTR_UNIT_DEFINES and
NVGPU_MC_INTR_ENABLE_DEFINES.
4. Update the doxygen comments.
5. Fix the cleanup, typo in the description of the test
test_wait_for_deferred_interrupts.
JIRA NVGPU-4795
Change-Id: Ifc6756832aabf9dd42ee174eb1373495e6d38c86
Signed-off-by: Sagar Kamble <skamble@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2287627
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
Divya Singhatwaria
48acd86cb3
gpu: nvgpu: ACR branch coverage for ucode blob
...
- Add test scenarios for achieving branch coverage
for failure of dynamic memory allocation while
preparing ucode blob.
- Add more branch coverage for nvgpu_acr_bootstrap_hs_acr()
- Move GR reg space required for ACR tests to ACR unit test
itself to remove dependency on GR unit
JIRA NVGPU-4319
Change-Id: I770a696a1681eb05243c7168878793a30cd59c13
Signed-off-by: Divya Singhatwaria <dsinghatwari@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2286257
Reviewed-by: Sagar Kamble <skamble@nvidia.com >
Reviewed-by: Alex Waterman <alexw@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
ddutta
d0ad13b024
gpu: nvgpu: add more coverage to SYNC UT
...
This patch adds the following code coverage
1) Add a test to fail the allocation of syncpt_name correctly.
2) Add a test that covers all three branches of get_sync_ro_map
3) Add entry into the SWUTS.h and SWUTS.sources
4) Add test entries in the required_tests.json file
5) add nvgpu_safe_add_u64 to fix cert-C INT30 violation
Jira NVGPU-913
Change-Id: If0ccc9a9314494af1a663eb8ef37a68644c18453
Signed-off-by: Debarshi Dutta <ddutta@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2267389
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
vinodg
eabba98e2a
gpu: nvgpu: Add more test coverage for common.netlist
...
Add more line and branch coverage in unit test for common.netlist
unit
Jira NVGPU-4920
Change-Id: I6991a584b22b1d3724b665dc2a04a30f172d5c11
Signed-off-by: vinodg <vinodg@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2286762
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com >
Reviewed-by: svc-mobile-cert <svc-mobile-cert@nvidia.com >
Reviewed-by: Deepak Nibade <dnibade@nvidia.com >
Reviewed-by: 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
Sagar Kamble
731e92296b
gpu: nvgpu: falcon: add test for nvgpu_falcon_get_id
...
Observed during code inspection that unit test to test the function
nvgpu_falcon_get_id.
JIRA NVGPU-4787
Change-Id: I6824f1297ae655e78acfec42fe66a8b7d46cf103
Signed-off-by: Sagar Kamble <skamble@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2286523
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com >
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com >
2020-12-15 14:13:28 -06:00
Seema Khowala
c8050eabec
gpu: nvgpu: gr: fix return value of *handle_sw_method*
...
Currently chip specific functions for handle_sw_method
does not return -EINVAL if class does not match as
expected. Fix it by setting default return value to
-EINVAL and updating return value to 0 for successful
class/method matches.
JIRA NVGPU-4909
Change-Id: Ifb3aa35215171ddbc64d6f1d23f8944c9fe44b2d
Signed-off-by: Seema Khowala <seemaj@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2285848
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com >
Reviewed-by: svc-mobile-cert <svc-mobile-cert@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 >
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com >
GVS: Gerrit_Virtual_Submit
2020-12-15 14:13:28 -06:00
Vedashree Vidwans
cec089eff2
gpu: nvgpu: mm: update SWUTS with nvgpu_allocator
...
Add nvgpu_allocator header to SWUTS header and sources list.
Jira NVGPU-4780
Change-Id: I399de70fc4eef84522e3978c6fc0bbb795a638f1
Signed-off-by: Vedashree Vidwans <vvidwans@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2286133
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
Thomas Fleury
cffefda3e4
gpu: nvgpu: unit: traceability for runlist reload
...
Fix 'Targets:' statement for:
- gops_runlist.reload
Jira NVGPU-4890
Change-Id: I944854c79bd8a772a4b5f3f10d342f3650fbd772
Signed-off-by: Thomas Fleury <tfleury@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2285807
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com >
Reviewed-by: Automatic_Commit_Validation_User
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
8d346debaa
gpu: nvgpu: add more tests for bitops
...
Add more tests as part of Bitops UT.
Jira NVGPU-4478
Change-Id: Ibb81e570385ab223d0f0f4a655da2e22733bd139
Signed-off-by: ajesh <akv@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2284700
Reviewed-by: Philip Elcan <pelcan@nvidia.com >
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com >
Reviewed-by: Alex Waterman <alexw@nvidia.com >
Reviewed-by: Vijayakumar Subbu <vsubbu@nvidia.com >
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com >
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com >
GVS: Gerrit_Virtual_Submit
2020-12-15 14:13:28 -06:00
ajesh
9f021d2658
gpu: nvgpu: add more tests for utils
...
Add more tests as part of utils UT.
Jira NVGPU-4478
Change-Id: Iaf8f29cd78b03a6a62a15dab11b67f91197eadce
Signed-off-by: ajesh <akv@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2284342
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@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
75175d8081
gpu: nvgpu: unit: more traceability for fifo
...
Add/fix 'Targets:' statements for:
- nvgpu_engine_status_get_ctx_id_type
- nvgpu_engine_status_get_next_ctx_id_type
- gm20b_pbdma_reset_method
- gm20b_pbdma_restartable_0_intr_descs
- gm20b_pbdma_disable_and_clear_all_intr
- gm20b_pbdma_clear_all_intr
- gm20b_pbdma_get_fc_target
- nvgpu_bug_exit
- nvgpu_bug_cb_from_node
Jira NVGPU-4890
Change-Id: I984542aa7daace85843fe6858d7c27b310046b28
Signed-off-by: Thomas Fleury <tfleury@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2284481
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
ea2563c033
gpu: nvgpu: unit: increase coverage and docs for mm
...
For common.mm subunits, this patch:
- adds extra test cases for some lesser used APIs
- updates SWUTS to add several functions to Targets fields.
JIRA NVGPU-3510
Change-Id: I350fbe0927472e1a07385a8cf87e0f0a8bbb6a8c
Signed-off-by: Nicolas Benech <nbenech@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2280067
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@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
Sagar Kamble
a3d91c4f47
gpu: nvgpu: build unit tests for safety qnx based on umbrella chosen
...
Earlier, libnvgpu-drv.so and unit tests were being built with safety
debug profile unconditionally for all qnx and l4t builds.
In order to get coverage numbers corresponding to the release build
let us remove the overriding of the build profile for safety qnx
build. This also needs that these components are built only for
safety qnx and l4t builds.
For x86 and L4T userspace build, default profile is still set to
safety-debug.
JIRA NVGPU-4830
Change-Id: I02f572761bda9eb0c1b8fcdf7b22a07a9d10303a
Signed-off-by: Sagar Kamble <skamble@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2275764
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
Thomas Fleury
95fc0571d7
gpu: nvgpu: unit: traceability for tsg disable
...
Fix 'Targets:' statement for:
- gops_tsg.disable
- nvgpu_tsg_disable
Fix test description for:
- gv11b_tsg_enable
Jira NVGPU-4890
Change-Id: I25b4be03d59b0932f802acc41f1ee488b812ee8e
Signed-off-by: Thomas Fleury <tfleury@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2284771
Reviewed-by: Automatic_Commit_Validation_User
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
eac3137c60
gpu: nvgpu: add more tests for bug
...
Add more tests as part of Bug UT.
Jira NVGPU-4478
Change-Id: If9141ded41e9b9e97d03fa26c7404b85fa253014
Signed-off-by: ajesh <akv@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2284669
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com >
Reviewed-by: svc-mobile-cert <svc-mobile-cert@nvidia.com >
Reviewed-by: Alex Waterman <alexw@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
vinodg
1cbe70a9c6
gpu: nvgpu: Fix unit test build break.
...
Remove nvgpu-gr library usage from Makefile.
mock-iospace is enough to support for the needed
iospace.
Jira NVGPU-2192
Change-Id: I21a5158c69ca23039dac5e509a9a0c711848e178
Signed-off-by: vinodg <vinodg@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2284451
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Seshendra Gadagottu <sgadagottu@nvidia.com >
Reviewed-by: Nicolas Benech <nbenech@nvidia.com >
Reviewed-by: Alex Waterman <alexw@nvidia.com >
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com >
GVS: Gerrit_Virtual_Submit
Tested-by: Nicolas Benech <nbenech@nvidia.com >
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com >
2020-12-15 14:13:28 -06:00