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
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
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
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
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
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
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
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
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
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
Richard Zhao
8a411096c9
gpu: nvgpu: linux: vgpu to use dt_node for tegra_gr_comm
...
For PCIE gpu device, it uses PCIE controller dt node to store nvgpu/vgpu
dt properties, since PCIE endpoint device does not have any
corresponding dt node. So we pass dt_node directly to tegra_gr_comm,
together with EP device since tegra_gr_comm relies on dev_err.
Jira GVSCI-15779
Change-Id: I73c5210e2d8b6a728c74823c1e62fed765776365
Signed-off-by: Richard Zhao <rizhao@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2884176
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com >
Reviewed-by: svc-mobile-cert <svc-mobile-cert@nvidia.com >
Reviewed-by: Austin Tajiri <atajiri@nvidia.com >
Reviewed-by: Santosh BS <santoshb@nvidia.com >
Reviewed-by: Vijayakumar Subbu <vsubbu@nvidia.com >
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com >
2023-05-01 00:24:34 -07:00
Richard Zhao
03da61c9ce
gpu: nvgpu: vgpu: create vgpu_common file
...
vgpu_common file contains common functions that could be shared by
legacy vgpu and vf.
Jira GVSCI-15779
Change-Id: Ie301eb29dfceed95bcd96a1024663f31eb7558fd
Signed-off-by: Richard Zhao <rizhao@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2884175
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com >
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com >
2023-05-01 00:24:28 -07:00
Richard Zhao
678df244b9
gpu: nvgpu: vgpu: remove bar1 support
...
All vgpu supported chips don't support bar1 anymore.
Jira GVSCI-15779
Change-Id: Ia2dc4a69f3cb96df6650e663d2a40302fc826dd2
Signed-off-by: Richard Zhao <rizhao@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2884174
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: Santosh BS <santoshb@nvidia.com >
Reviewed-by: Austin Tajiri <atajiri@nvidia.com >
Reviewed-by: Vijayakumar Subbu <vsubbu@nvidia.com >
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com >
2023-05-01 00:24:07 -07:00
Johnny Liu
4e6be49eee
gpu: nvgpu: Correct the name of devfreq governor
...
Remove the duplicated nvhost_pod_scaling_governor_v2 and switch to the
nvhost_pod_scaling_governor.
Bug 4074863
Signed-off-by: Johnny Liu <johnliu@nvidia.com >
Change-Id: Ia6016cab46e97f04366d6cf14355b2e7e0989df8
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2895568
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com >
Reviewed-by: svc-mobile-cert <svc-mobile-cert@nvidia.com >
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com >
Tested-by: Laxman Dewangan <ldewangan@nvidia.com >
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com >
2023-04-28 08:10:31 -07:00
Martin Radev
924dd58da0
gpu: nvgpu: remove IO_COHERENT flag
...
This patch removes the IO_COHERENT flag as IO
coherence is the default setting.
Bug 3959027
Change-Id: I9800c2b8b161f7bdc2d6856639dd03488881882d
Signed-off-by: Martin Radev <mradev@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2887630
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com >
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com >
2023-04-21 11:32:05 -07:00
Martin Radev
81d95456b9
gpu: nvgpu: Rename PLATFORM_ATOMIC to SYSTEM_COHERENT
...
To support current and future usecases, it would be
beneficial to select the SYSTEM_COHERENT aperture explicitly.
The benefits are:
- platform atomic code is cleaned-up.
- userspace can select the SYSTEM_COHERENT aperture for any
specific usecases.
Bug 3959027
Change-Id: I6489ebe87fa75cc760930277bad5e0cacca80eb6
Signed-off-by: Martin Radev <mradev@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2864177
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: Seema Khowala <seemaj@nvidia.com >
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com >
2023-04-21 11:31:53 -07:00
Ramalingam C
24475ad46b
gpu: nvgpu: pci power management for iGPU-PCIe devices
...
Use the PCI power management functions for iGPU-PCIe devices.
JIRA NVGPU-9896
Change-Id: I1ac4ae67fa727e0a8e37ed2037d1417c5c19bb17
Signed-off-by: Ramalingam C <ramalingamc@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2886799
Reviewed-by: Rajesh Devaraj <rdevaraj@nvidia.com >
Reviewed-by: Seema Khowala <seemaj@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-04-14 08:20:47 -07:00
Shashank Singh
21cb70f58d
gpu: nvgpu: remove kind control capability
...
Kind is controlled by nvgpu userspace library so related capability
flags can be removed from kernel and uapi interface.
Jira NVGPU-9832
Bug 4034184
Change-Id: Id2b0a4e1cd784638362116b8d99177467fba998b
Signed-off-by: Shashank Singh <shashsingh@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2880391
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: Ankur Kishore <ankkishore@nvidia.com >
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com >
2023-04-13 12:21:46 -07:00
Ramalingam C
b2c4cdb25b
gpu: nvgpu: sim init for iGPU-PCIe
...
Implement the sim init for the iGPU-PCIe devices.
JIRA NVGPU-9348
Change-Id: I9088308b96c57bb1cea01959326446ccad0a8c24
Signed-off-by: Ramalingam C <ramalingamc@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2851163
Reviewed-by: svcacv <svcacv@nvidia.com >
Reviewed-by: Sagar Kamble <skamble@nvidia.com >
Reviewed-by: Seema Khowala <seemaj@nvidia.com >
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com >
2023-04-10 20:45:50 -07:00
Kishan
c6d5fb348c
gpu: nvgpu: Capture thread name for every channel created
...
This change ensures that in scenarios where GPU enters a bad
state because of the work submitted by a misbehaved thread,
we should be able to capture thread name as part of our
1st set of failure logs.
Changes for QNX env is pending.
JIRA NVGPU-7783
Change-Id: I65d55a6ade749ff91739458e0642ed2dafaae5cc
Signed-off-by: Kishan <kpalankar@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2879197
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: Tejal Kudav <tkudav@nvidia.com >
Reviewed-by: Ankur Kishore <ankkishore@nvidia.com >
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com >
2023-04-06 10:12:48 -07:00
Timo Alho
3ff15b69de
gpu: nvgpu: fix return value check of MRQ_STRAP
...
The return value of tegra_bpmp_transfer() API is only for a low level
wire-protocol errors. When checking BPMP-FW response to MRQ_STRAP
request, the return value in the MRQ response payload need to be
checked.
Bug 3744064
Bug 3317279
Signed-off-by: Timo Alho <talho@nvidia.com >
Change-Id: I165431a5d2ed5a09965eb84b7ee09766bb09d091
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2859267
Reviewed-by: Divya Singhatwaria <dsinghatwari@nvidia.com >
Reviewed-by: svc-mobile-cert <svc-mobile-cert@nvidia.com >
Reviewed-by: Vijayakumar Subbu <vsubbu@nvidia.com >
Tested-by: Divya Singhatwaria <dsinghatwari@nvidia.com >
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com >
2023-04-06 00:41:59 -07:00
Ramalingam C
7ba33f3dec
gpu: nvgpu: Handle iGPU in pci probe and remove
...
When iGPU is probed as pci device, power and clocks are driven from the
platform, hence the pci_probe and pci_remove to handle both
iGPU and dGPU. Also enable the runtime PM for the PCI-iGPU
device.
JIRA NVGPU-9348
Change-Id: Id5dd88dc0c905655f9174ecd7936bdf2996f06e6
Signed-off-by: Ramalingam C <ramalingamc@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2835341
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com >
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com >
2023-04-05 05:53:03 -07:00
Shashank Singh
28cbdcde73
gpu: nvgpu: remove partial mapping capability flag
...
Remove NVGPU_SUPPORT_PARTIAL_MAPPINGS kernel flag and the
corresponding uapi gpu charaacteristics flag
NVGPU_GPU_FLAGS_SUPPORT_PARTIAL_MAPPINGS. This functionality is
supported by fixed mapping ioctl by default.
Jira NVGPU-9832
Bug 4034184
Change-Id: Ie887c753f152afb6a4a1e4aafb5f8f6fd3b7b398
Signed-off-by: Shashank Singh <shashsingh@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2879793
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com >
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com >
2023-04-04 21:51:24 -07:00
Santosh BS
a7caa8da79
gpu: nvgpu: fix misra dir 4.6 and rule 20.7
...
Fix below misra violations:
directive_4_6_violation: Using basic numerical type "int" rather than
a typedef that includes size and signedness
information.
rule_20_7_violation: Macro parameter expands into an expression without
being wrapped by parentheses
Bug 3763551
Change-Id: I74f2edaef0b21369b76afd596b69157123eca261
Signed-off-by: Santosh BS <santoshb@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2868944
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: V M S Seeta Rama Raju Mudundi <srajum@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-04-04 21:41:34 -07:00
Sagar Kamble
410d3603ff
gpu: nvgpu: update dmabuf locking
...
All drivers that use dma-bufs have been moved to the updated locking
specification wherein dma-buf reservation is to be locked while
accessing the dmabuf internal data. Lock is removed. So lock
the resv object onwards while updating dmabuf private data
used for compression and buffer metadata.
With this, we can enable compression for all kernel versions that
was disabled earlier for v6.2+ kernels.
Bug 3974855
Bug 3995618
Change-Id: Iece3ab57912d0420d4bc5c07d2c0d2e03ff19292
Signed-off-by: Sagar Kamble <skamble@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2877633
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com >
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com >
2023-03-31 13:32:58 -07:00
Sagar Kamble
a5640d61bd
gpu: nvgpu: free VEID if the channel is closed
...
In case of process crash or forceful closure of the channels, userspace
may not release the VEID. In that case, creating further subcontexts
may not be possible.
Hence, when the channel is closed forcibly (linux), release the VEID on
closure of the last channel in the subcontext.
With this, normally on linux, channel close will not relase the VEID
However, on qnx it will release the VEID. So delete subcontext devctl
call on qnx will be nop in normal case hence changed the error print
and error return to success.
Also added check in the subcontext delete ioctl fn that all channels
are unbound before deleting the subcontext. This is to ensure that
channels don't refer to dangling subcontext pointer.
Bug 3979886
Change-Id: I434944b01740720011abce3664394ae8cb0d4e2e
Signed-off-by: Sagar Kamble <skamble@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2858060
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-03-31 13:25:53 -07:00
Santosh BS
2a865e3aad
gpu: nvgpu: NVENC support on TU104
...
This patch adds nvenc support for TU104
- Fetch engine/dev info for nvenc
- Falcon NS boot (fw loading) support
- Engine context creation for nvenc
- Skip golden image for multimedia engines
- Avoid subctx for nvenc as it is a non-VEID engine
- Job submission/flow changes for nvenc
- Code refactoring to scale up the support for other multimedia
engines in future.
Bug 3763551
Change-Id: I03d4e731ebcef456bcc5ce157f3aa39883270dc0
Signed-off-by: Santosh BS <santoshb@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2859416
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: Vijayakumar Subbu <vsubbu@nvidia.com >
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com >
2023-03-24 17:07:49 -07:00
Ramalingam C
faf6ff3f34
gpu: nvgpu: Add pci driver support for NVGPU_NEXT_PCI_DEVICES
...
Add the NVGPU_NEXT_PCI_DEVICES and NVGPU_NEXT_PCI_IDS into the list
of the pci devices and pci ids.
JIRA NVGPU-9348
Change-Id: I3d42eebc1a61f8821ef1f0f9a93262a4d84e8650
Signed-off-by: Ramalingam C <ramalingamc@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2835338
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com >
Reviewed-by: Sagar Kamble <skamble@nvidia.com >
Reviewed-by: Ankur Kishore <ankkishore@nvidia.com >
2023-03-24 17:05:47 -07:00
Sagar Kamble
dc0dc2e96a
gpu: nvgpu: refcount ctrl node with tsg open and close
...
Since tsg close refers to the ctrl node to revoke the share tokens, need
to ensure that ctrl node remains active until after contained tsgs are
released.
Bug 3946749
Change-Id: I3b514f6d2a041cbf3d517f846f202f956747d726
Signed-off-by: Sagar Kamble <skamble@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2872115
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com >
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com >
2023-03-21 09:46:05 -07:00
Martin Radev
ac9a59075e
gpu: nvgpu: Print flags after all flags are set
...
Without this change, nvgpu would print out some
flags as disabled in dmesg but enable them shortly after.
This leads to confusion when examining UMD and nvgpu
reporting in UMDs.
This patch adds code to print out the flags after
all flags are set.
Bug 4031904
Change-Id: I67b9a4567886fd5e076f7ac3b8f284b52c03d7e4
Signed-off-by: Martin Radev <mradev@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2871606
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: Alex Waterman <alexw@nvidia.com >
Reviewed-by: Vijayakumar Subbu <vsubbu@nvidia.com >
Reviewed-by: Seema Khowala <seemaj@nvidia.com >
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com >
2023-03-21 09:45:13 -07:00
srajum
02834f8739
gpu: nvgpu: fix CERT-C issues
...
- CID 10165014
Dereference before null check
- CID 10166579
Unused value
Bug 3952896
Change-Id: I6a7f2b97b4a6519272607e560d09c138048bd665
Signed-off-by: srajum <srajum@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2872276
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-03-21 02:37:08 -07:00
Richard Zhao
8f5adab299
gpu: nvgpu: .preempt_tsg move to use runlist_id/tsgid
...
It's for making .preempt_tsg reusable on server side.
Jira GVSCI-15770
Change-Id: Id9f477baa29cb63fb0e1d1650f4b1e6a2fa248c0
Signed-off-by: Richard Zhao <rizhao@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2863441
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com >
Reviewed-by: svc-mobile-cert <svc-mobile-cert@nvidia.com >
Reviewed-by: Ramesh Mylavarapu <rmylavarapu@nvidia.com >
Reviewed-by: Vijayakumar Subbu <vsubbu@nvidia.com >
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com >
2023-03-21 02:30:49 -07:00
Jon Hunter
f20a5b412c
gpu: nvgpu: Fix vgpu build with compression disabled
...
When building VGPU with compression disabled, then build fails as
follows:
error: ‘struct gk20a’ has no member named ‘max_comptag_mem’
505 | gk20a->max_comptag_mem = totalram_size_in_mb; | ^~
error: implicit declaration of function ‘gk20a_dma_buf_priv_list_clear’
[-Werro r=implicit-function-declaration] 523 | gk20a_dma_buf_priv_list_clear(l); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Fix these build failures by guarding the applicable code with
CONFIG_NVGPU_COMPRESSION.
Bug 4014315
Change-Id: I8c7287ab57ef513ba11a3d85c2edfce243f07418
Signed-off-by: Jon Hunter <jonathanh@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2869169
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com >
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com >
2023-03-18 16:19:00 -07:00
Jon Hunter
9bf41e7ae6
gpu: nvgpu: Fix build for Linux v6.3
...
Upstream Linux commit bc292ab00f6c ("(HEAD) mm: introduce vma->vm_flags
wrapper functions") breaking building the NVGPU driver because the
vm_flags variable is made a const and can no longer be set directly. Fix
the build for Linux v6.3 by using the helper functions for setting the
flags.
Bug 4014315
Change-Id: Ie58d1f43b59167869742ff01ffe4e1841dbb1d6e
Signed-off-by: Jon Hunter <jonathanh@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2867167
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com >
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com >
2023-03-17 10:03:54 -07:00
Richard Zhao
41823694a3
gpu: nvgpu: add .init_golden_image HAL
...
golden image is created differently on native and VF.
Jira GVSCI-15772
Change-Id: I8d78d1214d8aac1d39d6529b68adef1dd6f8a516
Signed-off-by: Richard Zhao <rizhao@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2863440
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com >
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com >
2023-03-17 04:04:33 -07:00
atanand
9dd2a8fc73
gpu: nvgpu: Get GA10B EMC floorsweeping status
...
The memory bandwidth reported by the nvgpu driver is a resultant of FBP and EMC floorsweeping status. The FBP floorsweep status was already getting reported in the GPU characterstics so the status of EMC was fetched and reported in this change.
Jira NVGPU-9609
Bug 3661074
Change-Id: Ia2fe6cb029d086765da15d9e964ea77256e06604
Signed-off-by: atanand <atanand@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2859237
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com >
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com >
2023-03-17 04:00:00 -07:00
vivekku
35960f8f40
gpu: nvgpu: gsp: call runlist update and send ctrl fifo info
...
Changes:
- function calls to add and delete domains
- updating runlist
- integrating control fifo changes with ioctls to send queue info to GSP
FW
Bug 3884011
Change-Id: I5ad29eb9501cc2df66843c074ee6a00aae91af23
Signed-off-by: vivekku <vivekku@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2826482
Reviewed-by: Ramesh Mylavarapu <rmylavarapu@nvidia.com >
Reviewed-by: Mahantesh Kumbar <mkumbar@nvidia.com >
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com >
2023-03-17 03:55:08 -07:00
Dinesh Kamalakannan
1aaa6e439c
gpu: nvgpu: Disable ELPG on Prod build
...
On embedded linux production build, disable the below features
1. ELPG support and its debug and sysfs nodes
2. PERFMON support and its debug and sysfs nodes
JIRA NVGPU-9763
Signed-off-by: Dinesh Kamalakannan <dineshka@nvidia.com >
Change-Id: Icae1a082c2ee3a4b2c6ffc4862a0fc5b22bc4366
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2827571/
Reviewed-by: Mahantesh Kumbar <mkumbar@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2827571
Reviewed-by: svcacv <svcacv@nvidia.com >
Reviewed-by: Ankur Kishore <ankkishore@nvidia.com >
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com >
2023-03-14 04:50:18 -07:00
Richard Zhao
c8d6a91de6
gpu: nvgpu: update .channel.enable/disable to use runlist_id and chid
...
Moving to use IDs rather than struct makes it reusable on server side.
Jira GVSCI-15770
Change-Id: Ibd94ab8c9f0492bd6d20243525905d637eb8de66
Signed-off-by: Richard Zhao <rizhao@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2863438
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-03-13 04:56:04 -07:00
Richard Zhao
d118c95803
gpu: nvgpu: vgpu/linux: add ptimer_src_freq needed by construct runlist
...
Jira GVSCI-15773
Change-Id: I251c4e348e0019cbf43db103ef8700ca7bb49172
Signed-off-by: Richard Zhao <rizhao@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2863433
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com >
Reviewed-by: svc-mobile-cert <svc-mobile-cert@nvidia.com >
Reviewed-by: Austin Tajiri <atajiri@nvidia.com >
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com >
2023-03-12 08:14:15 -07:00
Richard Zhao
a7d358f773
gpu: nvgpu: vf: init gmmu related structure
...
vf driver implements gmmu map/unmap on client side.
- adds helper function to check whether nvgpu device is vf or legacy
vgpu.
- inits pd_cache struct for vf
- inits platform->phys_addr for ipa2pa
Jira GVSCI-15733
Change-Id: I46c84f0acdd167b9c4bdcec2f1c25f3acd6a0f71
Signed-off-by: Richard Zhao <rizhao@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2863430
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: Prathap Kumar Valsan <prathapk@nvidia.com >
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com >
2023-03-12 08:13:47 -07:00
Richard Zhao
de0e1be1ed
gpu: nvgpu: add g->func_regs
...
rework nvgpu_func_* io accessors to use g->func_regs rather than use
g->regs. g->regs is invalid for VF.
Jira GVSCI-15732
Change-Id: I71e788ff135c5a286b273c151e1bd0a88e9d61e2
Signed-off-by: Richard Zhao <rizhao@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2863429
Reviewed-by: svcacv <svcacv@nvidia.com >
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com >
Reviewed-by: Dinesh T <dt@nvidia.com >
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com >
2023-03-12 08:13:41 -07:00
Ashish Mhetre
d50889585e
gpu: nvgpu: os: linux: Zero out dma_buf_map struct
...
UBSAN is reporting "invalid-load include/linux/dma-buf-map.h".
This is because non-boolean value loaded to bool variable is_iomem
of dma_buf_map struct. Zeroing out this struct at declaration time
make sure that there is no garbage value which will be non-boolean.
Bug 3994163
Change-Id: Ib18448e8fc09cbcb25c3eeb3e5deec805f6ed008
Signed-off-by: Ashish Mhetre <amhetre@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2869262
Tested-by: Bitan Biswas <bbiswas@nvidia.com >
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com >
Reviewed-by: svc-mobile-cert <svc-mobile-cert@nvidia.com >
Reviewed-by: Bitan Biswas <bbiswas@nvidia.com >
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com >
2023-03-11 19:21:31 -08:00
Ramalingam C
14cb86727c
gpu: nvgpu: Modify device node path for iGPU-PCIe
...
Create device nodes for iGPU-PCIe at /dev/nvgpu/igpu-XXXX:XX:XX.X/
This helps to identify the GPU type and its location at PCIe bus.
Example dev node entry:
/dev/nvgpu/igpu-0000:01:00.0/power
JIRA NVGPU-9451
Change-Id: If66714467a989370c85c1e81d6e6c0c02ce0e6f4
Signed-off-by: Ramalingam C <ramalingamc@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2847618
Reviewed-by: Martin Radev <mradev@nvidia.com >
Reviewed-by: Seema Khowala <seemaj@nvidia.com >
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com >
2023-03-08 18:35:29 -08:00
Alex Waterman
03533066aa
gpu: nvgpu: Disable compression for k6.1+
...
dmabuf internals that nvgpu relies upon for storing meta-data for
compressible buffers changed in k6.1. For now, disable compression
on all k6.1+ kernels.
Additionally, fix numerous compilation issues due to the bit rotted
compression config. All normal Tegra products support compression
and thus have this config enabled. Over the last several years
compression dependent code crept in that wasn't protected under the
compression config.
Bug 3844023
Change-Id: Ie5b9b5a2bcf1a763806c087af99203d62d0cb6e0
Signed-off-by: Alex Waterman <alexw@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2820846
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: Sagar Kamble <skamble@nvidia.com >
Reviewed-by: Ankur Kishore <ankkishore@nvidia.com >
Tested-by: Sagar Kamble <skamble@nvidia.com >
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com >
2023-02-21 03:36:00 -08:00