Commit Graph

8327 Commits

Author SHA1 Message Date
Antony Clince Alex
78dbec7f44 gpu: nvgpu: tu104: update CAU hal
Update CAU hal tu104_gr_init_cau to use regops.get_cau_register_stride
hal function.

Jira: NVGPU-5689

Change-Id: I7c6e933630587e2d69b92173fd8c3fa8a7021c1d
Signed-off-by: Antony Clince Alex <aalex@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2489388
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>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
GVS: Gerrit_Virtual_Submit
2021-03-23 04:39:14 -07:00
srajum
df6b305399 gpu: nvgpu: allowlist MISRA 10.3 and CERTC INT31-C QNX OS specified violations
JIRA NVGPU-6548

Change-Id: I302070bb42acbf77b6e38490615d39ae9381215f
Signed-off-by: srajum <srajum@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2492668
(cherry picked from commit 80a46f6febcc03bf04e3ceff27952dc7bbfd714d)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2501391
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com>
Reviewed-by: svc-mobile-misra <svc-mobile-misra@nvidia.com>
Reviewed-by: Vaibhav Kachore <vkachore@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
GVS: Gerrit_Virtual_Submit
2021-03-22 06:39:33 -07:00
Vedashree Vidwans
8ebe7ca314 gpu: nvgpu: resolve GCC 9.3 toolchain errors
Using updated GCC 9.3 toolchain results into build failure with string
functions. The updated toolchain requires strncat API to be independent
of source string length.
Update strncat used in nvgpu_worker_init_name to use destination length
only.

Bug 3270814

Change-Id: Ie50a2bed2dc09a5e34d14012e1ba878ef4ff176f
Signed-off-by: Vedashree Vidwans <vvidwans@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2500503
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: Aidan Ha <aha@nvidia.com>
Reviewed-by: Seshendra Gadagottu <sgadagottu@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
2021-03-22 02:23:48 -07:00
Sagar Kamble
ff8fbf1004 Revert "gpu: nvgpu: disable DGPU_THERMAL_ALERT for k5.9 temporarily"
Bug 200669739

This reverts commit d3f5905a0c.

Change-Id: I76a4ca4ec5be316c24410860a722a13383a3cea3
Signed-off-by: Sagar Kamble <skamble@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2501427
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>
2021-03-19 14:37:00 -07:00
shashank singh
46cdc4d5ca gpu: nvgpu: add field in characteristics struct for max gpfifo entries
Expose max gpfifo entries supported by nvgpu-rm. This limit will then be
propagated to application by nvrm_gpu.

Jira NVGPU-5846

Change-Id: Ibbbed9e1929c3bcc4eaaec9636d76e9e115e0c0c
Signed-off-by: shashank singh <shashsingh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2482936
(cherry picked from commit b099a700aa055a5864ddb65cb546c9294c02b2b9)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2497486
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
2021-03-19 10:09:44 -07:00
Divya Singhatwaria
cc34df76f9 gpu: nvgpu: Add support for ELPG_MS feature
- To enable ELPG_MS feature, add identifier for
  MS_LTC engine.
- The identifier is then passed
  as pg_engine_id to enable the MS_LTC engine.
- Add enable flag NVGPU_ELPG_MS_ENABLED for
  enabling/disabling ELPG_MS feature at init.

JIRA NVGPU-6430

Change-Id: Ie1f477918332d85ec98b3bd4d05b8e773d74eab8
Signed-off-by: Divya Singhatwaria <dsinghatwari@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2480750
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: svcacv <svcacv@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>
2021-03-18 15:29:06 -07:00
ajesh
e10f201602 gpu: nvgpu: add checks as part of BVEC analysis
Add checks in common.utils unit as part of BVEC analysis.
The check in enabled.c makes sure that unauthorized memory access
is not performed and string.c is modified with a check to avoid
a possible invocation of BUG.

Jira NVGPU-6268

Change-Id: I672c9c54a2d7b61219dee1b249b9e1345381a965
Signed-off-by: ajesh <akv@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2494951
(cherry picked from commit 464e101b23b0143ff2e26e07659e34d1678dbf9d)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2497647
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: Ankur Kishore <ankkishore@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
GVS: Gerrit_Virtual_Submit
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
2021-03-17 18:23:42 -07:00
ajesh
3c519157f5 gpu: nvgpu: fix CERTC violations in Posix unit
Fix violations of CERT POS54-C in Posix unit. Check the return
status from the function pthread_cond_broadcast.

