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
sagar
9d0d16cffd
nvgpu: add insturmentation for ctxsw error codes
...
For integration testing in safety build, we need to test ctxsw firmware
error codes. inorder to test this, we need some instrumentation in
nvgpu driver.
Added below instrumentation for CTXSW FW error code integration testing.
1. Reduce the ctxsw watchdog time, so ctxsw watchdog always triggered.
Use CONFIG_NVGPU_CTXSW_FW_ERROR_WDT_TESTING for testing watchdog
2. Submit unsupported method to CTXSW FW, it will trigger err.
Use CONFIG_NVGPU_CTXSW_FW_ERROR_CODE_TESTING for testing err code.
JIRA NVGPU-4471
Change-Id: Ib45a946b3e38d3b6dd5bbee277c5d3e7c55521c0
Signed-off-by: sagar <skadamati@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2284048
Tested-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 >
Reviewed-by: svc-mobile-cert <svc-mobile-cert@nvidia.com >
Reviewed-by: Deepak Nibade <dnibade@nvidia.com >
Reviewed-by: Ankur Kishore <ankkishore@nvidia.com >
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com >
GVS: Gerrit_Virtual_Submit
2020-12-15 14:13:28 -06:00
Sagar Kamble
ad6a1b141f
gpu: nvgpu: remove unneeded headers inclusion
...
Remove the header inclusions that are not needed in falcon and mc
units.
JIRA NVGPU-4795
JIRA NVGPU-4787
Change-Id: I39f639b01f321b7b4e969d839daef8efe22617e9
Signed-off-by: Sagar Kamble <skamble@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2287718
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
vinodg
b11699fe57
gpu: nvgpu: compile out unused code in netlist hal.
...
Unused code for checking netlists A/B/C are moved under
CONFIG_NVGPU_NON_FUSA check. These netlists are not supported for
safety build.
Jira NVGPU-4920
Change-Id: I604dce54017149173c3f21a1e82f41bcb0cd89db
Signed-off-by: vinodg <vinodg@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2287761
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: svc-mobile-cert <svc-mobile-cert@nvidia.com >
Reviewed-by: Seshendra Gadagottu <sgadagottu@nvidia.com >
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com >
GVS: Gerrit_Virtual_Submit
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
ajesh
0351154407
gpu: nvgpu: add doxygen documentation
...
Add Doxygen documentation for the below units
- log2
- circ_buf
- kref
- list
Jira NVGPU-4417
Change-Id: I93d19a41ab4539cac0ccf514e790c6bb3f85bcc9
Signed-off-by: ajesh <akv@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2286888
Reviewed-by: Philip Elcan <pelcan@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
Vaibhav Kachore
bbb63c0a8c
gpu: nvgpu: remove "trace/events/gk20a.h" from QNX build
...
- "include/trace/events/gk20a.h" file was having GPL2 license
(which should not used for QNX code). This file was used for
compiling linux userspace driver("libnvgpu-drv.so") and was used for
unit testing on QNX.
- This patch removes stubs in "include/trace/events/gk20a.h" file.
(which were used for linux userspace driver.)
- For QNX driver, "nvgpu_rmos/trace/events/gk20a.h" was used.
This patch moves that file to "include/nvgpu/posix/trace_gk20a.h" and
does relevant license change. This same file will be used for linux
userspace driver.
- This patch also creates a new file "include/nvgpu/trace.h" which
selects proper trace file depending on the config.
Bug 2802414
Change-Id: Icdfb251e5698073f986753a969e804161af3ecc5
Signed-off-by: Vaibhav Kachore <vkachore@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2286388
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com >
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com >
2020-12-15 14:13:28 -06:00
Lakshmanan M
bf072ed669
gpu: nvgpu: Add nvgpu_nvhost_syncpt_get_name() for safety build
...
JIRA NVGPU-3770
Change-Id: Ic811ea50d364b9229db341aefb0c08124cacfc5f
Signed-off-by: Lakshmanan M <lm@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2286335
Reviewed-by: Dinesh T <dt@nvidia.com >
Reviewed-by: Rajesh Devaraj <rdevaraj@nvidia.com >
Reviewed-by: Vaibhav Kachore <vkachore@nvidia.com >
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com >
Tested-by: Dinesh T <dt@nvidia.com >
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com >
GVS: Gerrit_Virtual_Submit
2020-12-15 14:13:28 -06:00
dinesh
fcfdc711d8
gpu: nvgpu: Adding new fault injection
...
This is adding new fault injection members to support testing
nvhost.c.
JIRA NVGPU-4811
Change-Id: I1defcc6f48f1783dac3d317ab4ad417e23aeef11
Signed-off-by: dinesh <dt@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2283976
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Rajesh Devaraj <rdevaraj@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
mkumbar
5a17a7b85a
gpu: nvgpu: ACR unit doxygen update
...
Update doxygen for ACR intefaces.
JIRA NVGPU-4152
Change-Id: Id26d8c057c38d5f38bb9e09a18db65b8fc1e2877
Signed-off-by: mkumbar <mkumbar@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2275020
Tested-by: Deepak Goyal <dgoyal@nvidia.com >
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com >
Reviewed-by: Deepak Goyal <dgoyal@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
Scott Long
e262bdb946
gpu: nvgpu: whitelist MISRA 8.7 violations
...
Whitelist false positives caused by a Coverity scanner bug
where Advisory Rule 8.7 violations are raised when both
'static' and 'const' are used in the definition of an object.
This bug exists in Coverity v2019.06 and is reported to be
fixed in Coverity v2019.12.
See nvbug 2823817 for more information.
JIRA NVGPU-3178
Change-Id: I495e927766617f797f009cdd71a919b73ce371e8
Signed-off-by: Scott Long <scottl@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2286769
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
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
vinodg
f0776d26f2
gpu: nvgpu: remove unwanted error code checking in common.netlist
...
Remove unwanted error checking in common.netlist to make branch
coverage better.
Jira NVGPU-4920
Change-Id: I73535102af6eb83d1ffb1d166b9fdbeaa6302b35
Signed-off-by: vinodg <vinodg@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2286761
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: 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 >
GVS: Gerrit_Virtual_Submit
2020-12-15 14:13:28 -06:00
Thomas Fleury
e257f96911
gpu: nvgpu: use cond signal for SW quiesce
...
nvgpu_cond_broadcast error code is not checked in
nvgpu_sw_quiesce, which causes a Coverity violation.
Use nvgpu_cond_signal instead, since only one thread
needs to be woken up.
Jira NVGPU-4512
Change-Id: I4f6c3956f792487ba9c1eed09db09fd86ac56ffe
Signed-off-by: Thomas Fleury <tfleury@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2286056
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: 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
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
Sagar Kamble
a13a9bdf4c
gpu: nvgpu: falcon: address code inspection gaps
...
Address following issues uncovered during inspection:
1. Change the comments in struct nvgpu_falcon to doxygen style.
2. Update function description of wait_idle and scrub_wait to
describe the timeout type.
3. Add more detail to copy_to_imem|dmem.
4. Change constants defined using macros to const u32.
JIRA NVGPU-4787
Change-Id: I88c789a9cf8c20d62a7ad231a6364376c999b8c9
Signed-off-by: Sagar Kamble <skamble@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2286522
Tested-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 >
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
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
5457172924
gpu: nvgpu: fifo: modify bit shift operand sign
...
Bit shift operands should be positive to ensure correct behavior. This
patch modifies bit shift operands to be unsigned.
Jira NVGPU-4817
Change-Id: I2fc6510986cee0fbd79743164f25b05231b4da92
Signed-off-by: Vedashree Vidwans <vvidwans@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2285810
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com >
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com >
2020-12-15 14:13:28 -06:00
Alex Waterman
1a204f6c7a
gpu: nvgpu: vmarea: Fix sparse documentation
...
Sparse mappings are a mechanism to allow oversubscription of the GPU's
accessible memory to a given texture or other buffer object.
Change-Id: I675a73468cc8c1b1e333502be871404a49a025c4
Signed-off-by: Alex Waterman <alexw@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2284837
Reviewed-by: Thomas Fleury <tfleury@nvidia.com >
Reviewed-by: Nicolas Benech <nbenech@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
Scott Long
21f8b366cd
gpu: nvgpu: fix misra 2.5 violations
...
MISRA Advisory Rule 2.5 states that a project should not contain unused
macro declarations.
While most of the violations in the nvgpu driver are due to unused
macros from hw headers, devinit-related headers, etc. there is a small
number that are due to things like:
* macros not being used when they could/should be
* macros in C files that are really not referenced
* CPP build flag mismatches
This change eliminates such violations from the following:
* replace constants with existing macros in timeout conversion code
* wrap nvgpu_gmmu_dbg macro #defines in #ifdef CONFIG_NVGPU_TRACE/#endif
* wrap MAX_MC_INTR_REGS #define in #ifdef CONFIG_NVGPU_NON_FUSA/#endif
* remove unused FECS_MAILBOX_0_ACK_RESTORE from runlist code
* wrap BACKTRACE_MAXSIZE macro with #ifndef _QNX_SOURCE/#endif
Jira NVGPU-3178
Change-Id: I2bc72f706d7af3f8e7b062126e8543d0dc8ac250
Signed-off-by: Scott Long <scottl@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2284419
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: Vedashree Vidwans <vvidwans@nvidia.com >
Reviewed-by: Sagar Kamble <skamble@nvidia.com >
Reviewed-by: Adeel Raza <araza@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
11b34e891f
gpu: nvgpu: Refactor Clk unit.
...
As a part of refactoring, need to move clk sw/pmu setup functions
from pmu_pstate unit to clk unit as it belongs there.
In this patch the public API is moved from pmu_pstate to clk unit and
named according to private/public API.
NVGPU-4491
Change-Id: I90a7dc821e3a3633c7ac657b398f90e374663d61
Signed-off-by: Abdul Salam <absalam@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2282937
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
David Li
273ffae939
gpu: nvgpu: add zcull_ctx_debug and setup_debug_z_gamut_offset to access map
...
-3D API drivers need to write NV_PGRAPH_PRI_GPCS_ZCULL_CTX_DEBUG_ZF32_AS_Z16
and NV_PGRAPH_PRI_GPCS_SETUP_DEBUG_Z_GAMUT_OFFSET_ZF32_AS_Z16 fields
to get ZCULL for ZF32 depth values less than 0.25
-GM20B is already added
bug 2427703
bug 2704313
Change-Id: I07a4d7b3a1e09183c56d4c72533bc5d280bc7782
Signed-off-by: David Li <davli@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2279674
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
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
tkudav
26406a070d
gpu: nvgpu: Hardcode nvlink speed to 20G
...
Xavier Chip Product POR was updated to 20G only. No more qual work
happening for 16G. So we do not plan to support 16G. Now that we have
a single speed left, remove the code added to support nvlink speed from
VBIOS as it is redundant.
JIRA NVGPU-2964
Change-Id: Icd71ebb8271240818e36d40bf73c60f0c5beb6bf
Signed-off-by: tkudav <tkudav@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2284175
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
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
shashank singh
8aac90ce53
gpu: nvgpu: define invalid and no input preemption modes
...
Set preemption mode to MSB set for u32 if application passes mode
outside of the supported ones. Also, define no input preemption mode as
0U.
Jira NVGPU-4378
Change-Id: I574d495920c4438476862ed0850e4e3c8312ef02
Signed-off-by: shashank singh <shashsingh@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2283981
Reviewed-by: Alex Waterman <alexw@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
Prateek sethi
5941bf04a9
gpu: nvgpu: Add fault injection instances for read_loop API
...
Jira NVGPU-2688
Change-Id: I6f3be889e68d1ac8f9ab4cf97fb9f4f186a115c1
Signed-off-by: Prateek sethi <prsethi@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2283970
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com >
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com >
2020-12-15 14:13:28 -06:00
rmylavarapu
7e5b8b2cce
gpu: nvgpu: Refactor PERF unit
...
-Created perf.h file and moved all private functions
and structures into it
-Created single sw_setup/pmu_setup for whole perf
unit
-Changed public function and structure names as per
standard format
-Deleted lpwr unit specific file from make file as
it is no longer used
-Removed support_vfe and support_changeseq flags as
it is no longer used
-Removed clk_set_boot_fll_clks_per_clk_domain function
as it is no longer used for tu10a
-Removed perf unit headers from pmuif folder
NVGPU-4448
Change-Id: Ia29e5b5a1a960b5474a929d8797542bf6c0eccf1
Signed-off-by: rmylavarapu <rmylavarapu@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2283587
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
b21b9bdf5d
gpu: nvgpu: update debug prints in ltc isr
...
It was observed that some of the informational debug prints in the
LTC ISRs were printed through nvgpu_err. They should be instead
printed through nvgpu_log under flag gpu_dbg_intr.
JIRA NVGPU-4830
Change-Id: I04cf4e70a7c810014d8a6ee5e901c2b4cf2c58ac
Signed-off-by: Sagar Kamble <skamble@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2285088
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 >
2020-12-15 14:13:28 -06:00
Philip Elcan
faec22ff7d
gpu: nvgpu: utils: don't log address of unaligned word
...
Remove address from log print in nvgpu_mem_is_word_aligned(). This is to
meet security requirement not to log sensitive information.
JIRA NVGPu-4791
Change-Id: I5a216db9d52eb36acdb8ce3e172b0817d443ebf5
Signed-off-by: Philip Elcan <pelcan@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2284869
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: Thomas Fleury <tfleury@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
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
Petlozu Pravareshwar
2cfdc783e5
gpu: nvgpu: unit: update fault injection handler
...
Update fault injection handling for following mock API:
- NvTegraSysGetChipId()
JIRA NVGPU-3909
Change-Id: Iae39a6315ccfd0bb3e92966205827c493e3c16c4
Signed-off-by: Petlozu Pravareshwar <petlozup@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2283636
Reviewed-by: Automatic_Commit_Validation_User
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
Tested-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
Thomas Fleury
5589e60822
gpu: nvgpu: add doxygen for tsg enable/disable
...
Add doxygen for the following HALs:
- gops_tsg.enable
- gops_tsg.disable
Jira NVGPU-4783
Change-Id: Ibdac39a4fdb6576bde78626118d0f55e5ceb2713
Signed-off-by: Thomas Fleury <tfleury@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2284777
Reviewed-by: Philip Elcan <pelcan@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
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
smadhavan
26ce83862f
gpu: nvgpu: unit: Add ACR DBG/PROD bins.
...
This patch adds acr_ucode_dbg/prod.bin
The two new bin files are copies of the TOT acr_ucode.bin. They will
act as placeholders till acr ucode with UCODE encryption gets production
signed.
This change also adds a check to select ACR ucode based on board type.
Note: This support is added only for t19x.
P4CL 27814148
Bug 2672836
Change-Id: Ib2f9fc2b23a8c50480a07baa130851c94533f345
Signed-off-by: smadhavan <smadhavan@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2270657
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:26 -06:00
smadhavan
2db5c623c4
nvgpu: gpu: adds support for ACR dbg/prod.
...
ACR ucode is encrypted using different keys for prod/dbg boards.
This change adds a check to select ACR ucode based on board type.
Note: This support is added only for t19x.
This patch also enables the prints "DEBUG MODE" indicative of board/
acr_ucode signature type and sctl and cpuctl reg values.
Bug 2350733
Bug 2672832
Bug 2672836
JIRA NVGPU-4001
Change-Id: I936b811b5836152206b11ec615ee75d201939968
Signed-off-by: smadhavan <smadhavan@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2268880
Reviewed-by: Deepak Goyal <dgoyal@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:10:29 -06:00
Thomas Fleury
c5437867f7
gpu: nvgpu: remove ce_app from fusa build
...
Remove ce_app from safety build since it is only used for dGPU.
Jira NVGPU-4783
Change-Id: Ib243d5109d6fc2ff839bb3f8782f2b9abaf41d07
Signed-off-by: Thomas Fleury <tfleury@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2284448
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com >
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com >
2020-12-15 14:10:29 -06:00
shashank singh
105dbab24e
gpu: nvgpu: update description for stall, non-stall counters
...
Update description for stall and non-stall counters which is now having
values 1 on entering the handler and 0 on exiting it. It's corresponding
to https://git-master.nvidia.com/r/c/linux-nvgpu/+/2247819/ change.
Change-Id: I0f94ac68461994557a024c5b2597227b39cfcc69
Signed-off-by: shashank singh <shashsingh@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2283988
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:10:29 -06:00
Thomas Fleury
945de82433
gpu: nvgpu: dump_stack after BUG() callbacks
...
Dump stack after running BUG() callbacks in UT,
so that we do not get a stack dump when
EXPECT_BUG() is used.
Jira NVGPU-4512
Change-Id: I43336508ead7ba540bd79bd3af7e611b7f9c6e8f
Signed-off-by: Thomas Fleury <tfleury@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2283727
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: Philip Elcan <pelcan@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:10:29 -06:00
Divya Singhatwaria
5e1f7475ec
gpu: nvgpu: Add unit test cases to cover pmu hal
...
Add test cases to cover following functions in PMU HAL:
- gv11b_pmu_bar0_error_status()
- gk20a_pmu_isr()
JIRA NVGPU-2192
Change-Id: Icf7f4f35a9365826bb95ca624501eed272b001d8
Signed-off-by: Divya Singhatwaria <dsinghatwari@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2277703
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@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:10:29 -06:00
ajesh
1041167668
gpu: nvgpu: remove usage of __must_check
...
Remove the usage of __must_check compiler directive.
Also rename __user as nvgpu_user and make the required
changes for linux and posix builds.
Jira NVGPU-4903
Change-Id: If4a18761cca84eb12e0babc0d528666673fca9e8
Signed-off-by: ajesh <akv@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2283404
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: 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:10:29 -06:00