Sagar Kamble
821699d3a3
gpu: nvgpu: unset async subctx VM with correct index
...
On deleting the subcontext, tsg->subctx_vms[] entries are set to NULL as
per the subcontext id. For async subcontexts the index logic was used
from that of tsg->async_veids bitmask. However subctx_vms is an array
shared by all subcontexts hence index should be subcontext id aka veid.
Also update the description of function nvgpu_tsg_validate_ch_subctx_vm
as some of the functionality is now moved to another function
nvgpu_tsg_create_sync_subcontext_internal.
Bug 3979886
Change-Id: Ic290fb175b34988c6ffabe9c9dc4ec124d2c70af
Signed-off-by: Sagar Kamble <skamble@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2879025
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com >
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com >
2023-03-31 13:33:45 -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
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
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
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
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
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
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
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
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
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
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
srajum
4ef14a13ff
gpu: nvgpu: pmu use PWRCLK at fixed rate 204MHZ
...
- On T234, Getting clock by calling clk.get_rate with CTRL_CLK_DOMAIN_PWRCLK
domian which eventually pass clk index 1U which access TEGRA234_CLK_GPC0CLK.
- But GPC0 is floor-swept which returns makes clk.get_rate API fail
(failed to query source clock).
Bug 3998230
Change-Id: I0a674b1856daf2b899827a7aafe0fc4185dd9964
Signed-off-by: srajum <srajum@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2862998
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 >
Reviewed-by: Ankur Kishore <ankkishore@nvidia.com >
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com >
2023-03-01 10:26:28 -08:00
V M S Seeta Rama Raju Mudundi
ab46ee3335
Revert "gpu:nvgpu: Expose physical gpc,tpc layout for ecc sysfs nodes."
...
This reverts commit 2cc098eae7 .
Reason for revert: intermittent boot failures on drv-orin-f1 and
frspr-f1 on both AV+L and AV+Q.
Bug 3998230
Change-Id: I230ba7ba469fde3f470dab7538cc757c99360d99
Signed-off-by: srajum <srajum@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2863208
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-02-25 11:16:12 -08:00
Kishan
2cc098eae7
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: Iac99951fc3aa9dde02e833109f32aa5bb37ea15f
Signed-off-by: Kishan <kpalankar@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2855032
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-02-22 00:42:23 -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
Richard Zhao
30727e8a93
gpu: nvgpu: remove golden_ctx_init_ch
...
golden_ctx_init_ch is not used anmore because golden image creation has
been separated from channel/tsg.
Jira GVSCI-15771
Change-Id: I2af49717f8debbdb389ac64339e6ea7f84507a4e
Signed-off-by: Richard Zhao <rizhao@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2857563
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: Sagar Kamble <skamble@nvidia.com >
Reviewed-by: Vijayakumar Subbu <vsubbu@nvidia.com >
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com >
2023-02-16 00:00:59 -08:00
Richard Zhao
1e95ebef53
gpu: nvgpu: separate golden image creation from tsg/ch
...
Golden image creation asks FECS to bind inst_block directly. It does not
need any setup on esched. Separating it from tsg/ch makes it for
flexible.
Jira GVSCI-15771
Change-Id: Id446371eb60b9520a7a284120a72c13d2215f4ea
Signed-off-by: Richard Zhao <rizhao@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2854096
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com >
Reviewed-by: svc-mobile-cert <svc-mobile-cert@nvidia.com >
Reviewed-by: Sagar Kamble <skamble@nvidia.com >
Reviewed-by: Vijayakumar Subbu <vsubbu@nvidia.com >
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com >
2023-02-16 00:00:53 -08:00
Rajesh Devaraj
356812d2c4
gpu: nvgpu: update debug print in rpc recieve
...
To aid debugging in the RPC receive path, this patch updates debug
prints to include the received physical address and nvgpu mem address.
JIRA NVGPU-9283
Change-Id: I71917c1ec6594ae57f836df3968c10ce4b1d1bf3
Signed-off-by: Rajesh Devaraj <rdevaraj@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2854022
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-02-07 19:07:36 -08:00
Rajesh Devaraj
e3e80f8d26
gpu: nvgpu: add check related to pmu_support
...
This patch performs the dereferncing of PMU from GPU driver struct only
when PMU is supported.
JIRA NVGPU-9283
Change-Id: I9a589cd999ff726220168cf108c7e419a5f52038
Signed-off-by: Rajesh Devaraj <rdevaraj@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2854013
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: svc-mobile-misra <svc-mobile-misra@nvidia.com >
Reviewed-by: Seema Khowala <seemaj@nvidia.com >
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com >
2023-02-07 19:07:30 -08:00
rmylavarapu
e233ea5836
gpu: nvgpu: SWUD-lite updates for pmu unit.
...
This is updating the pmu unit doxygen as per new guidlines.
Jira NVGPU-6976
Change-Id: Idfe43f32f457f0839e8bc5ad93e32fe7565d90b2
Signed-off-by: rmylavarapu <rmylavarapu@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2844654
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 >
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com >
2023-01-31 19:28:15 -08:00
Divya
120f9e40a3
gpu: nvgpu: Add NULL checks for therm HALs
...
Add NULL checks for therm HALs
JIRA NVGPU-9495
Change-Id: If4fd1166c11070a978546e701157d2a217008e39
Signed-off-by: Divya <dsinghatwari@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2844938
Reviewed-by: Seema Khowala <seemaj@nvidia.com >
Reviewed-by: Rajesh Devaraj <rdevaraj@nvidia.com >
Reviewed-by: svcacv <svcacv@nvidia.com >
Tested-by: Rajesh Devaraj <rdevaraj@nvidia.com >
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com >
2023-01-27 03:05:25 -08:00
rmylavarapu
0c1fc6bcde
gpu: nvgpu: gsp sched: enable scheduler for embedded-linux
...
NV_BUILD_CONFIGURATION_VARIANT_IS_EMBEDDED is not enabled for embedded
linux and a precise check for embedded-linux should be made for enabling
gsp scheduler on linux platforms.
NVGPU-9297
Change-Id: I2a8fc30670a9a751ecdc051e4f8ca5db8c798595
Signed-off-by: rmylavarapu <rmylavarapu@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2836359
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-01-25 20:09:58 -08:00
Bharat Nihalani
4c77431eaf
gpu: nvgpu: fix return value check
...
Function nvgpu_clk_arb_debugfs_init returns 0 on success,
and -ENOMEM on failure.
Current implementation checks return value incorrectly.
Fix the return value check for this function.
Bug 3752450
Change-Id: I073411f167d8378506f269b43c765ef4f406bce3
Signed-off-by: Bharat Nihalani <bnihalani@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2846931
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: Deepak Nibade <dnibade@nvidia.com >
Reviewed-by: Sagar Kamble <skamble@nvidia.com >
Reviewed-by: Vijayakumar Subbu <vsubbu@nvidia.com >
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com >
2023-01-23 22:37:58 -08:00
Rajesh Devaraj
7ad50fee7c
gpu: nvgpu: add new device types
...
This patch adds macros for new device types based on the device
information table. Specifically, it adds the device type IDs for the
following engines:
- SEC
- NVENC
- NVDEC
- NVJPG
- OFA
Further, the max dev types has been updated as 57 in the device info
table. To support his, the corresponding macro has been updated as 58.
JIRA NVGPU-9501
Change-Id: I23f17c91da8a6063457c27763a62b1a08beeed0d
Signed-off-by: Rajesh Devaraj <rdevaraj@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2846203
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: svc-mobile-misra <svc-mobile-misra@nvidia.com >
Reviewed-by: Alex Waterman <alexw@nvidia.com >
Reviewed-by: Ankur Kishore <ankkishore@nvidia.com >
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com >
2023-01-21 16:52:39 -08:00
srajum
6d7ace12dc
nvgpu: Fix CERT-C defects
...
Fix following CERT-C defects
- CID 631480
- CID 494546
Bug 3745813
Change-Id: I33ad7d044cc18219a117811b960dae26cf744983
Signed-off-by: srajum <srajum@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2834699
Reviewed-by: Sagar Kamble <skamble@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: Ankur Kishore <ankkishore@nvidia.com >
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com >
2023-01-20 03:35:49 -08:00
prsethi
4dec633f5f
gpu:nvgpu: clean the domain queues in abrupt close
...
Domain queues are being cleaned as part of graceful close but does not
gets cleaned in case of abrupt app failures.
This change cleanup the queues for abrupt failures.
Bug 3884011
Change-Id: I8cd07b726718b1e13a05d4455a2670cedc9dee37
Signed-off-by: prsethi <prsethi@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2842632
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com >
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com >
2023-01-17 01:40:36 -08:00
Divya
04cd344b35
gpu: nvgpu: free rpc_payload when driver is dying
...
- During nvgpu module unload, the poweroff sequence
will not wait for the ACK from the PMU for the RPCs sent.
- Due to this, rpc_payload struct info will be present
in pmu seq struct.
- This can lead to memory corruption during unload path.
- To avoid this, return a different value for driver shutting
down scenario from fw ack function and based on this return value
free the RPC payload and release the respective pmu sequence struct.
Bug 3789998
Change-Id: I25104828d836ae37e127b40c88209da81754ffb8
Signed-off-by: Divya <dsinghatwari@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2839968
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-01-13 06:10:52 -08:00
srajum
c1a1a14086
gpu: nvgpu: Fix CERT-C L1 defects
...
- CID 588842
- CID 588848
Bug 3512545
Change-Id: Icc804715c086ce6abc1df37ed6be9ea578d01623
Signed-off-by: srajum <srajum@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2836068
Reviewed-by: Vivek Kumar (SW-TEGRA) <vivekku@nvidia.com >
Reviewed-by: Vaibhav Kachore <vkachore@nvidia.com >
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com >
2023-01-10 10:02:44 -08:00