JIRA NVGPU-6535

Change-Id: I8b7cc04534c856d609b14aef80e87fe1e0884a8e
Signed-off-by: ajesh <akv@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2495485
(cherry picked from commit 778e71defa2c1860f8560e2661a055207486f3c0)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2497641
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: Ankur Kishore <ankkishore@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
GVS: Gerrit_Virtual_Submit
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
2021-03-17 18:23:36 -07:00
scottl
75d98f55d7 gpu: nvgpu: add SUPPORT_MAPPING_MODIFY flags
Add new NVGPU_SUPPORT_MAPPING_MODIFY enable flag that is used to
control the value of the exported NVGPU_GPU_FLAGS_SUPPORT_MAPPING_MODIFY
flag.

These flags are currently only enabled on linux in non-virtualized
environments.

Jira NVGPU-6374

Change-Id: Ia85c353b767b4f7d0aebc04838f44996bc38c61f
Signed-off-by: scottl <scottl@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2490986
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>
2021-03-16 14:07:21 -07:00
Sagar Kadamati
9e13fd900d nvgpu: gpu: update runlist in vserver
On QNX, Setting runlist is not happening till runlist submit. On Linux,
Setting runlist is happening at the time of channel open. due to
implimentations, which effect's channel configuration.

We need runlist for channel configuration from now.

Adding runlist parameter for below calls
 * TEGRA_VGPU_CMD_TSG_BIND_CHANNEL
 * TEGRA_VGPU_CMD_TSG_BIND_CHANNEL_EX

Bug 200701789

Change-Id: Ibd3262b43e38f54c76c4ae67ce683eccf4460cdc
Signed-off-by: Sagar Kadamati <skadamati@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2485256
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: Richard Zhao <rizhao@nvidia.com>
Reviewed-by: Aparna Das <aparnad@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
GVS: Gerrit_Virtual_Submit
2021-03-16 06:07:30 -07:00
Sumit Gupta
e5491327fa gpu: nvgpu: fix mutex wrong acquire
Wrong acquire/release sequence.

 DEBUG_LOCKS_WARN_ON(rt_mutex_owner(lock) != current)
 ....
 CPU: 4 PID: 5404 Comm: cyclictest.sh Not tainted 4.9.201-rt134-tegra #1
 Hardware name: Jetson-AGX (DT)
 ....
 Call trace:
 [<ffffff800810e4f8>] debug_rt_mutex_unlock+0x58/0x68
 [<ffffff8008f34d0c>] rt_mutex_unlock+0x4c/0xb0
 [<ffffff8008f36ea8>] _mutex_unlock+0x20/0x2c
 [<ffffff8000f69d80>] nvgpu_cg_elcg_set_elcg_enabled+0x78/0xf0 [nvgpu]
 [<ffffff8000f7bd44>] nvgpu_intr_nonstall_cb+0x21bc/0x22f0 [nvgpu]
 [<ffffff800875b304>] dev_attr_store+0x44/0x60
 [<ffffff80082dca44>] sysfs_kf_write+0x5c/0x78
 [<ffffff80082dbd28>] kernfs_fop_write+0xc0/0x1d8
 [<ffffff8008245b60>] __vfs_write+0x48/0x128
 [<ffffff8008246b3c>] vfs_write+0xac/0x1b8
 [<ffffff800824808c>] SyS_write+0x5c/0xc8

Bug 3227296

Suggested-by: Bibek Basu <bbasu@nvidia.com>
Signed-off-by: Sumit Gupta <sumitg@nvidia.com>
Change-Id: I932a23700539422c07de045dde516c52dd8348cf
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2472903
(cherry picked from commit 535e9b1dd7)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2487498
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: Bibek Basu <bbasu@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
GVS: Gerrit_Virtual_Submit
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
2021-03-15 14:40:19 -07:00
Antony Clince Alex
7072b39783 gpu: nvgpu: gv11b: update prop hww handling
Update prop hww handling to read and print additional diagnostic
registers.

Generate following registers:
- gr_gpc0_prop_hww_esr_coord_r
- gr_gpc0_prop_hww_esr_format_r
- gr_gpc0_prop_hww_esr_state_r
- gr_gpc0_prop_hww_esr_state2_r
- gr_gpc0_prop_hww_esr_offset_r

