Laxman Dewangan
44827be1e4
gpu: nvgpu: Remove dependency of gpu next
...
Remove dependency of GPU next repo as this
is not used from release perspective of the
nvgpu.
Bug 4170369
Change-Id: I4959948e8f6e966eccc4bd369d5b7348bfb1b739
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2929688
Reviewed-by: svcacv <svcacv@nvidia.com >
Reviewed-by: Sagar Kamble <skamble@nvidia.com >
Reviewed-by: Jonathan Hunter <jonathanh@nvidia.com >
2023-07-03 08:26:29 -07:00
Prathap Kumar Valsan
321145b37e
gpu: nvgpu: Enable raw mode for compression
...
In raw addressing mode of CBC backing storage, comptaglines are not
required to be allocated or need to programmed in the ptes. Introduce a
flag to detect if the hardware supports raw mode and use that to skip
all the comptagline allocations and respective page table programming.
JIRA NVGPU-9717
Change-Id: I0a16881fc3e897c3c408b30d1835f30564649dad
Signed-off-by: Prathap Kumar Valsan <prathapk@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2908278
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com >
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com >
2023-06-13 00:19:33 -07:00
Dinesh T
c8ceef2d08
gpu: nvgpu: Enable GPU MMIO path
...
This is adding support for work submit through
GPU mmio for gpu-next.
Bug 3938139
Change-Id: I69c6b2865e5264e485d8ecec4239c759abdd63d5
Signed-off-by: Dinesh T <dt@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2903841
Tested-by: Martin Radev <mradev@nvidia.com >
Reviewed-by: Martin Radev <mradev@nvidia.com >
Reviewed-by: Vaibhav Kachore <vkachore@nvidia.com >
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com >
2023-06-10 19:36:06 -07:00
Dinesh T
7dbd29ceb6
gpu: nvgpu: Add magic value for zero data methods
...
This is adding a magic value to the data input for
the methods which do not require any data input.
This is applicable for GA10B.
Bug 3634227
Change-Id: I95f56413552c9a37b67d0833ff61428a798a8a10
Signed-off-by: Dinesh T <dt@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2852602
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com >
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com >
2023-06-09 05:28:12 -07:00
Martin Radev
7d02506275
gpu: nvgpu: update the PMA uapi to have channel id
...
This patch augments the PMA uapi to have the PMA channel
id:
- PMA_STREAM_ALLOC returns a pma channel id to the client.
- PMA_STREAM_FREE and PMA_STREAM_UPDATE_GET_PUT take a
pma channel id.
Bug 3944943
Change-Id: I22adfe13d2b693bb952f6c456f23534e86a63ef3
Signed-off-by: Martin Radev <mradev@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2915485
Reviewed-by: Ramalingam C <ramalingamc@nvidia.com >
Reviewed-by: Vijayakumar Subbu <vsubbu@nvidia.com >
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com >
2023-06-08 18:40:06 -07:00
Martin Radev
a55491015c
gpu: nvgpu: exit early in cbc debugfs under hv
...
This patch updates the logic for the cbc debugfs node
to fail early if running under HV. The reason is that
the CBC region is maintained by HV and cannot be accessed
by nvgpu.
This avoids a subsequent null-ptr deref for Linux + HV.
Bug 4131079
Change-Id: I1ac1919efc1c05fb679f19a189184ca00908856f
Signed-off-by: Martin Radev <mradev@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2913160
Reviewed-by: Sagar Kamble <skamble@nvidia.com >
Reviewed-by: Ankur Kishore <ankkishore@nvidia.com >
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com >
Reviewed-by: svc-mobile-cert <svc-mobile-cert@nvidia.com >
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com >
2023-06-08 18:32:06 -07:00
Divya
943eb77b20
gpu: nvgpu: add pmu HALs
...
Add following PMU Hals:
- get_pmu_msgq_head
- set_pmu_msgq_head
- set_pmu_new_instblk
JIRA NVGPU-9758
Change-Id: Iba1e37a299309e0e31970a8fbdf248d662bd759b
Signed-off-by: Divya <dsinghatwari@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2906872
Reviewed-by: svcacv <svcacv@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: Rajesh Devaraj <rdevaraj@nvidia.com >
Reviewed-by: Mahantesh Kumbar <mkumbar@nvidia.com >
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com >
2023-06-08 10:49:35 -07:00
Ramalingam C
ad320f60b9
gpu: nvgpu: sema based gpfifo submission tracking
...
Implement a hw semaphore which is used to track the gpfifo submission.
This is implementation used when the userd.gp_get() is not defined and
also the feature flag NVGPU_SUPPORT_SEMA_BASED_GPFIFO_GET is set.
At the end of each job submitted, submit a semaphore to write the
gpfifo get pointer at hw semaphore addr. At next job submission
processing we will read the gpfifo.get from the designated hw semaphore
location.
JIRA NVGPU-9588
Change-Id: Ic88ace1a3f60e3f38f159e1861464ebcaea04469
Signed-off-by: Ramalingam C <ramalingamc@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2898143
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com >
Reviewed-by: Sagar Kamble <skamble@nvidia.com >
Reviewed-by: Martin Radev <mradev@nvidia.com >
Reviewed-by: Ankur Kishore <ankkishore@nvidia.com >
Tested-by: Martin Radev <mradev@nvidia.com >
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com >
2023-06-08 10:44:37 -07:00
Ramalingam C
32f6f9c5d0
gpu: nvgpu: Init sema pool for sema gpfifo tracking
...
Initialize sema pool for the vm, when
NVGPU_SUPPORT_SEMA_BASED_GPFIFO_GET is set
JIRA NVGPU-9588
Change-Id: I3f21a09b9e4af3d1cca16a97d7c94bee605e3ed6
Signed-off-by: Ramalingam C <ramalingamc@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2898142
Reviewed-by: Martin Radev <mradev@nvidia.com >
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com >
Reviewed-by: svc-mobile-cert <svc-mobile-cert@nvidia.com >
Reviewed-by: Vijayakumar Subbu <vsubbu@nvidia.com >
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com >
2023-06-08 10:44:31 -07:00
Ramalingam C
4e28efec1a
gpu: nvgpu: flag for sema based kmd submit job tracking
...
Define a feature flag which can be set to enable the semaphore based job
submission tracking at kernel submit.
JIRA NVGPU-9588
Change-Id: I889bcf09f53f83428dc9dcd193dd7ba250573364
Signed-off-by: Ramalingam C <ramalingamc@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2898141
Reviewed-by: Martin Radev <mradev@nvidia.com >
Reviewed-by: Vijayakumar Subbu <vsubbu@nvidia.com >
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com >
2023-06-08 10:44:26 -07:00
Ramalingam C
e46c1d2e10
gpu: nvgpu: func to set a value at hw semaphore addr
...
Add a function to set a value to the hw_sema addr offset.
This will be used by the semaphore based gpfifo tracking.
JIRA NVGPU-9588
Change-Id: I719196907b86723d22c0cda49b0612f0810ec9ef
Signed-off-by: Ramalingam C <ramalingamc@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2898140
Reviewed-by: Martin Radev <mradev@nvidia.com >
Reviewed-by: Vijayakumar Subbu <vsubbu@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 >
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com >
2023-06-08 10:44:21 -07:00
Santosh BS
be5312cb9b
gpu: nvgpu: falcon2/riscv update for multimedia
...
- Define falcon ID for OFA and NVJPG
- Initialize falcon sw for OFA and NVJPG
- Program boot_vector before riscv kick-start
Jira NVGPU-9429
Bug 3962979
Change-Id: If6e63cb1e99ada3742b708bb0f8f7edc64366318
Signed-off-by: Santosh BS <santoshb@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2913882
Reviewed-by: svcacv <svcacv@nvidia.com >
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com >
Reviewed-by: Mahantesh Kumbar <mkumbar@nvidia.com >
Reviewed-by: Rajesh Devaraj <rdevaraj@nvidia.com >
Reviewed-by: svc-mobile-cert <svc-mobile-cert@nvidia.com >
Reviewed-by: Vijayakumar Subbu <vsubbu@nvidia.com >
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com >
2023-06-07 22:09:04 -07:00
Divya
912cb15999
gpu: nvgpu: add pmu hals
...
Add following PMU hals:
- pmu_get_mutex_reg
- pmu_set_mutex_reg
- pmu_get_mutex_id
- pmu_get_mutex_id_release
- pmu_set_mutex_id_release
JIRA NVGPU-9758
Change-Id: Ic73ad8a9e07defadeb49a2ca3440fe000203a42f
Signed-off-by: Divya <dsinghatwari@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2904414
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com >
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com >
2023-05-31 18:43:04 -07:00
Martin Radev
a67ac8bac9
gpu: nvgpu: update logical and physical gpc map doc
...
This patch fixes the documentation for logical and physical
gpc map. The earlier version incorrectly documents the
expected buffer size.
Bug 3944943
Change-Id: I5c3921dea58732407737cebfa8697fc7010b5b95
Signed-off-by: Martin Radev <mradev@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2912376
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com >
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com >
2023-05-31 01:52:17 -07:00
Rajesh Devaraj
f1613a300b
gpu: nvgpu: add get_cbm_alpha_cb_size hal
...
Add get_cbm_alpha_cb_size hal to avoid duplication of code to new chips.
Bug 4134898
Change-Id: I59fe7065b142b3296bfa3b20cb3198ac1ec859ce
Signed-off-by: Rajesh Devaraj <rdevaraj@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2911335
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com >
Reviewed-by: svcacv <svcacv@nvidia.com >
Reviewed-by: Ramalingam C <ramalingamc@nvidia.com >
Reviewed-by: Martin Radev <mradev@nvidia.com >
Reviewed-by: svc-mobile-cert <svc-mobile-cert@nvidia.com >
Reviewed-by: Vijayakumar Subbu <vsubbu@nvidia.com >
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com >
2023-05-31 01:51:34 -07:00
Martin Radev
78bef566dd
gpu: nvgpu: Expose more config info for SM
...
This patch exposes the following fields to userspace for
each SM, indexed by its global SM index:
- Logical GPC index
- Virtual GPC index
- Local Logical TPC index
- Global Logical TPC index
- Migratable TPC index
- Local SM index
Bug 4115114
Change-Id: Ie596c8f617d46d7b6f1563f7afb210b59f250f3c
Signed-off-by: Martin Radev <mradev@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2909784
Reviewed-by: Rajesh Devaraj <rdevaraj@nvidia.com >
Reviewed-by: Ankur Kishore <ankkishore@nvidia.com >
Reviewed-by: Vijayakumar Subbu <vsubbu@nvidia.com >
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com >
2023-05-31 01:49:38 -07:00
shaochunk
d6359b5adc
gpu: nvgpu: specify devfreq timer through dt
...
Originally,
nvgpu uses deferrable timer for devfreq polling by default,
this leads to issues below because of unstable polling interval.
- out of time frequency scaling
- unstable GPU frequency scaling
This change lets users be able to specify devfreq timer through dt.
If the dt node 'devfreq-timer' equals to 'delayed', then gpu will uses
delayed timer for devfreq polling.
Bug 3823798
Change-Id: Idc0849b4a6b8af52fda8e88f5c831f183b7a27de
Signed-off-by: shaochunk <shaochunk@nvidia.com >
(cherry picked from commit c655a5e058 )
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2908703
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com >
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com >
2023-05-30 12:16:20 -07:00
Sagar Kamble
878182c1d5
gpu: nvgpu: disable nvgpu rpm if genpd support is not available
...
GPU is set to always ON state on safety L4T for SMCU to not fault.
However, nvgpu railgating was always enabled. This will lead to
improper GPU railgate/unrailgate sequence as bpmp will not
powergate/ungate the gpu on suspend and resume requests.
Keeping rpm enabled can lead to ACR failure on resume as it expects
the GPU to be reset on every resume.
Disable nvgpu runtime PM when the power domain node for the gpu is
not defined.
Bug 4111746
Change-Id: I9215ea87dbfbf53360003cac5f8a51d39982ace9
Signed-off-by: Sagar Kamble <skamble@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2904335
(cherry picked from commit c066401be7 )
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2908071
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com >
Reviewed-by: svc-mobile-cert <svc-mobile-cert@nvidia.com >
Reviewed-by: Mahantesh Kumbar <mkumbar@nvidia.com >
Reviewed-by: Ankur Kishore <ankkishore@nvidia.com >
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com >
2023-05-30 05:19:38 -07:00
Santosh BS
3407c01357
gpu: nvgpu: gops declaration for multimedia engines
...
- gops struct declaration for nvenc, ofa, nvdec and nvjpg
- minor refactoring with struct nvgpu_nvenc
Jira NVGPU-9429
Bug 3962979
Change-Id: I888c6bd571554f18f2e9ca2adfaaacd1a8286ed0
Signed-off-by: Santosh BS <santoshb@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2908521
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com >
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com >
2023-05-29 04:01:46 -07:00
Dinesh T
8bae56a075
gpu: nvgpu: Disabling Global context buffers commit for Compute engine
...
Global context buffers are to be mapped and committed only
for engine supporting gfx. With MIG, all engines support
compute only hence skip that.
Bug 4016530
Change-Id: I9f9a01070776f5fa1b18287e62a3080a42c21c60
Signed-off-by: Dinesh T <dt@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2900314
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com >
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com >
2023-05-26 12:34:33 -07:00
Martin Radev
9487599da1
gpu: nvgpu: update SETUP_BIND uapi
...
This patch updates the SETUP_BIND uapi for conditionally
exposing the GPFIFO, UserD and Usermode MMIO GPU VAs to
userspace.
Bug 3938139
Change-Id: Ifa42d592d5224de075c8c9640dd67cab398a9786
Signed-off-by: Martin Radev <mradev@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2908614
Reviewed-by: Dinesh T <dt@nvidia.com >
Reviewed-by: Ankur Kishore <ankkishore@nvidia.com >
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com >
2023-05-25 20:20:51 -07:00
Santosh BS
a062676e71
gpu: nvgpu: log mask for multimedia engines
...
Introducing gpu_dbg_mme for multimedia debug prints.
Jira NVGPU-9429
Bug 3962979
Change-Id: I9c84c9336a10af864f61d314dc811d038d1d2d87
Signed-off-by: Santosh BS <santoshb@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2908237
Reviewed-by: svcacv <svcacv@nvidia.com >
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com >
Reviewed-by: Mahantesh Kumbar <mkumbar@nvidia.com >
Reviewed-by: svc-mobile-cert <svc-mobile-cert@nvidia.com >
Reviewed-by: Rajesh Devaraj <rdevaraj@nvidia.com >
Reviewed-by: Ankur Kishore <ankkishore@nvidia.com >
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com >
2023-05-25 09:22:05 -07:00
srajum
3207a29fd7
gpu: nvgpu: enable run time log mask for safety debug and standard debug builds
...
- Enable /dev/nvgpu/igpu0/log_mask node on safey debug and standard
debug builds which will help to enable log mask in run time.
- Enabled "CONFIG_NVGPU_SYSFS" flag for release and safety debug
builds which will build sysfs files to enable
/dev/nvgpu/igpu0/log_mask node for these builds
- Created "standard_debug" profile which is used to enable
/dev/nvgpu/igpu0/log_mask node only for standard debug builds
Bug 3958585
Change-Id: Id35cd617550974ee805c83e026e2bb5f3be768c6
Signed-off-by: srajum <srajum@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2903881
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com >
Reviewed-by: svc-mobile-misra <svc-mobile-misra@nvidia.com >
Reviewed-by: Prateek Sethi <prsethi@nvidia.com >
Reviewed-by: Vaibhav Kachore <vkachore@nvidia.com >
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com >
2023-05-24 08:53:56 -07:00
atanand
4b2e1b4a38
gpu: nvgpu: Print PC and ESR for GR errors when fault occurs
...
Added print for PC, WARP and GLOBAL ESR when the fault occurs.
Bug 3973433
Change-Id: I8ec1d2aa16125d1628ca7321629b9f771322268a
Signed-off-by: atanand <atanand@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2900112
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 >
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com >
2023-05-22 19:15:08 -07:00
Rajesh Devaraj
36fcd45ca4
userspace: disable unit test for gr_config err injection
...
This patch disables test_gr_config_error_injection
JIRA NVGPU-9897
Change-Id: I771598687f4a1efc9a9a4229dbfd5524c5b6732f
Signed-off-by: Rajesh Devaraj <rdevaraj@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2900702
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com >
Reviewed-by: svc-mobile-misra <svc-mobile-misra@nvidia.com >
Reviewed-by: V M S Seeta Rama Raju Mudundi <srajum@nvidia.com >
Reviewed-by: Ankur Kishore <ankkishore@nvidia.com >
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com >
2023-05-22 13:16:51 -07:00
Rajesh Devaraj
ce22f1efb1
gpu: nvgpu: add functions to query vgpc config
...
This patch adds the following functions which can be used to set/query
skyline configuration:
nvgpu_gr_config_set_singleton_mask
nvgpu_gr_config_get_singleton_mask
nvgpu_gr_config_set_num_singletons
nvgpu_gr_config_get_num_singletons
nvgpu_gr_config_set_num_tpc_in_skyline
nvgpu_gr_config_get_num_tpc_in_skyline
nvgpu_gr_config_set_gpc_skyline
nvgpu_gr_config_get_gpc_skyline
nvgpu_gr_config_set_virtual_gpc_id
nvgpu_gr_config_get_virtual_gpc_id
nvgpu_gr_config_set_sm_info_virtual_gpc_index
nvgpu_gr_config_get_sm_info_virtual_gpc_index
JIRA NVGPU-9897
Change-Id: If80e19f709472d74b42cb9c4b47dc4ce4f9a54dc
Signed-off-by: Rajesh Devaraj <rdevaraj@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2888783
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com >
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com >
2023-05-22 13:16:41 -07:00
Sagar Kamble
278f87e0ce
gpu: nvgpu: unregister reboot notifier for pci driver
...
Below oops is encountered as reboot notifier was not unregistered on
nvgpu unload. On registering new reboot notifier on reload of the
nvgpu module, kernel is not able to access prior freed notifier
buffer. Reboot notifier unregistration was not present in
nvgpu_pci_remove. Add it.
Unable to handle kernel paging request at virtual address
Internal error: Oops: 96000004 [#1 ] PREEMPT SMP^M
CPU: 0 PID: 997 Comm: modprobe Tainted: G W 5.10.152-tegra #2^M
pstate: a2400009 (NzCv daif +PAN -UAO +TCO BTYPE=--)^M
pc : blocking_notifier_chain_register+0x50/0xf0^M
lr : blocking_notifier_chain_register+0x3c/0xf0^M
blocking_notifier_chain_register+0x50/0xf0^M
register_reboot_notifier+0x2c/0x40^M
nvgpu_pci_shutdown+0xaac/0x1b00 [nvgpu]^M
pci_device_probe+0xf8/0x1f0^M
really_probe+0x104/0x510^M
driver_probe_device+0x108/0x190^M
device_driver_attach+0x80/0x90^M
__driver_attach+0xfc/0x1e0^M
bus_for_each_dev+0x84/0x100^M
driver_attach+0x34/0x50^M
bus_add_driver+0x15c/0x260^M
driver_register+0x68/0x130^M
__pci_register_driver+0x78/0x90^M
nvgpu_pci_init+0x3c/0x74 [nvgpu]^M
init_module+0x18/0xe9c [nvgpu]^M
do_one_initcall+0x50/0x310^M
do_init_module+0x50/0x200^M
load_module+0x22dc/0x2800^M
Bug 3495440
Change-Id: I4367352c57d4858ee0b8dda7d1181c9d01632791
Signed-off-by: Sagar Kamble <skamble@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2907442
Reviewed-by: Rajesh Devaraj <rdevaraj@nvidia.com >
Reviewed-by: Ramalingam C <ramalingamc@nvidia.com >
Reviewed-by: Ankur Kishore <ankkishore@nvidia.com >
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com >
2023-05-22 02:03:41 -07:00
prsethi
6f4b7d5cc2
gpu: nvgpu: fix the memory corruption issue
...
Memory for tpc_index in gpc_tpc_physical_id_map array is allocated only
for number of tpcs while it should be number of tpcs*size of index.
Change fixes the memory allocation to avoid memory corruption.
Bug 3994374
Change-Id: Ibc593b1d0baba980787ae50f02ea20072525888c
Signed-off-by: prsethi <prsethi@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2906890
Reviewed-by: svcacv <svcacv@nvidia.com >
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com >
Reviewed-by: svc-mobile-cert <svc-mobile-cert@nvidia.com >
Reviewed-by: Dinesh T <dt@nvidia.com >
Reviewed-by: Kishan Palankar <kpalankar@nvidia.com >
Reviewed-by: Vaibhav Kachore <vkachore@nvidia.com >
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com >
2023-05-20 07:32:57 -07:00
Santosh BS
54b01e881b
gpu: nvgpu: multimedia engine enumeration changes
...
- Changes to fetch and expose supported multimedia engines to umd
- Unit and litter defines for multimedia engines
- Add functions to get runlist id
Jira NVGPU-9429
Bug 3962979
Signed-off-by: Santosh BS <santoshb@nvidia.com >
Change-Id: I072b4aac803c4a70d3659857cb0d804755c5dbd7
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2900765
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: Rajesh Devaraj <rdevaraj@nvidia.com >
Reviewed-by: V M S Seeta Rama Raju Mudundi <srajum@nvidia.com >
Reviewed-by: Vijayakumar Subbu <vsubbu@nvidia.com >
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com >
2023-05-18 23:40:19 -07:00
Divya
ef1fb41e54
gpu: nvgpu: add pmu hals to resolve mismatch
...
Add the following HALs to avoid the duplication
of code for future chips:
- set_mailbox1
- get_ecc_address
- get_ecc_status
- set_ecc_status
JIRA NVGPU-9758
Change-Id: I54ce3dfaae2873dbcd88edabbd877eca9f3d1fdb
Signed-off-by: Divya <dsinghatwari@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2898016
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com >
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com >
2023-05-16 06:27:08 -07:00
prsethi
24a533c9dc
nvgpu: print the caller name with quiesce
...
Currently quiesce method does not print the caller name which makes it
difficult to find the reason behind the issue.
Change prints caller name and invocation line number.
Bug 4098984
Change-Id: I34a0f557c411f997022668e187060c1c1247b15f
Signed-off-by: prsethi <prsethi@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2900585
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com >
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com >
2023-05-15 15:54:43 -07:00
Martin Radev
d70c9a708b
gpu: nvgpu: expose local-to-logical/physical GPC mappings
...
Expose the local-to-logical/physical GPC mappings for
devtools needs.
Bug 3944943
Change-Id: I2aa69ccef19627d41f3e2b8dcc9235401ae1f782
Signed-off-by: Martin Radev <mradev@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2900289
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com >
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com >
2023-05-15 06:08:33 -07:00
Austin Tajiri
7522c3ee31
gpu: nvgpu: skip security check in ctxsw init
...
Force ctxsw ucode to skip the security level check by clearing mailbox 1
before starting FECS/GPCCS.
Jira NVGPU-9217
Change-Id: Id4286d0882a29a849128e62c5421c8ae6071e3b1
Signed-off-by: Austin Tajiri <atajiri@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2891013
Reviewed-by: svcacv <svcacv@nvidia.com >
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: Vaibhav Kachore <vkachore@nvidia.com >
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com >
2023-05-15 06:07:23 -07:00
Austin Tajiri
7e0351f291
gpu: nvgpu: retry MMU fault buffer read
...
When handling MMU faults, retry the first MMU fault buffer read multiple
times until it contains valid data. There may be a delay between the MMU
fault interrupt triggering and the fault buffer containing valid data.
Jira NVGPU-9217
Change-Id: I06b442acaf54a4e036795de65345b423f9b424bf
Signed-off-by: Austin Tajiri <atajiri@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2881909
Reviewed-by: Rajesh Devaraj <rdevaraj@nvidia.com >
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com >
Reviewed-by: svc-mobile-cert <svc-mobile-cert@nvidia.com >
Reviewed-by: Vaibhav Kachore <vkachore@nvidia.com >
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com >
2023-05-15 06:07:18 -07:00
Rajesh Devaraj
a321679a5d
gpu: nvgpu: add is_gsp_supported flag
...
This patch adds is_gsp_supported flag and initializes it for GA10B,
TU104. Further, this flag is checked before initializaing GSP LITE
falcon.
JIRA NVGPU-9983
Change-Id: If0a4a3095c15cac113895f3d114e731f35211c5d
Signed-off-by: Rajesh Devaraj <rdevaraj@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2902651
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: Lakshmanan M <lm@nvidia.com >
Reviewed-by: Vijayakumar Subbu <vsubbu@nvidia.com >
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com >
2023-05-15 01:19:26 -07:00
Martin Radev
789ebda23d
nvgpu: Expose HES PM resource
...
This patch adds the HES profiling resource.
Bug 3944963
Change-Id: Ie7ea4d060cfdc6803262166c1c89d0c2d155c9e3
Signed-off-by: Martin Radev <mradev@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2901996
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com >
Reviewed-by: Kishan Palankar <kpalankar@nvidia.com >
Reviewed-by: Vijayakumar Subbu <vsubbu@nvidia.com >
2023-05-12 20:58:19 -07:00
Martin Radev
cad414d310
gpu: nvgpu: Expose NUMA domain id
...
This patch exposes the NUMA domain id for the
Linux device to userspace. This information is
necessary for userspace to make better utilization
of physical memory allocation and CPU scheduling.
Bug 3972227
Change-Id: I9ad0369076d22531e154074d616e5a23e374a7e9
Signed-off-by: Martin Radev <mradev@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2897294
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com >
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com >
2023-05-10 06:29:32 -07:00
srajum
80a21343a0
userspace: Enable unit tests on l4t for GA10B
...
JIRA NVGPU-9909
Change-Id: I4917384b855ebfe6e3c428f0a268ad09a6bfb573
Signed-off-by: srajum <srajum@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2892996
Reviewed-by: svcacv <svcacv@nvidia.com >
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com >
Reviewed-by: svc-mobile-misra <svc-mobile-misra@nvidia.com >
Reviewed-by: Sagar Kamble <skamble@nvidia.com >
Reviewed-by: Vaibhav Kachore <vkachore@nvidia.com >
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com >
2023-05-09 22:27:09 -07:00
mpoojary
a9b995bc3f
gpu: nvgpu: Copy correct struct from RPC payload for pmu acr
...
Size of nv_pmu_rpc_struct_acr_bootstrap_gr_falcons is copied from the
RPC payload for pmu acr instead of nv_pmu_rpc_header in pmu rpc handler.
This causes KSAN slab out-of-bounds error.
Bug 3727012
Change-Id: I633dac9167f9ed896dba956dc56e4081aaab6465
Signed-off-by: mpoojary <mpoojary@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2891392
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: Mahantesh Kumbar <mkumbar@nvidia.com >
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com >
2023-05-09 16:08:42 -07:00
vivekku
bd5ab81ccc
gpu: nvgpu: nvs: queue direction update
...
Changes:
- update nvgpu_nvs_ctrl_queue to have queue direction as it is required
by gsp scheduler to erase queue individually
- queue direction is updated during ioctl call to create queue and is
used only by gsp scheduler. So no other moduler should be affected by
it.
- need to pass the size of struct which is u32 so downgrading it from
u64 to u32 is intentional, misra C violation 10.3 can be ignored here
Bug 4027512
Change-Id: I6ef6e4b06124e25da3d004a2d8822516c3ac2105
Signed-off-by: vivekku <vivekku@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2881804
Reviewed-by: svcacv <svcacv@nvidia.com >
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com >
Reviewed-by: svc-mobile-cert <svc-mobile-cert@nvidia.com >
Reviewed-by: Mahantesh Kumbar <mkumbar@nvidia.com >
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com >
2023-05-08 23:37:56 -07:00
Divya
a4175b1265
gpu: nvgpu: resolve pmu mismatches
...
Add the following pmu HALs for PMU registers
to avoid duplication of code for future chips:
- get_bar0_addr
- get_bar0_data
- get_bar0_timeout
- get_bar0_ctl
- get_bar0_error_status
- set_bar0_error_status
- get_bar0_fecs_error
- set_bar0_fecs_error
- get_mailbox
- get_pmu_debug
JIRA NVGPU-9758
Change-Id: If8b9c91ecd51d526babf12e3cee09048d736f0f4
Signed-off-by: Divya <dsinghatwari@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2897156
Reviewed-by: Rajesh Devaraj <rdevaraj@nvidia.com >
Reviewed-by: svcacv <svcacv@nvidia.com >
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com >
Reviewed-by: svc-mobile-cert <svc-mobile-cert@nvidia.com >
Reviewed-by: Mahantesh Kumbar <mkumbar@nvidia.com >
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com >
2023-05-05 19:48:04 -07:00
Deepak Goyal
811f8546cf
nvgpu: sysfs: remove 'allow_all' from prod build
...
REG_OPS whitelist can be bypassed using sysfs
/sys/devices/gpu.0/allow_all
Sysfs are privileged, need Root access to set this sysfs.
This node should not be exposed by NVGPU-RM in Linux prod builds.
Bug 4083557
Change-Id: I984212df7a9f2dfeb6759cc502ae485daa1d82d4
Signed-off-by: Deepak Goyal <dgoyal@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2893829
Reviewed-by: Sagar Kamble <skamble@nvidia.com >
Reviewed-by: Vaibhav Kachore <vkachore@nvidia.com >
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com >
2023-05-05 11:49:28 -07:00
Rajesh Devaraj
01d3ed09b0
gpu: nvgpu: update get_access_map
...
This patch re-names the variables used in gr_init_get_access_map API:
whitelist - gr_access_map
num_entries - gr_access_map_num_entries
wl_addr_*[] - gr_access_map_*[]
JIRA NVGPU-9849
Change-Id: I3a0a59410af8983867af5bc2f9ff200e56e190c4
Signed-off-by: Rajesh Devaraj <rdevaraj@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2891567
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com >
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com >
2023-05-05 02:31:10 -07:00
Shashank Singh
9512b9f1de
gpu: nvgpu: remove user managed addr space capability flag
...
Remove NVGPU_GPU_IOCTL_ALLOC_AS_FLAGS_USERSPACE_MANAGED and
NVGPU_AS_ALLOC_USERSPACE_MANAGED flags which are used for supporting
userspace managed address-space. This functionality is not implemented
fully in kernel neither going to be implemented in near future.
Jira NVGPU-9832
Bug 4034184
Change-Id: I3787d92c44682b02d440e52c7a0c8c0553742dcc
Signed-off-by: Shashank Singh <shashsingh@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2882168
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com >
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com >
2023-05-04 11:39:30 -07:00
Martin Radev
84bb919909
gpu: nvgpu: Setup GFX-capable TPCs
...
This patch dispatches to the appropriate HAL to
select the GFX-capable TPCs.
Bug 3944931
Change-Id: Ifb7338bea2cd59581133b7a2ba723f5d8bfa507c
Signed-off-by: Martin Radev <mradev@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2891725
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com >
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com >
2023-05-04 11:38:54 -07:00
Divya
c728f09c18
gpu: nvgpu: add sysfs node for golden img status
...
- Add a sysfs node "golden_img_status" to show
if golden_image size and ptr are already initialized
or not.
- This node helps to know golden image status before
attempting to modify gpc/tpc/fbp masks.
Bug 3960290
Change-Id: I3c3de69b369bcaf2f0127e897d06e21cb8e2d68e
Signed-off-by: Divya <dsinghatwari@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2868729
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com >
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com >
2023-05-04 11:36:37 -07:00
prsethi
c49ac865de
gpu: nvgpu: init golden ctx image during nvgpu poweron
...
Safety build temporal requirement is that on FECS power up it should go
through entire initialization methods.
init_golden_image callback is being called from devctl/ioctl path and
triggers FECS method 10 and 11. As these methods are part of APP init,
not being called during resume and causing quiesce on safety build.
To fix this issue, calling the callback from poweron API.
Bug 4082813
Bug 4037712
Change-Id: I2d27203d3cb4326ae7d8bd6025693fd61d5237df
Signed-off-by: prsethi <prsethi@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2893218
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com >
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com >
2023-05-04 03:14:19 -07:00
srajum
1de86155d8
userspace: skip "test_branches.branches" unit test
...
- "test_branches.branches" unit test is failing for vectorcast build
on ga10b, so skipping this.
JIRA NVGPU-9909
Change-Id: Ie713f1b92e29af63c23ba597cf2c16945337b780
Signed-off-by: srajum <srajum@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2897716
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com >
Reviewed-by: svcacv <svcacv@nvidia.com >
Reviewed-by: Prateek Sethi <prsethi@nvidia.com >
Reviewed-by: Vaibhav Kachore <vkachore@nvidia.com >
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com >
2023-05-03 21:04:46 -07:00
Richard Zhao
be7b4aac61
gpu: nvgpu: linux: pci calls vgpu power on for virt dev
...
VF driver shares same poweron function with legacy vgpu.
Jira GVSCI-15779
Change-Id: I44381f7ebe1cfd6c72ff886aa9f54d54c189a8b6
Signed-off-by: Richard Zhao <rizhao@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2884178
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com >
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com >
2023-05-01 00:24:56 -07:00
Richard Zhao
f9242c032e
gpu: nvgpu: linux: add virtual function support
...
vf probe is called by pci general probe when platform data indicates
it's a virtual device.
vf_linux covers PCIE specific initialization, then call common vgpu
probe.
Jira GVSCI-15779
Change-Id: I47ce1c4807b23363a9062ff0cbc8e08b9c6cdc97
Signed-off-by: Richard Zhao <rizhao@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2884177
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com >
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com >
2023-05-01 00:24:45 -07:00