Sagar Kamble
53dc53a8b4
gpu: nvgpu: add hal to get the bar2 vm size
...
On ga10b+ platforms, more VM space is needed to map various buffers
to bar2 vm. Engine method buffer is mapped for each pbdma and for
maximum supported TSGs this requires more than 32MB of space.
Also we need to consider fault buffer space and vab buffer
space requirement.
Bug 3958581
Change-Id: I9ee87119f762352ee12859b71c08a5f75b3554e0
Signed-off-by: Sagar Kamble <skamble@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2872811
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com >
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com >
2023-03-25 02:45:47 -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
Jon Hunter
9b58826f97
gpu: nvgpu: Fix build for Linux without virtualization
...
L4T does not support virtualization currently and so we should be able
to build NVGPU without virtualization support. This avoids having to
build many virtualization drivers for Tegra.
The build flag CONFIG_TEGRA_VIRTUALIZATION was added for building
out-of-tree drivers to select if virtualization is enabled or not. This
is enabled by default. However, if this is not set, then driver should
still build. Currently, NVGPU is not building when
CONFIG_TEGRA_VIRTUALIZATION is not set because
CONFIG_TEGRA_GR_VIRTUALIZATION is now always enabled for NVGPU. Fix this
by wrapping CONFIG_TEGRA_GR_VIRTUALIZATION with
CONFIG_TEGRA_VIRTUALIZATION.
Jira GVSCI-16046
Change-Id: I5448ad73d4d4e3e151ef216a7fcf0469890fd5ec
Signed-off-by: Jon Hunter <jonathanh@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2868502
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com >
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com >
2023-03-22 03:25:42 -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
Rajesh Devaraj
8d091a4548
gpu: nvgpu: add pce_map_value gops for ce
...
This patch adds pce_map_value gops for CE.
JIRA NVGPU-9329
Change-Id: Ic1e599b8e23e46a537daa92aa9601953eb826997
Signed-off-by: Rajesh Devaraj <rdevaraj@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2861879
Reviewed-by: svcacv <svcacv@nvidia.com >
Reviewed-by: Seema Khowala <seemaj@nvidia.com >
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com >
2023-03-21 09:37:15 -07:00
vivekku
d5e00ef380
gpu: nvgpu: hal: enable gsp scheduler
...
- enable gsp scheduler for orin silicon platforms
- disabled gsp scheduler for simulation and enabled KMD scheduler
Bug 3935433
Change-Id: I38cb35937ffb25b76fbf37fa4eeb9e993f0370c5
Signed-off-by: vivekku <vivekku@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2872897
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: Prateek Sethi <prsethi@nvidia.com >
Reviewed-by: Ramesh Mylavarapu <rmylavarapu@nvidia.com >
Reviewed-by: Mahantesh Kumbar <mkumbar@nvidia.com >
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com >
2023-03-21 02:38:01 -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
f791adf880
gpu: nvgpu: move .runlist.hw_submit to use runlist_id
...
Use detailed function parameters runlist_id, iova/aperture and count, so
the HAL could be reused on server side.
Jira GVSCI-15773
Change-Id: I28f68682b9eea4e798af5c850c87840bd9b79970
Signed-off-by: Richard Zhao <rizhao@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2863444
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:31:29 -07:00
Richard Zhao
a587d94f5a
gpu: nvgpu: init nvs scheduler for vf
...
nvs does not have a clean cut. runlist submit path uses nvs worker no
matter whether the feature is enabled.
Jira GVSCI-15773
Change-Id: I6f6db1e766b8079ad6ca4a6b530b3ec27094f840
Signed-off-by: Richard Zhao <rizhao@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2863443
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com >
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com >
2023-03-21 02:31:21 -07:00
Richard Zhao
da1da8f563
gpu: nvgpu: move .preempt_trigger/.is_preempt_pending to IDs
...
.preempt_tsg uses .preempt_trigger/.is_preempt_pending, so they both
have to use runlist_id and tsgid too.
Jira GVSCI-15770
Change-Id: Ida24d160c362ea1348d7c19e6d0352bb390d0a64
Signed-off-by: Richard Zhao <rizhao@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2863442
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:57 -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
Rajesh Devaraj
4f96f59c15
gpu: nvgpu: perform support_ls_pmu check
...
Perform support_ls_pmu check before dereferencing pmu from gpu struct g
to avoid the possibility of kernel panic when LS PMU support is not
enabled.
JIRA NVGPU-9283
Change-Id: I65caac449f884164d797dedc2041d6ee4292e326
Signed-off-by: Rajesh Devaraj <rdevaraj@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2868250
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: Mahantesh Kumbar <mkumbar@nvidia.com >
Reviewed-by: Ramalingam C <ramalingamc@nvidia.com >
Reviewed-by: Seema Khowala <seemaj@nvidia.com >
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com >
2023-03-17 10:04:59 -07:00
Richard Zhao
4ec683975a
gpu: nvgpu: obj_ctx: fix possible mem leak
...
When generate golden image, subctx_mask memory was not freed on fail.
It was detected by code coverity checker.
Bug 3952896
Change-Id: Iae0c78b11003980c6b09ec0e72bebfda0a244b17
Signed-off-by: Richard Zhao <rizhao@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2868150
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com >
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com >
2023-03-17 10:04:45 -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
prsethi
505690f505
gpu: nvgpu: add validation check for domain name
...
Currently there is no validation checks for domain name used in domain
create command which can cause some security risk.
Patch enable the validation for domain name by only allowing char from
([a-z], [A-Z], [0-9], -, _) list.
Bug 3994374
Change-Id: Ia2cb6f533ed136e74e7a72934ad5267803d1236d
Signed-off-by: prsethi <prsethi@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2871515
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com >
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com >
2023-03-17 04:17:14 -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
Richard Zhao
067e3590d5
gpu: nvgpu: runlist: init engine info of runlist for VF
...
- init engine info for VF which is needed to setup ramfc
- avoid register access in nvgpu_runlist_get_device_id. It could use
rleng_id.
- alloc physical addressed memory for vf runlist mem.
Jira GVSCI-15773
Change-Id: I63494b306a2f56d090a61ea1fa581083224d1cb6
Signed-off-by: Richard Zhao <rizhao@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2863432
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com >
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com >
2023-03-17 04:04:21 -07:00
Richard Zhao
64e22ee54b
gpu: nvgpu: vgpu: add rleng_id to constants
...
rl_eng_id is used to construct ram_fc_target_w. VF creates inst_block
and ramfc on client side.
Jira GVSCI-15769
Change-Id: Id641e644e829bfaf6a3bb0bb758c142f0a514db3
Signed-off-by: Richard Zhao <rizhao@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2863431
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com >
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com >
2023-03-17 04:04:09 -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
ce4293ab20
gpu: nvgpu: gsp: disabling multiple gsp firmware read
...
Changes:
- disabled gsp firmware release during railgating
- firmware read happen only during power on
Bug 3935433
Change-Id: I9156c015ab7f90ab640c33ca99dc7f3e289b7659
Signed-off-by: vivekku <vivekku@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2870170
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com >
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com >
2023-03-17 03:56:36 -07:00
vivekku
eb52414f22
gpu: nvgpu: ga10b: disable gsp scheduler
...
Changes:
- disabling gsp scheduler
Bug 3935433
Change-Id: Iedb049b0ad1f052e8b3d1692d9280e80dcee9163
Signed-off-by: vivekku <vivekku@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2869839
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com >
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com >
2023-03-17 03:56:24 -07:00
vivekku
da78da60f3
gpu: nvgpu: Makefile: Enabling gsp sched flag
...
Bug 3935433
Change-Id: Ib265adf561a09ede25d481f13e9c06b773976030
Signed-off-by: vivekku <vivekku@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2860795
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com >
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com >
2023-03-17 03:56:08 -07:00
vivekku
9773e7ca68
gpu: nvgpu: gsp: erase queue command for safety scheduler
...
Changes:
- implemented erase queue command for safety scheduler to depopulate
control fifo parameters in safety scheduler FW.
NVGPU-9590
Bug 3935433
Change-Id: I2cd6cd967ac4dba61992dd285e45b18f34dda2ca
Signed-off-by: vivekku <vivekku@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2858533
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com >
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com >
2023-03-17 03:55:31 -07:00
vivekku
a2a86eed27
gpu: nvgpu: gsp: migration from KMD to GSP
...
Changes:
- submit shadow domain for legacy used cases in case user domain is not
present.
- disabling config flags for KMD to submit user domain.
Bug 3935433
NVGPU-9664
Change-Id: I498226df36d0b482d1af369526adb369d921b6ca
Signed-off-by: vivekku <vivekku@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2843968
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com >
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com >
2023-03-17 03:55:20 -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
prsethi
6b2c080f8f
gpu:nvgpu: add enable flag for KMD_SCHEDULING_WORKER_THREAD support
...
Currently KMD_SCHEDULING_WORKER_THREAD can be enabled/disabled using
compile time flag but this flag does give ability to control the
feature based on the chip.
GSP is enabled only on ga10b where KMD_SCHEDULING_WORKER_THREAD should
be disabled while should be enabled for other chips at the same time
to support GVS tests.
Change adds enabled flag to control KMD_SCHEDULING_WORKER_THREAD based
on the chip.
Bug 3935433
Change-Id: I9d2f34cf172d22472bdc4614073d1fb88ea204d7
Signed-off-by: prsethi <prsethi@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2867023
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com >
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com >
2023-03-17 03:55:02 -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
Dinesh Kamalakannan
a8581f0283
gpu: nvgpu: mailbox dump before reporting to SDL
...
In case of ACR Bootstrap failure, print the mailbox
values for the error code, before reporting the error
to Safety Service. In some cases, once the error is
reported to SDL, only the nvgpu_sw_quiesce debugs are
there in sloginfo.
Bug 3960710
Signed-off-by: Dinesh Kamalakannan <dineshka@nvidia.com >
Change-Id: Ib72bb4280cc80b39c5fb2e57f26c7b0e9ab6a4ad
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2867592
Reviewed-by: Mahantesh Kumbar <mkumbar@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-03-13 04:59:08 -07:00
Richard Zhao
84ddb23633
gpu: nvgpu: move .force_ctx_reload to use runlist_id and chid
...
Moving to use IDs rather than struct makes it reusable on server side.
Jira GVSCI-15770
Change-Id: Id4e815e9cf78a43156449d0e77e8e331fc906725
Signed-off-by: Richard Zhao <rizhao@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2863439
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:10 -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
d9c8d317f0
gpu: nvgpu: update .read_state to use runlist_id and chid
...
Moving to use IDs rather than struct makes it reusable on server side.
Jira GVSCI-15770
Change-Id: Ia5e30ebb0e8092b9cdc4c3f3cd524f585fd4b410
Signed-off-by: Richard Zhao <rizhao@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2863437
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 >
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com >
2023-03-13 04:55:58 -07:00
Richard Zhao
2ff110f722
gpu: nvgpu: update .clear to use runlist_id and chid
...
- Moving to use IDs rather than struct makes it reusable on server side.
- move channel bind/unbind to use .enable/.clear HALs
Jira GVSCI-15770
Change-Id: I86d4aae2953024e537e32a35fe9cabb1b91cd201
Signed-off-by: Richard Zhao <rizhao@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2863436
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: Ramesh Mylavarapu <rmylavarapu@nvidia.com >
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com >
2023-03-13 04:55:53 -07:00
Richard Zhao
3edae21ca6
gpu: nvgpu: vgpu: add vgpu-next cmds support
...
vgpu-next cmds will be used if CONFIG_NVGPU_NEXT is set.
Jira GVSCI-15770
Change-Id: Iddb2c8b5c0ca412c99bfd01fd7d6411d4439131f
Signed-off-by: Richard Zhao <rizhao@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2863435
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com >
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com >
2023-03-13 04:55:47 -07:00
Richard Zhao
7cd377568f
gpu: nvgpu: vgpu: init ctx buffers for vf driver
...
VF needs to allocate gr ctx buffers on gr init, since VF will manage the
gr ctx.
Jira GVSCI-15769
Change-Id: Ifd09e6b09306c0fd36bddc60caa3d0d56f2b29cb
Signed-off-by: Richard Zhao <rizhao@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2863434
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 >
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com >
2023-03-13 04:55:35 -07:00
Rajesh Devaraj
e5c5fee01e
gpu: nvgpu: skip falcon sw init for pmu
...
Perform falcon sw init for PMU only if it is supported in the platform.
JIRA NVGPU-9283
Change-Id: I697e389a7cd812c7cb941eac010549f541074bb4
Signed-off-by: Rajesh Devaraj <rdevaraj@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2848436
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com >
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com >
2023-03-12 19:47:32 -07:00
Austin Tajiri
6196d3f382
gpu: nvgpu: ga10b: fix missing gr registers
...
Add the following missing GR registers/fields for GA10B:
- gr_exception_fe_m
- gr_exception_memfmt_m
- gr_exception_pd_m
- gr_exception_scc_m
- gr_exception_ds_m
- gr_exception_ssync_m
- gr_exception_mme_m
- gr_exception_sked_m
- gr_fe_hww_esr_info_r
- gr_mme_hww_esr_info_r
- gr_sked_hww_esr_r
- gr_sked_hww_esr_reset_active_f
Jira NVGPU-9217
Change-Id: I7bffb0f4e605ee09e75c7f550cece6779b71a80e
Signed-off-by: Austin Tajiri <atajiri@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2866781
Reviewed-by: svcacv <svcacv@nvidia.com >
Reviewed-by: Tejal Kudav <tkudav@nvidia.com >
Reviewed-by: Seema Khowala <seemaj@nvidia.com >
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com >
2023-03-12 08:16:01 -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
a23e574de0
gpu: nvgpu: vf: init syncpt mem
...
Since gmmu map is moved to VF, the syncpt mem map is also on VF clients.
Jira GVSCI-15733
Change-Id: Iaf68070da860616f5301a822ce98581b8a1a6629
Signed-off-by: Richard Zhao <rizhao@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2863445
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: Prathap Kumar Valsan <prathapk@nvidia.com >
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com >
2023-03-12 08:13:52 -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
Richard Zhao
8c97129c12
gpu: nvgpu: enable vgpu for oot kernel
...
Jira GVSCI-16046
Change-Id: I17b690a842bfe76243cac64c2274e049f99095b1
Signed-off-by: Richard Zhao <rizhao@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2866153
Reviewed-by: svcacv <svcacv@nvidia.com >
Reviewed-by: Sagar Kamble <skamble@nvidia.com >
Reviewed-by: Aparna Das <aparnad@nvidia.com >
Reviewed-by: Manish Bhardwaj <mbhardwaj@nvidia.com >
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com >
2023-03-08 18:44:23 -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
Kishan
a765a76c81
gpu:nvgpu: Expose physical gpc,tpc layout for ecc sysfs nodes.
...
Added new gr_config member to hold TPC physical id map.
Updated ecc stats structures to hold physical gpc,tpc
numbers. Previously logical id's were exposed via ecc
sysfs nodes.
Consumers of ecc sysfs nodes refer tpc_fs_mask which is
physical gpc/tpc layout whereas ecc sysfs nodes were updated
with logical gpc/tpc layout. This change ensures that both
use the same framework.
JIRA NVGPU-9607
Bug 3950378
Change-Id: I1f91956dd027ffdc12042dd33dc491a3ce1e1ff6
Signed-off-by: Kishan <kpalankar@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2866264
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-08 06:32:00 -08:00
Divya
6d65e58fd2
gpu: nvgpu fix coverity issue in therm/cg unit
...
Add NULL check for ELCG and BLCG HALs based on cgmode
to avoid coverity issue: CWE-476: NULL Pointer Dereference
Bug 3952896
Change-Id: I3ee717645bbecaafddb5d485f57550e213bf762b
Signed-off-by: Divya <dsinghatwari@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2864656
Reviewed-by: svcacv <svcacv@nvidia.com >
Reviewed-by: Sagar Kamble <skamble@nvidia.com >
Reviewed-by: Mahantesh Kumbar <mkumbar@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-03-08 06:30:51 -08:00
Sagar Kamble
2acfb55780
gpu: nvgpu: fix tex rd coalesce disable logic
...
NETLIST_REGIONID_SW_CTX_LOAD writes update gr_gpcs_tpcs_tex_m_dbg2_r to
default value that keeps rd coalesce enabled for LG & SU.
Disable rd coalesce for tex, lg and su after NETLIST_REGIONID_SW_CTX_LOAD
writes during gr init and golden ctx init for it to take effect.
For gr sw method handling, don't update the tex rd coalesce on interrupt
with offset *_SET_RD_COALESCE as we want to keep rd coalescing disabled.
Bug 3881919
Change-Id: Ie7e6616d48f84547ce3380bfa395910b7995c05b
Signed-off-by: Sagar Kamble <skamble@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2857141
(cherry picked from commit b2c8827c65 )
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2859538
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: Ramalingam C <ramalingamc@nvidia.com >
Reviewed-by: Ankur Kishore <ankkishore@nvidia.com >
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com >
2023-03-07 22:46:44 -08:00
Richard Zhao
3af0fe510e
gpu: nvgpu: add nvgpu-next to Makefile.sources
...
It's for gpu server or qnx could use nvgpu-next. It only includes
nvgpu-next Makefile.sources. The user should decide whether to enable
CONFIG_NVGPU_NEXT.
Jira GVSCI-15646
Change-Id: Ic70a4de668dd5e05a68fc57755a1f0aed9548ca5
Signed-off-by: Richard Zhao <rizhao@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2858883
Reviewed-by: Austin Tajiri <atajiri@nvidia.com >
Reviewed-by: Rajesh Devaraj <rdevaraj@nvidia.com >
Reviewed-by: Vijayakumar Subbu <vsubbu@nvidia.com >
2023-03-05 04:09:43 -08:00