Rename following registers and associated fields:
- pes_hww_esr => gpc0_ppc0_pes_hww_esr
- setup_hww_esr = > gpc0_setup_hww_esr
- zcull_hww_esr => gpc0_zcull_hww_esr
- prop_hww_esr => gpc0_prop_hww_esr

Jira NVGPU-6078
Bug 2865015

Change-Id: I131c48d2375ef0a76ac6c57ff1eb019f7c113286
Signed-off-by: Antony Clince Alex <aalex@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2472894
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: Seema Khowala <seemaj@nvidia.com>
Reviewed-by: Vaibhav Kachore <vkachore@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
GVS: Gerrit_Virtual_Submit
2021-03-12 04:38:04 -08:00
Antony Clince Alex
f41e5975d8 gpu: nvgpu: add ioctl to configure l2 max_ways_evict_last
Add ioctl support to configure and read the max number of lines/ways
in a L2 cache set that can be marked as EVICT_LAST. This is accomplished
through two new ltc hals: set_l2_max_ways_evict_last,
get_l2_max_ways_evict_last. These hals will only be set for nvgpu-next
chips. Incase of legacy chips, the IOCTLs will return error -ENOSYS.

Generate following litter constants to get the number of sets in a l2
slice and the number of ways in each set:
- GPU_LIT_NUM_LTC_LTS_SETS
- GPU_LIT_NUM_LTC_LTS_WAYS

Add gpu characteritics flag: NVGPU_L2_MAX_WAYS_EVICT_LAST_ENABLED to
allow userspace driver to determine if L2_MAX_WAYS_EVICT_LAST ioctl is
supported.

Bug 200605474

Change-Id: Id3180f891399f5e128500f3835d762aee59953e0
Signed-off-by: Antony Clince Alex <aalex@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2445884
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
2021-03-12 04:36:22 -08:00
Prateek sethi
fe03443161 gpu: nvgpu: replace hardcoded subscript with macro
size of syncpt_name is hardcoded. Patch replaces hardcoded value with
macro.

Jira NVGPU-6371

Change-Id: I7a025f8f3687e104f61e0305096ac9e48d245a48
Signed-off-by: Prateek sethi <prsethi@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2485732
(cherry picked from commit 6e373be0c5377b7c251787caa79934db9a389e70)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2493073
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: Alex Waterman <alexw@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: Vaibhav Kachore <vkachore@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
GVS: Gerrit_Virtual_Submit
2021-03-09 04:46:44 -08:00
shashank singh
1d86da257b gpu: nvgpu: fix some assertion/nvgpu_safe* APIs call in devctl path
Fix following issues in devctl processing path
- Remove assertion for kind>=0. It is already checked in function
  nvgpu_vm_do_map.
- Check for possible overflow of map_addr and mapping size without using
  nvgpu_safe* API for NVGPU_AS_DEVCTL_MAP_BUFFER_EX and
  NVGPU_AS_DEVCTL_ALLOC_SPACE devctl.

Jira NVGPU-6496

Change-Id: I569c89d50900100f57bc9727fd032d6cd2c331e4
Signed-off-by: shashank singh <shashsingh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2487550
(cherry picked from commit 6d340d7e73ba8e031f50679991d259daa682a006)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2492291
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
2021-03-05 19:39:57 -08:00
shashank singh
b91f57d933 gpu: nvgpu: remove assert in devctl processing path
Asserting in the path of devctl processing is not safe here because
incompr_kind can be passed out of range by a malicious app and it will
cause nvgpu-rm to crash. Instead return error in case of out of range
value.

Jira NVGPU-6496

Change-Id: I9c3264776110f606a67f27ce7b01fdce82aa3021
Signed-off-by: shashank singh <shashsingh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2485752
(cherry picked from commit 689054d65fff2c61b9f1d413eef4a44a5f27fc54)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2492290
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
2021-03-05 19:39:46 -08:00
Vedashree Vidwans
625d942c52 gpu: nvgpu: update gops_fifo.intr_1_isr logic
Update gops_fifo.intr_1_isr to clear interrupt and return
NVGPU_NONSTALL_OPS_WAKEUP_SEMAPHORE only if channel interrupt is pending

Jira NVGPU-6222

