Commit Graph

1805 Commits

Author SHA1 Message Date
Jon Hunter
9b40e459a1 nvdla: kmd: Fix compilation error
When building the DLA KMD driver with GCC 13 the following error is
observed ...

 drivers/video/tegra/host/nvdla/nvdla.c: In function ‘nvdla_remove’:
 drivers/video/tegra/host/nvdla/nvdla.c:1229:13:
   error: the comparison will always evaluate as ‘true’ for the address of
   ‘clk_cap_kobj’ will never be NULL [-Werror=address]
 1229 |         if (&pdata->clk_cap_kobj) {
      |             ^

The 'clk_cap_kobj' member of 'nvhost_device_data' structure is not a
pointer to a structure but a structure and so the address of the
structure is always true. Fix this by testing if the address of the
'clk_cap_attrs' member which is a pointer to memory that is allocated.

Bug 4190030

Change-Id: I8200155b4c0becab51924bcb4357c30163f62666
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2934411
Tested-by: Ninad Malwade <nmalwade@nvidia.com>
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com>
Reviewed-by: svc-mobile-cert <svc-mobile-cert@nvidia.com>
Reviewed-by: Ninad Malwade <nmalwade@nvidia.com>
Reviewed-by: Amit Sharma (SW-TEGRA) <amisharma@nvidia.com>
Reviewed-by: Arvind M <am@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-07-12 19:09:03 -07:00
Mahesh Kumar
2ea5632398 platform: dce: reset condition variable after use
Once we complete EVENT_ID_DCE_BOOT_COMPLETE_RECEIVED event handling, it
doesn't reset the complition variable. Which causes
dce_wait_interruptible to exit early without waiting in next cycle.

This patch fixes the same by resetting complition variable after use for
EVENT_ID_DCE_BOOT_COMPLETE_RECEIVED.

Bug 4167219

Change-Id: Id9b9047fa0e293f8616e23a5c8b4b1bacf233934
Signed-off-by: Mahesh Kumar <mahkumar@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2927740
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: Arun Swain <arswain@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-07-12 19:00:52 -07:00
Advaya Andhare
883ddf60ca NVVSE: protect shared resources through mutex
Concurrent access of shared variable causing the issue intermittently.
Conditions to wait/handle shared variable updated.
Added mutex locks to protect shared resources.

bug 4155882
Bug 4159212
jira ESSS-707

Change-Id: I3b50e39abf2dfec2ef33b813c7227fcd0634222a
Signed-off-by: Advaya Andhare <aandhare@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2928908
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: Manish Bhardwaj <mbhardwaj@nvidia.com>
Reviewed-by: Leo Chiu <lchiu@nvidia.com>
Reviewed-by: Vipin Kumar <vipink@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-07-12 04:42:12 -07:00
Advaya Andhare
967fa5d4b4 NVVSE: Implement dummy-message functionality
- Introduced interrupt state for dummy message functionality
- Added functionality for dummy-message

Change-Id: I3bac031159ea9398b4515ca354fdbc2c7d4274c6
Signed-off-by: Advaya Andhare <aandhare@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2913263
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: Manish Bhardwaj <mbhardwaj@nvidia.com>
Reviewed-by: Leo Chiu <lchiu@nvidia.com>
Reviewed-by: Vipin Kumar <vipink@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2913361
2023-07-12 04:42:06 -07:00
Manish Bhardwaj
5d872b9a0d storage: fix cert-c issue in storage driver
Using this patch we are fixing below cert error:-
1. var_deref_model: Passing null pointer bio_req to req_op,
   which dereferences it.

CID 10177627

Bug 3512545

Signed-off-by: Manish Bhardwaj <mbhardwaj@nvidia.com>
Change-Id: Id9c71a82d3adf52590816fa87b53a8965da5c105
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2933682
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: Sachin Nikam <snikam@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-07-10 16:54:20 -07:00
Johnny Liu
ff572997a3 drm/tegra: Wrap register init code in function
Put the actmon-related register initialization code in the function for
readability.

Bug 4183393

Signed-off-by: Johnny Liu <johnliu@nvidia.com>
Change-Id: Id68d128ae330105da0d3f76270fe38d57c12c740
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2931793
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
2023-07-10 10:05:47 -07:00
Johnny Liu
3264c9dfca drm/tegra: Skip non-clock update in suspend mode
When the device is in suspend mode, There is no point to update
actmon count weight and send ICC request for the device.

If ICC request is sent for the device in suspend mode, in osidle state,
the default EMC frequency will be affected due to the accumulated ICC
bandwidth QoS constraint, and affect the overall osidle power.

Bug 4168788

Signed-off-by: Johnny Liu <johnliu@nvidia.com>
Change-Id: I8700b131b5f914d93feed9f8a9d792c2fdaa9b53
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2931905
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
2023-07-07 07:01:02 -07:00
Johnny Liu
da7cd1c546 drm/tegra: Enable disable actmon in RPM callbacks
Actmon should be enabled only when engines are active.

Bug 4168788

Signed-off-by: Johnny Liu <johnliu@nvidia.com>
Change-Id: Ifb4bfe67357402266080331ea18ae2a9af2d85ee
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2931890
Reviewed-by: Santosh BS <santoshb@nvidia.com>
Reviewed-by: Bibek Basu <bbasu@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-07-07 07:00:52 -07:00
Johnny Liu
af2ced3322 gpu: host1x: Disable actmon by default
Disable actmon by default and export the controllability of enabling and
disabling the actmon.

DRM clients should enable the actmon in the runtime resume cycle, and
disable the actmon in the runtime suspend cycle.

Bug 4168788

Signed-off-by: Johnny Liu <johnliu@nvidia.com>
Change-Id: I72bcd6d92383595a41c2de5cad708610a205ba25
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2931874
Reviewed-by: Santosh BS <santoshb@nvidia.com>
Reviewed-by: Bibek Basu <bbasu@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-07-07 07:00:47 -07:00
Neelansh Mittal
34288b623d crypto: Single shot processing of input buffers
Support single shot processing for AES GMAC/CMAC/ENC/DEC
and SHA operations.

Bug 4155882
Bug 4086302

Change-Id: Ib2ef39b2fbb7493285947b118b9d1fcdeaefe5b6
Signed-off-by: Neelansh Mittal <neelanshm@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2931625
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: Manish Bhardwaj <mbhardwaj@nvidia.com>
Reviewed-by: Vipin Kumar <vipink@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-07-07 06:59:25 -07:00
Akhil R
02c4ecb369 crypto: tegra-se-nvhost: Use GFP_ATOMIC if in atomic context
Check if the request may sleep and adjust the GFP flag. This fixes
the issue of sleep during atomic context in tegra-se driver.

Bug 4146804

Signed-off-by: Akhil R <akhilrajeev@nvidia.com>
Change-Id: I40006fd0898a85ced75f49565106a9b47ed0dfd0
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2931331
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-07-07 06:58:01 -07:00
Manish Bhardwaj
309e6943e3 storage: create timer before being started.
timer was getting started evein before being created
leading to below crash. So create timer before getting
started.

[0.483364] Internal error: Oops - BUG: 0 [#1] PREEMPT_RT SMP
Modules linked in: tegra_vblk(O) tegra_hv_vblk_oops(O) tegra_hv(O) ivc_ext(O)
CPU: 10 PID: 9 Comm: kworker/u24:0 Tainted: G O 5.15.98-rt-tegra #1
[0.531518] Hardware name: p3710-0010 (DT)
[0.532301] Workqueue: vblk_req_wq1 0xffff800001271c90
[0.533268] pstate: 60400005 (nZCv daif +PAN -UAO -TCO -DIT -SSBS BTYPE=--)
[0.534552] pc : mod_timer+0x2d8/0x340
[0.535250] lr : mod_timer+0x34/0x340
[0.535936] sp : ffff80000aa13c90
[0.536539] x29: ffff80000aa13c90 x28: ffff000083c18080 x27: ffff000083c182f8
[0.537876] x26: ffff00008012de74 x25: ffff000083c182d8 x24: ffff000083c0f0b0
[0.539253] x23: 00000000fffef8b4 x22: ffff00008028e740 x21: ffff000083c18280
[0.540547] x20: 0000000000000000 x19: ffff000083c183d8 x18: 0000000000000001
[0.541860] x17: 00000000000002b5 x16: ffff800001271c90 x15: 0000000000000003
[0.543184] x14: 0000000000000000 x13: 0000000000000020 x12: 0101010101010101
[0.544549] x11: 7f7f7f7f7f7f7f7f x10: fefefeff3070765e x9 : ffff00008012de74
[0.545885] x8 : fefefefefefefeff x7 : 0000000000000278 x6 : ffff00008012de74
[0.547213] x5 : 7165725f6b6c6276 x4 : 0000000000001000 x3 : ffff000083c18080
[0.548554] x2 : 0000000000000000 x1 : 00000000fffef8b4 x0 : 0000000000000000
[0.549938] Call trace:
[0.550406]  mod_timer+0x2d8/0x340
[0.551070]  0xffff800001271e0c
[0.551672]  process_one_work+0x1f4/0x520
[0.552406]  worker_thread+0x58/0x450
[0.553071]  kthread+0x198/0x1c0
[0.553685]  ret_from_fork+0x10/0x20

JIRA ESLC-7516

Signed-off-by: Manish Bhardwaj <mbhardwaj@nvidia.com>
Change-Id: I9160c0bc0907880cb128e4245383adf3a4ddb021
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2931256
Tested-by: Advaya Andhare <aandhare@nvidia.com>
Reviewed-by: Kasinadha Dendukuri <kdendukuri@nvidia.com>
Reviewed-by: Sachin Nikam <snikam@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-07-07 06:57:31 -07:00
Yi-Wei Wang
8e50cfd8ed driver: hwmon: Add f75308 hardware monitor driver
This change adds support for the hardware monitors of the f75308 series
that provide temperature readings, voltage readings, rpm readings, pwm
readings / writings and fan settings.

Bug 3854473
Bug 4129043

Signed-off-by: Yi-Wei Wang <yiweiw@nvidia.com>
Change-Id: If0ece9024d8a41f5935eeef3d44d907157989e26
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2911024
Reviewed-by: Rajkumar Kasirajan <rkasirajan@nvidia.com>
Reviewed-by: Jonathan Hunter <jonathanh@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-07-07 06:47:37 -07:00
Manish Bhardwaj
ef4d81b7d7 storage: fix cert-c issue in storage driver
Using this patch we are fixing below cert error:-
1. cert_exp33_c_violation: Using uninitialized value
   ioctl_req->status when calling vblk_complete_mmc_multi_ioc.

CID 646845

Bug 3512545

Signed-off-by: Manish Bhardwaj <mbhardwaj@nvidia.com>
Change-Id: I7127dbbc3259a8f42dac5003a56e0aa932053f81
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2930565
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: Sachin Nikam <snikam@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-07-05 14:56:29 -07:00
Johnny Liu
2529d12c52 platform: tegra: Fix overflow before widen
To avoid overflow, cast mc_all_actives to type u64.

Bug 3952896

CID 10174209

Signed-off-by: Johnny Liu <johnliu@nvidia.com>
Change-Id: Ic49e56652e32a042f884a7f02aa4c4a878a592d0
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2930556
Reviewed-by: Sachin Nikam <snikam@nvidia.com>
Reviewed-by: svcacv <svcacv@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-07-05 14:56:22 -07:00
Johnny Liu
3db3e1ee88 devfreq: Disable watermark when switching governor
Before switching to another governor, tegra_wmark governor should
disable watermarks so that watermark interrupts won't get triggered and
occupy the CPU resource.

Bug 4180241

Signed-off-by: Johnny Liu <johnliu@nvidia.com>
Change-Id: I7aa5611445153b63e4849f4c077ef5fa9fbf4c88
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2930457
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: Rajkumar Kasirajan <rkasirajan@nvidia.com>
Reviewed-by: Bibek Basu <bbasu@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-07-05 14:55:56 -07:00
Johnny Liu
4241a7c976 drm/tegra: Export active signal to actmon
As long as the subcomponents in the engine are active, we consider the
engine as active and the engine should export active signal to the
actmon.

Bug 4179140

Signed-off-by: Johnny Liu <johnliu@nvidia.com>
Change-Id: Ic4cccf29e8ac87da24f6fe3bf1f1e93a11511762
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2930445
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: Rajkumar Kasirajan <rkasirajan@nvidia.com>
Reviewed-by: Bibek Basu <bbasu@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-07-05 14:55:49 -07:00
Jon Hunter
deffbf24ab virt: tegra: Ensure functions stubs are defined
When building the out-of-tree drivers with virtualization support
disabled, symbols for some of the virtualization functions are not found
...

 nvgpu: Unknown symbol tegra_hv_mempool_unreserve (err -2)
 nvgpu: Unknown symbol is_tegra_hypervisor_mode (err -2)
 nvgpu: Unknown symbol tegra_hv_mempool_reserve (err -2)
 nvhost_pva: Unknown symbol is_tegra_hypervisor_mode (err -2)
 mc_utils: Unknown symbol is_tegra_hypervisor_mode (err -2)
 mc_utils: Unknown symbol is_tegra_hypervisor_mode (err -2)

Update the hv-ivc.h header to ensure that these function stubs are
defined when virtualization support is disabled and only build the
hv-ivc driver if virtualization is enabled.

Finally, move populating the ccflags to the top-level Makefile and use
the subdir-ccflags directive to ensure the ccflags are passed to all
sub-directories.

Bug 4159372
Bug 4170085

Change-Id: I35edb91007524c3143dff7564f9ad545bd34e969
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2921199
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
2023-07-05 14:34:15 -07:00
Abhilash G
e3e15a3cb1 scsi: ufs: Fix UFS CBB errors
Fix UFS CBB errors by using the vendor register for
T234 instead of T194.

Bug 4089453

Change-Id: Ic54b2eea6822d459a6103d15eb60ff2d595fc256
Signed-off-by: Abhilash G <abhilashg@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2906058
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: Mallikarjun Kasoju <mkasoju@nvidia.com>
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-07-05 14:27:39 -07:00
Ashish Mhetre
9207ceb10a video: tegra: nvmap: Add support for sgt caching
Deferred dmabuf unmapping is being removed from kernel.
So, add similar support to cache sgt in NvMap.
During map_dma_buf() call, NvMap will create a mapping and an sgt
corresponding to it. It will also cache this sgt.
When unmap_dma_buf() is called for same sgt, NvMap will not unmap
the mappings. It will simply return from there.
Next time when the mapping request comes for same dmabuf, it will
look for existing sgt in cache and return it. This significantly
reduces mapping overhead for same buffer when it's mapped and unmapped
multiple times.
Free the sgt and unmap only when corresponding buffer is freed. When
all references from a buffer are removed, dmabuf_release() will be
called where sgt will be freed.

Bug 4064339

Change-Id: I7ed767ecaaac7aa44e6576e701b28537b84986ec
Signed-off-by: Ashish Mhetre <amhetre@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2925224
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: Sachin Nikam <snikam@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-07-03 21:14:42 -07:00
Jon Hunter
ad2857ccaa soc/tegra: Clean-up fuse-helper
The option CONFIG_TEGRA_FUSE_UPSTREAM is not needed any longer because
we always want to enable this for Linux v5.15. Therefore, remove this
option completely.

The function tegra_fuse_control_read() is not used anywhere and so we
can also remove this too.

Bug 3777983

Change-Id: I37888bc1f615f72b245c027e5c1a9251aca08af4
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2925233
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-by: svcacv <svcacv@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-07-03 15:08:36 -07:00
Manish Bhardwaj
eab559cc9d nvidia: Optimize the request slots for queueing
instead of having fixed memory slots of size 512KB
in mempool we are going to create memory slots at
runtime based on size of the request to be processed.

Bug 3777610

Signed-off-by: Manish Bhardwaj <mbhardwaj@nvidia.com>
Change-Id: Ib9b36798109c4a0a79765278a3b6a59a8c362756
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2906754
Reviewed-by: Suresh Venkatachalam <skathirampat@nvidia.com>
Reviewed-by: Sandeep Trasi <strasi@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-07-03 06:15:10 -07:00
Vishwaroop A
41b335e6a1 spi: tegra-quad: add support for prod framework
Write production settings through prod framework

Bug 4165918

Signed-off-by: Vishwaroop A <va@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2924617
(cherry picked from commit c7cf9886e781e46385212ba1b821900488e39132)

Change-Id: I514f19ffdf1749c2e6935714bba68d0bf049954a
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2929348
Reviewed-by: Vishwaroop A <va@nvidia.com>
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
Tested-by: Vishwaroop A <va@nvidia.com>
2023-07-02 10:02:21 -07:00
Akshata
25b08cb82d dla: kmd: Update fuse register read for K5.15
+ Enabled the logic to read the DLA Fuse registers
directly for K5.15
+ Required for setting up the correct DLA instance on
fused boards like TA983

Bug 4156086

Change-Id: I23addb28c54466979fd88a1b3c65960b10f946ca
Signed-off-by: Akshata Bhat <akshatab@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2929422
Reviewed-by: Maxim Grigoriev (SW-GPU) <maximg@nvidia.com>
Reviewed-by: Arvind M <am@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-07-01 13:42:26 -07:00
omar
fbcd05f070 drivers: pva: fix desc check with bl and hwseq
when hw sequencer is in use, BL format is supported and
block height log2 needs to be retrieved form channel.

*retrieve block height information while walking descriptor list.

Bug 4166395

Change-Id: Ie6f71c107b74eb01a547baf24ff621ac3446d522
Signed-off-by: omar <onemri@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2929277
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: Lachlan Dowling <ldowling@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-06-30 18:02:05 -07:00
omar
2e1f1dca9e drivers: pva: fix coding style violations
fix various coding style errors and warnings

Bug 4096967

Change-Id: If31fb063a19df8a3329710899b349019508dcd15
Signed-off-by: omar <onemri@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2929265
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-06-30 18:02:00 -07:00
Vedashree Vidwans
569541dfb9 tegra: mc-hwpm: update remove driver function
Update remove function in mc-hwpm driver to include missing HWPM
unregister call.

Jira THWPM-8

Change-Id: I1698860647214472e75503e0fd77594e105b2913
Signed-off-by: Vedashree Vidwans <vvidwans@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2924754
Reviewed-by: Adeel Raza <araza@nvidia.com>
Reviewed-by: Ashish Mhetre <amhetre@nvidia.com>
Reviewed-by: Vasuki Shankar <vasukis@nvidia.com>
Reviewed-by: Seema Khowala <seemaj@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-06-30 17:56:13 -07:00
Laxman Dewangan
a8454b9a5f rtcpu: remove unused drivers for clk, drive and reset groups
Remove unused module drivers from build as the drivers
are integrated with client driver as single module.
Drivers which are getting removed are:
         clk-group
         device-group
         reset-group

These drivers was restored due to packaging error in
release branch which is fixed now.

Change-Id: I094e62ae2a83eb7816c98bf113c5a74f2636a41f
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2929127
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-06-30 13:05:59 -07:00
Manish Bhardwaj
16d1e13a3b mttcan: fix compilation error for android
1. nvidia-oot/drivers/net/can/mttcan/native/../
   include/m_ttcan_linux.h:35:10:
   fatal error: 'linux/tegra_prod.h' file not found
         ^~~~~~~~~~~~~~~~~~~~
   1 error generated.

2. nvidia-oot/drivers/net/can/mttcan/hal/m_ttcan.c:330:6:
   warning: unused variable _tdcr_reg_ [-Wunused-variable]
   330 |  u32 tdcr_reg;
      |      ^~~~~~~~

Bug 4174549

Signed-off-by: Manish Bhardwaj <mbhardwaj@nvidia.com>
Change-Id: I57ae8d1234745996fb1277c64c632d2d1026a870
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2928348
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-by: Bruce Xu <brucex@nvidia.com>
Tested-by: Bruce Xu <brucex@nvidia.com>
2023-06-30 13:01:41 -07:00
Sushil Kumar Singh
6dc4368ca0 realtek: r8168: Enable r8168 pcie ethernet in k5.15
- Enable r8168 downstream pcie ethernet driver for k5.15
- Update driver version to 8.051.02
- Makefile updated to support compilation in oot repo

Bug 4080753
Bug 4097309

Change-Id: Ia5fcd99fb4701273b83bede35f4e8f4dea5c67e0
Signed-off-by: Sushil Kumar Singh <sushilkumars@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2908443
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
Tested-by: Brad Griffis <bgriffis@nvidia.com>
Reviewed-by: Brad Griffis <bgriffis@nvidia.com>
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
2023-06-29 18:52:05 -07:00
Bharat Nihalani
1f9587aca3 drivers: Fix build errors with DEBUGFS_FS disabled
When CONFIG_DEBUG_FS is disabled, build errors are seen in the
following 2 drivers:

1. bpmpfw - The build error was seen because bpmp-debugfs.c was
getting compiled even when CONFIG_DEBUG_FS was disabled.

2. ufs - The build error was seen due to a couple of reasons:
- Function debugfs_provision_init is defined in a file that is
protected with CONFIG_DEBUG_FS, but is called from another file
unconditionally.
- In ufs-tegra-common.c, there are calls to debugfs_* functions, but
inclusion of the standard header debugfs.h is protected under
CONFIG_DEBUG_FS.

Fix these issues with this change.

Bug 4164776

Change-Id: Iae6384fd2352e55aed2a0ea85e778be6c26a4d54
Signed-off-by: Bharat Nihalani <bnihalani@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2926891
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-06-28 08:27:28 -07:00
Johnny Liu
0da771f275 devfreq: Support suspend and resume in tegra_wmark
When devfreq_suspend_device get called, tegra_wmark will disable the
upper and lower watermark thresholds so that no DFS logic get triggered
after the suspension.

When devfreq_resume_device get called, tegra_wmark will enable back the
upper and lower watermark thresholds so that interrupt-driven DFS logic
can work properly.

Bug 4168788

Signed-off-by: Johnny Liu <johnliu@nvidia.com>
Change-Id: I98fa1487db26fdfe95f5c958dbe15bf0f49035d5
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2927019
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: Mikko Perttunen <mperttunen@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-06-28 02:06:25 -07:00
Manish Bhardwaj
df0489a1e0 CAN: program prod setting for tdcr register
Using this patch we are programming tdcr register
of can controllers based on the data speed.

Bug 4165928

Change-Id: I4d3f9426695b4ac19bef144f242dcf74371c00b7
Signed-off-by: Manish Bhardwaj <mbhardwaj@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2924921
Reviewed-by: Suresh Venkatachalam <skathirampat@nvidia.com>
Reviewed-by: Krishna Yarlagadda <kyarlagadda@nvidia.com>
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-06-28 01:58:03 -07:00
Laxman Dewangan
821e738ecc rtcpu: Add drivers for clk, drive and reset groups
Add the following driver back into build to avoid
the packaging error in release branch to avoid
package error:
     clk-group
     device-group
     reset-group

These drivers will be deleted after release branch is updated
with proper packaging.

Change-Id: I128a3fee5d0fb19c78321845b06deb023f233a59
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2926512
Reviewed-by: svcacv <svcacv@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-06-27 09:28:50 -07:00
Revanth Kumar Uppala
306f33d38e nvethernet: Read instance_id irrespective of macsec.
Issue:
MGBE0 ASID is getting programmed for all the MAC instances
which inturn causing the data transfer failures.Macsec is not enable
and hence instance_id is not getting updated to the corresponding mac
instance number and hence all mac instance_id's are initialized with 0.
Since ASID programming is based on mac instance_id, all MACs are
programmed with MGBE0 MAC instance id.

Fix:
Moved reading of instance_id from DT out of macsec_probe and hence the
instance_id gets updated irrespective of MAC sec enable/disable.

Bug 4124937

Change-Id: I500ed8d3db402995488260af99ad190217ff6dd2
Signed-off-by: Revanth Kumar Uppala <ruppala@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2925252
Reviewed-by: Narayan Reddy <narayanr@nvidia.com>
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-06-27 09:23:14 -07:00
yashi
ae9cb66d77 Protect FFA sync_send_receive with a single mutex
- In sync_send_receive only support access from a single
    thread at a time.  Add the mutex to protect multi-instance

  - This patch is imported from
    https://p4sw-swarm.nvidia.com/changes/32944487

Bug 4135491
Change-Id: Icdcce1df570639e580fbe238ee6260fd2178ef20
Signed-off-by: Yang Shi <yashi@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2920915
Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>
Reviewed-by: Chris Dragan <kdragan@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-06-26 06:16:10 -07:00
omar
3de8696710 drivers: pva: HW seq security checks
Add HW Sequencer security checks and fix block linear
addressing checks.

Bug 4124717
Bug 4096967

Change-Id: I5bf359eda678f1267127748353941606c527f691
Signed-off-by: omar <onemri@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2923245
Reviewed-by: Lachlan Dowling <ldowling@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-06-24 14:16:48 -07:00
Jeremy Alves
ee70adda3e Lan7431- NVIDIA specific changes to Lan7431 drv
Adding NVIDIA specific changes to Lan7431
for K515 driver

These changes support "userland phy driver"

Bug 3956901

Change-Id: I0f11e3cb95742bb0bac9bec7638d03552074dd23
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2924162
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
Tested-by: Jeremy Alves <jalves@nvidia.com>
Reviewed-by: Jeremy Alves <jalves@nvidia.com>
Reviewed-by: Sumeet Gupta <sumeetg@nvidia.com>
2023-06-24 07:40:45 -07:00
Jon Hunter
c2c17e16c9 net: nvethernet: Fix nvethernet for Linux v6.3
Commit db1a63aed89c ("net: phy: Remove fallback to old C45 method")
removes a fallback C45 method in the MDIO bus driver. This breaks
nvethernet support for Linux v6.3 and the following errors are observed.

 failed to register MDIO bus (nvethernet_mdio_bus)
 net eth0: failed to register MDIO bus

Fix this by adding the necessary read/write_c45 callbacks in the
nvethernet driver. Note these callbacks are only supported for Linux
v6.3+ kernels.

Bug 4014315

Change-Id: Ia6ab753941db0515799657da8522f32996d0852a
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2924619
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Revanth Kumar Uppala <ruppala@nvidia.com>
Reviewed-by: Narayan Reddy <narayanr@nvidia.com>
2023-06-24 07:28:08 -07:00
Manish Bhardwaj
61f67509a8 hvc_sysfs: delete kernel object
delete kernel object if driver initialization
gets failed

Bug 4080433

Change-Id: Iabe0cabf32a067224f6e17a5e54a1c7d90161c16
Signed-off-by: Manish Bhardwaj <mbhardwaj@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2921795
Reviewed-by: Suresh Venkatachalam <skathirampat@nvidia.com>
Reviewed-by: Sandeep Trasi <strasi@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-06-24 07:26:30 -07:00
Abhijit
16a076bf64 net: can: mttcan: fix mttcan close in case of PXE
When mttcan
- is set into DAR (Disable Automatic Retransmission) mode
- and Protocol Exception Handling is enabled
- and PXE (Protocol Exeception Event) is generated
then no TCF (Transmission cancellation Finished) event is generated.
This leads to mismatch between internal driver state and mttcan HW
state. This results in "no buffer space available" error.

This patch clears the driver internal state in close callback to
handle this situation.

Bug 200502350

Change-Id: Ie9f8fcc902a8d9b6c65662888904be5ad9aae49e
Signed-off-by: Abhijit <abhijit@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2854706
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2921328
Tested-by: Manish Bhardwaj <mbhardwaj@nvidia.com>
Reviewed-by: Manish Bhardwaj <mbhardwaj@nvidia.com>
Reviewed-by: Suresh Venkatachalam <skathirampat@nvidia.com>
Reviewed-by: Sandeep Trasi <strasi@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-06-24 07:26:26 -07:00
Manish Bhardwaj
37af2918e5 nvidia: vblk: add timer support
Using this patch we are adding timer support for each
request going to storage server with timeout value
of 30 secs just to track request hungs on storage
server.

JIRA ESLC-7429

Signed-off-by: Manish Bhardwaj <mbhardwaj@nvidia.com>
Change-Id: Ief13c0ad0308d548cea34bada047da1714b19e08
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2900572
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: Suresh Venkatachalam <skathirampat@nvidia.com>
Reviewed-by: Sandeep Trasi <strasi@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-06-24 07:26:21 -07:00
Ankur Pawar
8a40c778bf media: add ar1335 sensor driver
Add ar1335 camera sensor driver code,
firmware bin and makefile changes.

Bug 3583587
Bug 4111978

Change-Id: I340eb797233fb62ca9e107d0f774f1110e4c27fe
Signed-off-by: Ankur Pawar <ankurp@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2889070
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-by: Semi Malinen <smalinen@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-06-24 07:23:21 -07:00
Laxman Dewangan
44ece33f27 drivers: Remove Kconfigs
There is no need of the CONFIG_* for oot modules
and hence remove the Kconfig from modules
directory.

Bug 4078035

Change-Id: I78ca8b7f123fb92c410e8443c4056a67dcf280b5
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2923232
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-06-22 23:39:27 -07:00
Laxman Dewangan
0ea187142e Makefile: Add missing license files
Add lincese and copyright information on Makefile
where it is missing.

Bug 4078035

Change-Id: I4d44143c186a30aabacb706b7db6549131c6e4d6
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2924242
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-06-22 23:39:23 -07:00
Keyur Sheth
4c53e849c3 drivers: pva: specific error for VPU app auth
In case of VPU app authentication failure,
return a specific error code EACCES to
userspace.

Bug 4132218

Change-Id: I14fd39858c4d2aae5afe1246961a39c3a1df4bff
Signed-off-by: Keyur Sheth <ksheth@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2923768
Reviewed-by: Vivek Bangera <vbangera@nvidia.com>
Reviewed-by: Yogesh Solanke <ysolanke@nvidia.com>
Reviewed-by: Omar Nemri <onemri@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-06-22 11:24:05 -07:00
Jeremy Alves
c00985b068 Lan7431 - vanilla driver of Lan7431 from upstream
Adding unmodified Lan7431 driver to nvidia-oot

This is the unmodified driver from
  K5.15.110
  from commit cd612ec8f71740b0fc9f47d3356b23561b5761dc

For future kernels we'll need to add the driver sources
from the respective kernel

Bug 3956901

Change-Id: I376c63ceeb6aeab9ce5d17dcd3c09401217c576a
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2920947
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
Tested-by: Jeremy Alves <jalves@nvidia.com>
Reviewed-by: Jeremy Alves <jalves@nvidia.com>
Reviewed-by: Sumeet Gupta <sumeetg@nvidia.com>
2023-06-22 11:10:09 -07:00
Praveen James
38152fe335 tegra-fsicom: fix deinit notification to fsi driver
fix for sc7 failure with FSI disabled build.
Deinit notification is send if fsi is flashed with
production fw.

Bug 4082254

Change-Id: I195369d040df96727b1d7a626fb9e37453d48bbf
Signed-off-by: Praveen James <pjames@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2906587
Reviewed-by: Rahul Bedarkar <rabedarkar@nvidia.com>
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-06-22 00:50:19 -07:00
Gerrit Code Review
8a44e8b8b1 Merge "nvadsp: Merge nvadsp from kernel/nvidia to kernel/nvidia-oot" into dev-main 2023-06-21 19:40:20 -07:00
Yi-Wei Wang
5d14eb10df nvpmodel: Remove legacy nvpmodel-emc-cap driver
The driver has been switched to nvpmodel-clk-cap so remove legacy
nvpmodel-emc-cap.

Bug 3997304

Signed-off-by: Yi-Wei Wang <yiweiw@nvidia.com>
Change-Id: Ic11c29b8cb360b8d591ed94db74ba3f12663f068
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2921042
Reviewed-by: Johnny Liu <johnliu@nvidia.com>
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-06-21 13:25:26 -07:00