Change-Id: I976f8bcf53c7735b154f40bb70b5f401020c8dd4
Signed-off-by: Vedashree Vidwans <vvidwans@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2479250
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com>
Reviewed-by: svc-mobile-cert <svc-mobile-cert@nvidia.com>
Reviewed-by: Seema Khowala <seemaj@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
GVS: Gerrit_Virtual_Submit
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
2021-03-05 01:27:39 -08:00
Vedashree Vidwans
3b6eb25668 gpu: nvgpu: update common.ce doxygen comments
- Update function documentation
- Rename test_setup_env and test_free_env to test_ce_setup_env and
test_ce_free_env respectively. This will make sure that ce test has
independent setup and free functions.
- Add doxygen comments for nonstall workqueue operations in mc.

Jira NVGPU-6249

Signed-off-by: Vedashree Vidwans <vvidwans@nvidia.com>
Change-Id: I451d7b77e9a4f60fa30a9de640d423199c1a206c
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2459666
(cherry picked from commit b367d3d0ea7f92b722aebdc8cf6018979fe74c47)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2480584
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>
2021-03-04 11:04:25 -08:00
Vedashree Vidwans
0477ce539a gpu: nvgpu: add variable range common.mc doxygen
Update common.mc API doxygen comments to add input variable ranges.

Jira NVGPU-6240

Change-Id: I512cf3a6975e745fc28b50048513a1cfe3f0b0ee
Signed-off-by: Vedashree Vidwans <vvidwans@nvidia.com>
(cherry-picked from commit 63c1be64f4d2c07e0b5c447914bc21e827bf6d76)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2482060
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>
2021-03-04 11:04:20 -08:00
Vedashree Vidwans
26fc64fb0b gpu: nvgpu: update common.mc function and docs
- Update documentation for common.mc and gops_mc functions.
- Rename test_setup_env and test_free_env to test_mc_setup_env and
test_mc_free_env respectively. This will make sure that mc test has
independent setup and free functions.
- Add doxygen comments for mc.enable and mc.disable.
- Modify MC unit test description.

Jira NVGPU-6240

Signed-off-by: Vedashree Vidwans <vvidwans@nvidia.com>
Change-Id: I87291ee5f90b8e3c29c475c00a78c7855de5740e
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2457183
(cherry picked from commit c62ff36f87878a8a7513bef06e111117d96c61c8)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2480602
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>
2021-03-04 11:04:15 -08:00
ajesh
d1e836f059 gpu: nvgpu: Fix MISRA violations in Posix
Fix violations of MISRA Rule 21.2 in Posix unit.

JIRA NVGPU-6533

Change-Id: I21bb6c4c18f7a904d639bf210bcd3d29f37d69bd
Signed-off-by: ajesh <akv@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2486766
GVS: Gerrit_Virtual_Submit
(cherry picked from commit 5239352b4acbe29a7cdb39821e68a717b132d2c9)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2491861
Reviewed-by: Alex Waterman <alexw@nvidia.com>
Reviewed-by: Vaibhav Kachore <vkachore@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
2021-03-04 00:37:20 -08:00
ajesh
0030dc3eb4 gpu: nvgpu: fix MISRA violations in Posix unit
Fix violations of MISRA rule 5.4 in Posix unit.

JIRA NVGPU-6534

Change-Id: I9471e5fca913ca8cc19403998fdbe5450fb49879
Signed-off-by: ajesh <akv@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2488184
(cherry picked from commit f9bc21ca8d96e9c531a1b0077cfe1e78502e7ee5)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2491855
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: 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>
2021-03-04 00:37:15 -08:00
Thomas Steinle
1b5a9b28ea gpu: nvgpu: Add gr.ops NULL-ptr check
This fix add NULL-ptr checks for some of the user-accessible
ioctl.

Bug 3240771
Bug 200696704

Change-Id: Ibe7f75b31b2521a530883253a93ba832f010dc80
Signed-off-by: Thomas Steinle <tsteinle@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2483635
(cherry picked from commit cc717e3145)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2490126
Tested-by: Dinesh T <dt@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: Rajesh Devaraj <rdevaraj@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: Vaibhav Kachore <vkachore@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
GVS: Gerrit_Virtual_Submit
2021-03-04 00:36:14 -08:00
Deepak Nibade
53cc5be723 gpu: nvgpu: update doxygen for common.gr unit
Update common.gr doxygen based on review comments from design
verification.
- Add error return values to some APIs.
- Remove redundant description lines from some APIs.

Update gm20b_gr_falcon_status_check_ctx_wait_ucode() to return
actual error codes instead of -1.

Jira NVGPU-6494

Change-Id: Ieb3f5acd27c30cd50049b114ddd8847b1b376ca3
Signed-off-by: Deepak Nibade <dnibade@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2490213
(cherry picked from commit 3694fd1bdd1ac36f8c91b1fbaab47cadd8ba1868)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2490211
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>
2021-03-02 19:34:13 -08:00
Vedashree Vidwans
4cc99d035d gpu: nvgpu: update doxygen for common.fifo
- Add doxygen comments for nvgpu_tsg_open_common().
- Update return and return value description for
1.	nvgpu_fifo_init_support()
2.	nvgpu_fifo_setup_sw()
3.	nvgpu_fifo_setup_sw_common()
4.	nvgpu_channel_init_support()
5.	gops_fifo.reset_enable_hw()
6.	nvgpu_runlist_get_runlists_mask()

Jira NVGPU-6222

Signed-off-by: Vedashree Vidwans <vvidwans@nvidia.com>
Change-Id: I2ef150d41695afca303f1e083f559d31895ba602
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2482062
GVS: Gerrit_Virtual_Submit
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: Alex Waterman <alexw@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
2021-03-02 19:31:37 -08:00
Vedashree Vidwans
f4e750cfb2 gpu: nvgpu: name nvgpu_fifo internal structures
Add names for internal structures in nvgpu_fifo struct. This will clear
"anonymous" struct names from doxygen.

Jira NVGPU-6179

Signed-off-by: Vedashree Vidwans <vvidwans@nvidia.com>
Change-Id: I9c34ff5e0626a3b28febe7d0cfdb297eb6785427
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2467531
(cherry picked from commit 82a6fdd73fbca1e65315a5e13bcd0fd4311da583)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2480573
GVS: Gerrit_Virtual_Submit
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: Alex Waterman <alexw@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
2021-03-02 19:31:32 -08:00
Vedashree Vidwans
4de7b8bbd1 gpu: nvgpu: update doxygen for common.fifo
Modify doxygen comments
- to add more information
- correct spelling mistakes
- update formatting

Jira NVGPU-6179

Signed-off-by: Vedashree Vidwans <vvidwans@nvidia.com>
Change-Id: If0a075b8875c8f5aee1d9710e7348e843a457534
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2467530
(cherry picked from commit b367d3d0ea7f92b722aebdc8cf6018979fe74c47)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2480583
GVS: Gerrit_Virtual_Submit
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: Alex Waterman <alexw@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
2021-03-02 19:31:25 -08:00
Vedashree Vidwans
12bbff3f5a gpu: nvgpu: update doxygen for common.fifo
Update function return and return value description for
nvgpu_channel_open_new and nvgpu_engine_setup_sw as per review comments.

Jira NVGPU-6179

Change-Id: Ie9a9c7c3918f22071173ca8b51dee49f3e405df6
Signed-off-by: Vedashree Vidwans <vvidwans@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2471070
(cherry picked from commit cb8ac4e09f3a4803e967987afa2c55d78235149d)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2480565
GVS: Gerrit_Virtual_Submit
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: Alex Waterman <alexw@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
2021-03-02 19:31:20 -08:00
Deepak Nibade
4ab8c87974 gpu: nvgpu: expose V2 device node hierarchy
Nvgpu will move to new V2 device node hierarchy by default to be
consistent with MIG mode hierarchy. As part of this, expose V2 device
node hierarchy with this patch.

Both legacy and V2 hierarchies will co-exist for some duration until
V2 hierarchy is well tested out, and then legacy hierarchy will be
removed.

With V2 hierarchy, below is the directory structure for dev nodes :
igpu: /dev/nvgpu/igpu0/<dev_node>
dgpu: /dev/nvgpu/dgpu-0001\:01\:00.0/<dev_node>

Jira NVGPU-5648

Change-Id: I1c7a1c41e6d59fb248bc98a145c5ecebd06e8bad
Signed-off-by: Deepak Nibade <dnibade@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2443712
GVS: Gerrit_Virtual_Submit
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: Alex Waterman <alexw@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
2021-03-02 19:30:59 -08:00
Seshendra Gadagottu
ca636eaeb7 gpu: nvgpu: gops: mc: add doxygen for ltc_isr
Add doxygen for mc.ltc_isr, since it is getting called
from fusa code.

Jira NVGPU-6182

Change-Id: I1995cb6a2caef11f0b982b76b5dcd8d809d78a44
Signed-off-by: Seshendra Gadagottu <sgadagottu@nvidia.com>
(cherry picked from commit 8ddc5e9dbbe7d711baafe1e824111010fcc969fb)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2488417
GVS: Gerrit_Virtual_Submit
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: Alex Waterman <alexw@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
2021-03-01 22:15:35 -08:00
Seshendra Gadagottu
d6b49345cd gpu: nvgpu: init: nvgpu_check_gpu_state description update
Update nvgpu_check_gpu_state function description to
reflect it's functionality.

Jira NVGPU-6182

Change-Id: I650098b04e5134cfcada37a99fbe505f3f621855
Signed-off-by: Seshendra Gadagottu <sgadagottu@nvidia.com>
(cherry picked from commit c972d2925bf020270179abc0545335cbdc69113e)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2488415
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: Alex Waterman <alexw@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
GVS: Gerrit_Virtual_Submit
2021-03-01 22:15:29 -08:00
Jon Hunter
42033ac29e gpu: nvgpu: Simplify include path for building as an external module
When building NVGPU, it is necessary to define 'srctree.nvgpu' so that
the NVGPU driver knows where to find its include files. When building as
an in-tree module, the overlay infrastructure defines this and when
building as an out-of-tree module, it is necessary to define this in the
Makefile that is building NVGPU. Given that the NVGPU header are located
in the NVGPU source tree, it is not necessary and simpler if the NVGPU
Makefile defines 'srctree.nvgpu' path if it is not already specified.

Furthermore, when building NVGPU as an external module with support for
the upstream host1x driver enabled, the necessary host1x header file
that is required for building NVGPU is being copied into the build
directory for NVGPU. Rather than copying the header file, it is
preferred that the path for locating the header file is passed to the
NVGPU Makefile. Add support for doing this by adding 'srctree.host1x'
variable that indicates where the host1x header files can be found
when support for the upstream host1x driver is enabled.

Bug 200687525

Change-Id: I36882cdc5ef264fbe50cd5ca4e445077c0a02c34
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2485753
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
2021-03-01 12:45:23 -08:00
ajesh
07cd0697ad gpu: nvgpu: add doxygen update for posix unit
Add range value and other related details for various
Posix functions.

JIRA NVGPU-6285

Change-Id: I2bee40cc81075ef63bdaaf4ea1d955bbeb9dabd3
Signed-off-by: ajesh <akv@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2479890
(cherry picked from commit 0b74c24db8adae83a404aa08b728597b8ca19068)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2486852
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>
2021-02-27 04:19:10 -08:00
Rakesh Babu Bodla
e158e02030 gpu: nvgpu: remove kernel-5.9 checks in Makefile
Remove kernel-5.9 checks in Makefile.linux.configs.

Bug 200617764

Signed-off-by: Rakesh Babu Bodla <rbodla@nvidia.com>
Change-Id: I01490aa2d7217c8e1accf401d78957bf7e64ba59
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2485600
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Bitan Biswas <bbiswas@nvidia.com>
Reviewed-by: Sagar Kamble <skamble@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
2021-02-26 13:38:20 -08:00
Lakshmanan M
1438689a89 gpu: nvgpu: Add api to query the availability of multi GR support
* Added a new api(nvgpu_gr_is_multi_gr_enabled()) to query the
  availability of multi GR support when MIG is enabled.

JIRA NVGPU-5650

Change-Id: I3f8c29db966afb8d72021a093e009492f134ec9d
Signed-off-by: Lakshmanan M <lm@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2488399
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: 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>
GVS: Gerrit_Virtual_Submit
2021-02-25 14:42:22 -08:00
Alex Waterman
5bf229dcd5 gpu: nvgpu: Rename runlist_id to id
Rename the runlist_id field in struct nvgpu_runlist to just id.
The runlist part is redundant given that this id is already in
'struct nvgpu_runlist'.

Change-Id: Ie2ea98f65d75e5e46430734bd7a7f6d6267c7577
Signed-off-by: Alex Waterman <alexw@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2470306
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com>
Reviewed-by: svc-mobile-cert <svc-mobile-cert@nvidia.com>
Reviewed-by: Tejal Kudav <tkudav@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
GVS: Gerrit_Virtual_Submit
2021-02-19 15:16:46 -08:00
Alex Waterman
bd1b395b5c gpu: nvgpu: Update runlist_id in TSG
Update the runlist_id field in struct tsg to now be a pointer to
the relevant runlist. This further cleans up the rampant use of
runlist_ids throughout the driver.

Change-Id: I3dce990f198d534a80caa9ca95982255dcf104ad
Signed-off-by: Alex Waterman <alexw@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2470305
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com>
Reviewed-by: svc-mobile-cert <svc-mobile-cert@nvidia.com>
Reviewed-by: Tejal Kudav <tkudav@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
GVS: Gerrit_Virtual_Submit
2021-02-19 15:16:41 -08:00
Seeta Rama Raju
8d6b654afb gpu: nvgpu: compile out bios dependency from safety build
- bios not supported for safety, so removing all bios dependencies like
  inclusion of bios header file and gops_bios structure from safety build.

JIRA NVGPU-6302

Change-Id: I47c0be043dc2542ed34e5ef6d65b75ce8b57d276
Signed-off-by: Seeta Rama Raju <srajum@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2456059
(cherry picked from commit c7554856aac4745038f8ca802a3e0b3a9cbb7f3c)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2481700
Reviewed-by: Prateek Sethi <prsethi@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
2021-02-19 05:46:32 -08:00
Seshendra Gadagottu
5bd547f0db gpu: nvgpu: bus: update doxygen for BVEC checks
Update doxygen to have boundary value check info in
bus unit.

Jira NVGPU-6183

Change-Id: Idab12a6fdddcef016405e4a0fd9369bc6430cba1
Signed-off-by: Seshendra Gadagottu <sgadagottu@nvidia.com>
(cherry picked from commit 90a3fd422cfeda7305127949e28a16fc096f5e11)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2486001
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
2021-02-18 23:44:35 -08:00
Seshendra Gadagottu
c021b18fb1 gpu: nvgpu: fb: update doxygen for BVEC checks
Update doxygen to have boundary value check info for
input params in common.fb.

Jira NVGPU-6183

Change-Id: Ic07a7688c457c68ba7e9ef96ca8b3bf4145b8236
Signed-off-by: Seshendra Gadagottu <sgadagottu@nvidia.com>
(cherry picked from commit 84f7954eaf499f38af8590a4a1309e0c1f7448bf)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2485995
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
2021-02-18 23:44:26 -08:00
Seshendra Gadagottu
f5b6c012cb gpu: nvgpu: therm: update doxygen for BVEC checks
Update doxygen to have boundary value check info for
init_elcg_mode HAL.

Jira NVGPU-6183

Change-Id: Id0ebb8076a8a65319e40129308ded6ef6466c647
Signed-off-by: Seshendra Gadagottu <sgadagottu@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2481046
(cherry picked from commit 89564f5d7f5371c35734c0eec5ad70edd71e3c17)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2483098
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
2021-02-18 23:43:26 -08:00
Lakshmanan M
edf03baedd gpu: nvgpu: Enable SCG flag
* Enabled NVGPU_SUPPORT_SCG for tu104.
* Enabled NVGPU_SUPPORT_SCG if graphics support is enabled.

JIRA NVGPU-6532

Change-Id: I22175de6906a496127fef464f70a6521b2ad2ad2
Signed-off-by: Lakshmanan M <lm@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2485632
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: Sagar Kamble <skamble@nvidia.com>
Reviewed-by: Rajesh Devaraj <rdevaraj@nvidia.com>
Reviewed-by: Dinesh T <dt@nvidia.com>
Reviewed-by: Ankur Kishore <ankkishore@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
GVS: Gerrit_Virtual_Submit
2021-02-18 17:32:35 -08:00
shashank singh
019641e88c gpu: nvgpu: limit number of gpfifo entries
Limit number of gpfifo entries so that the size of gpfifo i.e.
num_entries * size of each entry fits in u32 data type.

Jira NVGPU-5846

Change-Id: I4d3560a6ed90044c88ee3a7acd2e6cb0591b7c5e
Signed-off-by: shashank singh <shashsingh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2474118
(cherry picked from commit 02ab9e163f5b413b6eb9817ab8ac5581ce7ef427)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2483947
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: Dinesh T <dt@nvidia.com>
Reviewed-by: Ankur Kishore <ankkishore@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
GVS: Gerrit_Virtual_Submit
2021-02-18 17:29:17 -08:00
prsethi
ed739cdba1 gpu: nvgpu: update doxygen for clock unit
Patch adds doxygen for get_maxrate

Jira NVGPU-6258

Change-Id: I7697134ca693bc14562c53b88e9aa2d44e871c9f
Signed-off-by: prsethi <prsethi@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2480512
(cherry picked from commit 610d52755f69cf74f74c1cb8e04985184f7f842c)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2483391
Reviewed-by: Alex Waterman <alexw@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
2021-02-17 11:12:27 -08:00
prsethi
8d55f14fc9 gpu: nvgpu: doxygen update for unit os_utils
Add range value details for various os_utils functions.

Jira NVGPU-6258

Change-Id: Ib930a24d2a4b8e98520d87fcc2f48bef81d26fbd
Signed-off-by: prsethi <prsethi@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2480205
(cherry picked from commit 210e1dd5360d29cad1a432e8de48669d51de134c)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2483388
Reviewed-by: Alex Waterman <alexw@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
2021-02-17 11:12:19 -08:00
Antony Clince Alex
bc0e81adda gpu: nvgpu: skip setting error notifier during deferred reset
Skip setting error notifier on MMUFAULT when a debugger is connected and
debugging is enabled(mmu_debug_mode=on). At present, error notifier causes
the application to teardown the channels and debugger will not be able to
collect any data.

Bug 200632771

Change-Id: Iec2ee07d7a923b2c79197c4c3a7b312d4db797b8
Signed-off-by: Antony Clince Alex <aalex@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2479825
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: Alex Waterman <alexw@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
GVS: Gerrit_Virtual_Submit
2021-02-06 05:20:49 -08:00
prsethi
09fb445878 gpu: nvgpu: remove ipa to pa conversion WAR
WAR assume 1:1 IPA to PA mapping when hyp_read_ipa_pa_info fails for
the syncpt address which falls into syncpt shim aperture. API
nvgpu_mem_phys_sgl_ipa_to_pa() is taking care of IPA to PA mapping for
the syncpts which makes this WAR invalid.

Patch removes the WAR.

Bug 200673604

Change-Id: I966711e11c2ff1b5b5dd3f5e09674bea66c5d04b
Signed-off-by: prsethi <prsethi@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2478068
Reviewed-by: Automatic_Commit_Validation_User
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>
2021-02-03 13:54:45 -08:00
Deepak Nibade
a1cbe60bc0 gpu: nvgpu: fix common.gr doxygen typos
Jira NVGPU-6180

Change-Id: I499634aa407404474a6d3d7d3dfc6271eda21007
Signed-off-by: Deepak Nibade <dnibade@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2473441
(cherry picked from commit bdfb68b965b76b216e3a9782ef7f0d1f6cda2df0)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2478885
Reviewed-by: Automatic_Commit_Validation_User
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>
2021-02-02 23:34:32 -08:00
Deepak Nibade
bb43f11a61 gpu: nvgpu: update common.gr doxygen
Add below updates to common.gr doxygen:

- Add doxygen comments for APIs that are mentioned in RM SWAD and in
  RM-common.gr traceability document.
- Comment about valid ranges for input parameters of bunch of functions.
- Add nvgpu_assert() to ensure correct value is passed as input
  parameter to number of functions.
- Add references to relevant functions with @see.
- Update Targets field for unit tests to cover newly doxygenated
  functions.
- Update unit test test_gr_init_hal_pd_skip_table_gpc to take care of
  new asserts added into some APIs.

Jira NVGPU-6180

Change-Id: Ie889bed96b6428b1fd86dcf30b322944464e9d12
Signed-off-by: Deepak Nibade <dnibade@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2469397
(cherry picked from commit 5d7d7e9ce1c4efe836ab842d7962a3aee4e8972f)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2469394
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>
2021-02-02 23:34:27 -08:00
Deepak Nibade
27b321e1a9 gpu: nvgpu: fix header guards in common.gr unit
Fix header guard names as per convention for below common.gr headers :
common/gr/gr_falcon_priv.h
common/gr/zbc_priv.h
include/nvgpu/gr/ctx.h

Jira NVGPU-5005

Change-Id: I68947ea3e8f4ddbcd43be8d8717eb8ddcc6f5bcb
Signed-off-by: Deepak Nibade <dnibade@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2470072
(cherry picked from commit eb044acbafc6d9f735e066d9c7497156f1df13c7)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2478884
Reviewed-by: Automatic_Commit_Validation_User
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>
2021-02-02 23:34:21 -08:00