Commit Graph

2387 Commits

Author SHA1 Message Date
Nagarjuna Kristam
55e4803b61 PCI: tegra194: Ring doorbell If DMA is not running
Issue:
During multi threaded testing, there are cases where EDMA HW enters
stopped state even through there are pending descriptors to process.
This happens even when doorbell is rung after updating descriptors and
barriers places.

Fix:
After processing channel interrupt, ring doorbell, if there are pending
descriptors and for that channel is not running.

Bug 4111305

Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2905177
Change-Id: I9d1bd391f690abc58cf262f62606c42504150b13
Signed-off-by: Nagarjuna Kristam <nkristam@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2910921
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
2023-05-30 07:40:00 -07:00
Nagarjuna Kristam
37956be9b4 PCI: EPF: dma-test: Remove dead code
pci-epf-dma-test is initially written with DMA programming part of
it. Now DMA driver is available separate and DMA programming part of
this driver conflicts with actual programming and results in unexpected
behaviour. Remove non DMA driver test interaction code.

Bug 4124875

Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2907365
Change-Id: Id86ea10d64c13381d4931aa742ba530e0295d10f
Signed-off-by: Nagarjuna Kristam <nkristam@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2910916
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com>
Reviewed-by: svc-mobile-cert <svc-mobile-cert@nvidia.com>
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: Bitan Biswas <bbiswas@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-05-30 07:39:29 -07:00
Nagarjuna Kristam
c150e5bd00 Misc: pci-dma-test: Remove dead code
tegra-pcie-dma-test is initially written with DMA programming part of
it. Now DMA driver is available separate and DMA programming part of
this driver conflicts with actual programming and results in unexpected
behaviour. Remove non DMA driver test interaction code.

Bug 4124875

Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2908378
Signed-off-by: Nagarjuna Kristam <nkristam@nvidia.com>
Change-Id: I0266899ef1a9394b73084191053b35163905617e
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2910914
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com>
Reviewed-by: svc-mobile-cert <svc-mobile-cert@nvidia.com>
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: Bitan Biswas <bbiswas@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-05-30 07:39:18 -07:00
Nagarjuna Kristam
ffda313d72 PCI: tegra194: Fix edma desc size for remote EDMA
For Remote EDMA desc size is not updated and this results in
error during IRQ processing. Fix the same

Bug 4130564

Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2909597
Signed-off-by: Nagarjuna Kristam <nkristam@nvidia.com>
Change-Id: I5129f258a60139fe0f9e6c1226d0faf7c546f488
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2910912
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com>
Reviewed-by: svc-mobile-cert <svc-mobile-cert@nvidia.com>
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: Bitan Biswas <bbiswas@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-05-30 07:39:08 -07:00
Ankur Pawar
f93dd37a22 media: add lt6911uxc sensor driver
Add lt6911uxc HDMI->CSI sensor driver code,
This driver is copied K5.10 camera driver repo.

Bug 3583587
Bug 4111965

Change-Id: Ib01ac4c4d7d44073858009a8b41c42fa7083c020
Signed-off-by: Ankur Pawar <ankurp@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2793944
Reviewed-by: Praveen AC <pac@nvidia.com>
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-by: Shubham Chandra <shubhamc@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-05-30 07:33:01 -07:00
Mikko Perttunen
c8025c218b gpu: host1x: Wait prefences outside MLOCK
The current submission opcode sequence first takes the engine MLOCK,
and then switches to HOST1X class to wait prefences. This is fine
while we only use a single channel per engine and there is no
virtualization, since jobs are serialized on that one channel anyway.
However, when that assumption doesn't hold, we are keeping the
engine locked while not running anything on it while waiting for
prefences to complete.

To resolve this, execute wait commands in the beginning of the job
outside the engine MLOCK. We still take the HOST1X MLOCK because
recent hardware requires register opcodes to be executed within some
MLOCK, but the hardware also allows unlimited channels to take the
HOST1X MLOCK at the same time.

Jira HOSTX-4687

Signed-off-by: Mikko Perttunen <mperttunen@nvidia.com>
Change-Id: I783cbc7f1bbd7415fbf0e61163935186b2ba0a44
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2911124
Reviewed-by: Santosh BS <santoshb@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-05-29 15:08:46 -07:00
Matti Ryttylainen
c9146a4fd9 camera: Enable deferred unmapping for vi/isp
Enable deferred dma buffer unmapping for vi/isp devices

Bug 4067905

Change-Id: I193f762d580d1e0477137f57195b2cb81d4b9d91
Signed-off-by: Matti Ryttylainen <mryttylainen@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2910545
Tested-by: Ashish Mhetre <amhetre@nvidia.com>
Reviewed-by: Ashish Mhetre <amhetre@nvidia.com>
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com>
Reviewed-by: svc-mobile-cert <svc-mobile-cert@nvidia.com>
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: Kalle Jokiniemi <kjokiniemi@nvidia.com>
Reviewed-by: Frank Chen <frankc@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-05-29 04:03:27 -07:00
Akshay Tigga
d4d60fd1f8 Fix "Section mismatches detected"
Error:
Section mismatch in reference from the function
tegra_hv_probe() to the function .init.text:tegra_hv_setup()

Bug 3974840

Change-Id: Ie63e9db981836345512a0678e39b0574384e6c5a
Signed-off-by: Bruce Xu <brucex@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2901637
(cherry picked from commit ac941e3f8846fb4a7e20cf6df86e12be847bc530)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2910057
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: Shardar Mohammed <smohammed@nvidia.com>
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
Tested-by: Shardar Mohammed <smohammed@nvidia.com>
2023-05-29 03:55:50 -07:00
Akshay Tigga
75ac42b84c WAR: Add "VFS_internal_I_am_really_a_filesystem_and_am_NOT_a_driver"
Android common kernel prevents the use of symbols exported from the
fs subsystem in other modules. As a WAR we need to explicity import
"VFS_internal_I_am_really_a_filesystem_and_am_NOT_a_driver"
until the migration is complete to remove the use of such symbols.

Bug 3974840

Change-Id: Icb47eba34d069ec287e5ad5bd2e046b0f96f401c
Signed-off-by: Bruce Xu <brucex@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2901632
(cherry picked from commit bfd7dc903f050f778f105af07e4ddfbde8497881)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2910053
Reviewed-by: Shardar Mohammed <smohammed@nvidia.com>
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
Tested-by: Shardar Mohammed <smohammed@nvidia.com>
2023-05-29 03:55:46 -07:00
brucex
ced8d91df7 tegra_hv_vcpu_yield_ioctl: Fix header #ifdef
Incorrect header protection led to build error with clang (used to build
android common kernel)

Bug 3974840

Signed-off-by: Bruce Xu <brucex@nvidia.com>
Change-Id: I3a6ba014fbad24561ef5f46b313596876c227a49
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2895935
(cherry picked from commit 49dc6cf08e312d1bb0900ea890e22cd931c25f39)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2859501
Reviewed-by: Shardar Mohammed <smohammed@nvidia.com>
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
Tested-by: Shardar Mohammed <smohammed@nvidia.com>
2023-05-29 03:55:41 -07:00
brucex
1ce0ed3f5b tegra_hv_net: Fix wrong var type
mac_address is defined wrongly and it does not
match the return type of function of_get_mac_address.

Bug 3974840

Signed-off-by: Bruce Xu <brucex@nvidia.com>
Change-Id: I582c3755b0e2121b2e937dc77b3f9af8694e4357
(cherry picked from commit 8f8de48950266048eaf142cbdec66b1b7ccf0737)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2859221
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: Shardar Mohammed <smohammed@nvidia.com>
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
Tested-by: Shardar Mohammed <smohammed@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-05-29 03:55:37 -07:00
Manish Bhardwaj
3a6ae071af nvidia: add no_sanitize_address attribute
add no_sanitize_address attribute if KASAN is enabled

Bug 4121072

Signed-off-by: Manish Bhardwaj <mbhardwaj@nvidia.com>
Change-Id: I2bb4b60f0e95e7b93d792010474d6503b97ac392
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2908208
Tested-by: Tonny Liang <tonnyl@nvidia.com>
Reviewed-by: Sachin Nikam <snikam@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-05-24 08:59:12 -07:00
omar
8a8d6ba182 drivers: pva: boot parameters to FW in mailboxes
Change FW boot to not program segment registers directly.
Instead the values are passed in mailboxes at boot time and
FW will progbram the registers.

In virtualized environments, KMD will not have access to these
registers.

Bug 3971973

Change-Id: Iea935cbb9fb7898d229935da7b6495a325f24356
Signed-off-by: omar <onemri@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2899228
Reviewed-by: svcacv <svcacv@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2908814
2023-05-24 08:49:31 -07:00
Jon Hunter
05bfbdef14 platform: tegra: rtcpu: Rename debug driver
The name of rtcpu's debug kernel module, debug.ko, is not very
descriptive and for users it is unclear what subsystem this 'debug'
kernel module is used by. So rename this to 'rtcpu-debug.ko' so that it
is clear this belongs to the camera subsystem.

Bug 4078936

Change-Id: I77da43fb0d54d1ea058f4c3d6c313f49a85b7cfa
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2890897
Reviewed-by: Matti Ryttylainen <mryttylainen@nvidia.com>
Reviewed-by: Frank Chen <frankc@nvidia.com>
Reviewed-by: Ankur Pawar <ankurp@nvidia.com>
Tested-by: Ankur Pawar <ankurp@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-05-24 02:47:39 -07:00
Chris Dragan
f88f38ce92 remove support for T194 display
Bug 4115277

Change-Id: I2ae6997686aa739c3b2d4cb81a01a07d5121514c
Signed-off-by: Chris Dragan <kdragan@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2907311
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: Sachin Nikam <snikam@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-05-23 20:56:48 -07:00
Jon Hunter
9a3174280f platform: tegra: Remove CVNAS driver
The CVNAS driver is not needed for Tegra234 and future devices. Remove
the CVNAS driver and support for CVNAS from DLA, NVMAP and PVA dirvers.

Bug 4037930

Change-Id: I5d1ae3c195485cb094f9b9b480f91d81fd04687c
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2903848
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
2023-05-23 20:56:08 -07:00
Kartik
966af3a139 watchdog: tegra: Add virtualization support
Tegra TKE WDT can be used from a Guest OS to check if the system is
responsive. In case of system hang/crash the WDT should report an
error event to HSM.

Add device tree property "nvidia,wdt-error-threshold" to configure
expiry level for HSM event trigger.

This patch also includes following bug fixes:
 - fix an issue in which WDT keeps running after system shutdown even
   if it is disabled from device tree.
 - fix an issue where the driver keeps patting WDT even if
   enable-on-init is disabled.

Bug 4080471

Change-Id: I8e660e68edbb7c97fa8fb2fdd7fafa8bf2a87884
Signed-off-by: Kartik <kkartik@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2903911
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
(cherry picked from commit ff027900b83e985e50c78adf2b898ad078d5b60a)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2897226
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-05-22 19:14:42 -07:00
Ashish Mhetre
db78501061 video: tegra: nvmap: Adding NvMap config for deferred unmap
Add NvMap config for enabling/disabling deferred dma-buf unmapping.
Keep it disabled by default and enable it based on
CONFIG_DMABUF_DEFERRED_UNMAPPING.

Bug 4067905
Bug 4115589

Change-Id: Ib1ee63cdd61a346f2f9894bb3caf406ae5f159c5
Signed-off-by: Ashish Mhetre <amhetre@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2905251
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com>
Reviewed-by: svc-mobile-cert <svc-mobile-cert@nvidia.com>
Reviewed-by: Sachin Nikam <snikam@nvidia.com>
Reviewed-by: Jonathan Hunter <jonathanh@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-05-22 06:37:37 -07:00
Akshata
2e59846460 nvdla: kmd: Add ftrace support
+ Replace eventlib with ftrace for Linux-OOT kernel
+ Added event logging for:
 * job_submit
 * job_prefence
 * job_postfence
 * job_timestamps

JIRA DLA-6820

Change-Id: I4d1ad1b535b2422257e9e1dce8d94ee317c65feb
Signed-off-by: Akshata Bhat <akshatab@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2906273
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com>
Reviewed-by: svc-mobile-cert <svc-mobile-cert@nvidia.com>
Reviewed-by: Amit Sharma (SW-TEGRA) <amisharma@nvidia.com>
Reviewed-by: Arvind M <am@nvidia.com>
Reviewed-by: Ken Adams <kadams@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-05-20 07:31:01 -07:00
Laxman Dewangan
a4136b7e63 platform: tegra: Remove firmware class and inventory drivers
Remove firmware class and firmware inventory modules drivers
as these are not used anymore.

Bug 4090910

Change-Id: Ibef41b6ba026a6d6f24ec79b4b7aaa47bc62632a
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2905556
Reviewed-by: Jonathan Hunter <jonathanh@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-05-20 07:29:16 -07:00
Dipesh Gandhi
95e971616e cdi-dev: Add TPS2H160B support
Add TPS2H160B device PoC support for p3898 platform

Bug 4066218

Change-Id: I9b237d233614e1a23b08b91101db9be9db8e4958
Signed-off-by: Dipesh Gandhi <dipeshg@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2885804
(cherry picked from commit ab43d7eab8918cad5afccc1b7cb66b3ee65bf08f)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2889935
Reviewed-by: Frank Chen <frankc@nvidia.com>
Reviewed-by: Aniket Bahadarpurkar <aniketb@nvidia.com>
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com>
Reviewed-by: svc-mobile-cert <svc-mobile-cert@nvidia.com>
Reviewed-by: Shiva Dubey <sdubey@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-05-20 07:25:24 -07:00
Laxman Dewangan
06859203ea remove file kernel-src-files-copy-list.txt
All drivers from the kernel/nvidia are copied to
kernel/nvidia-oot. Hence, remove the file which
has list of files/directories which were needed
to copy at build time.

bug 4038415

Change-Id: I7748a95e1d162daabbc50dcf2f171ebac235665c
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2905496
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-05-18 23:47:09 -07:00
Revanth Kumar Uppala
0a8365166e nvethernet:Fix compilation errors in Linux safety
Issue:
Observed below compilation issues
on the nvethernet driver for DRIVE Linux safety
builds as some macros/functions are defined with
"OSI_STRIPPED_LIB" protection but they are used
directly without any protection.

1./automotive-dev-main-20230516T005516255/out/embedded-linux-generic-release-safety/nvidia/kernel-rt_patches-nvidia-oot/nvidia-oot/drivers/net/ethernet/nvidia/nvethernet/sysfs.c:2641:33: error: ‘OSI_INSTANCE_ID_EQOS’ undeclared (first use in this function)
 2641 |    if (osi_core->instance_id == OSI_INSTANCE_ID_EQOS)
      |                                 ^~~~~~~~~~~~~~~~~~~~

2./automotive-dev-main-20230516T005516255/out/embedded-linux-generic-release-safety/nvidia/kernel-rt_patches-nvidia-oot/nvidia-oot/drivers/net/ethernet/nvidia/nvethernet/sysfs.c:2733:3: error: ‘dev_attr_hsi_enable’ undeclared here (not in a function)
 2733 |  &dev_attr_hsi_enable.attr,
      |   ^~~~~~~~~~~~~~~~~~~

Fix:
Add OSI_STRIPPED_LIB macro protection
for required functions.

Bug 3959085

Change-Id: Ifef1c72b5ddedc4d550280eace305bbade290bbf
Signed-off-by: Revanth Kumar Uppala <ruppala@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2905357
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-05-18 23:46:40 -07:00
Nagarjuna Kristam
6a981ab712 PCI: EPF: dma-test: Fix Coevrity issues
Fix coverity issue of dead code and unreachable code.

Bug 3952896

Signed-off-by: Nagarjuna Kristam <nkristam@nvidia.com>
Change-Id: I6ca4b485f6b053ea6787b76f3fae95d8f6914c98
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2905249
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: Manikanta Maddireddy <mmaddireddy@nvidia.com>
Reviewed-by: Bitan Biswas <bbiswas@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-05-18 23:46:12 -07:00
Revanth Kumar Uppala
98b2b3ff4f nvethernet: Skip the device resume via mdio bus
Enable "phydev->mac_managed_pm" so that device
won't be resumed for second time via mdio bus

Bug 4071996

Change-Id: Ib35bc1459bd882a2b940d4f28bd9d2c76719bfc7
Signed-off-by: Revanth Kumar Uppala <ruppala@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2901540
Reviewed-by: Bhadram Varka <vbhadram@nvidia.com>
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-by: Narayan Reddy <narayanr@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-05-18 23:41:10 -07:00
Jon Hunter
e975e7bba9 platform: tegra: rtcpu: Don't register firmware
The Tegra firmware-class driver is being deprecated to reduce the number
of out-of-tree modules that are required. The firmware is registered
with this driver for informational purposes. The firmware version is
already printed on boot and so remove the call to register the firmware.

Bug 4090910

Change-Id: I69045a641f6daf21f15f71ae2ea70def2c74b28e
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2897319
Reviewed-by: Matti Ryttylainen <mryttylainen@nvidia.com>
Reviewed-by: Ankur Pawar <ankurp@nvidia.com>
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2898617
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com>
Reviewed-by: svc-mobile-cert <svc-mobile-cert@nvidia.com>
Reviewed-by: svcacv <svcacv@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-05-18 23:38:38 -07:00
Laxman Dewangan
e8240d6a9c platform: tegra: aon: Don't register firmware
The Tegra firmware-class driver is being deprecated to reduce the number
of out-of-tree modules that are required. The firmware is registered
with this driver for informational purposes. The firmware version is
already printed on boot and so remove the call to register the firmware.

Bug 4090910

Change-Id: Ifeafd7c65f1d02da9e1839746b5f91be07aa4578
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2905820
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com>
Reviewed-by: svc-mobile-cert <svc-mobile-cert@nvidia.com>
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: Jonathan Hunter <jonathanh@nvidia.com>
Reviewed-by: Akhilesh Khumbum <akhumbum@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-05-18 23:38:19 -07:00
Laxman Dewangan
49244862b1 cvnas: Make module compilation as default
Make cvnas always as module and remove the condition
for built-in compilation.

Also remove the non-required includes.

Bug 4038415

Change-Id: Ib3715e4b94c310a460b943bcd11ad70b8e84cf08
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2904301
Reviewed-by: svcacv <svcacv@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-05-16 06:33:17 -07:00
Laxman Dewangan
6476bb40a4 cvnas: Drop license paragraphs
The cvnas files are having the SPDX license forma. Hence,
it is not required to have the license paragraphs.

Remove the non-required license paragraphs details.

Bug 4038415

Change-Id: I8f6212255cb9ce2cff3af5492599cf4f3946f04d
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2904300
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>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-05-16 06:33:13 -07:00
Gerrit Code Review
5f8a0b1583 Merge "cvnas: Integrate drivers from kernel/nvidia to kernel/nvidia-oot" into dev-main 2023-05-16 06:33:08 -07:00
Laxman Dewangan
5682201834 kernel-src-copy: Remove copy of CVNAS driver
Remove the copy of CVNAS driver from kernel/nvidia
to kernel/nvidia-oot as this is already copied to
kernel-nvidia-oot.

Bug 4038415

Change-Id: I967bdcd8178c2fcff50f48c778a0c6dd4d82308d
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2904020
Reviewed-by: svcacv <svcacv@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-05-16 06:33:03 -07:00
Deepak Nibade
cec42e4059 tegra_bootloader_debug: fix crash in absence of bootloader parameters
In absence of bl_debug_data parameter passed from Bootloader, value of
tegra_bl_debug_data_start will be 0.

This triggers a kernel panic on systems where parameter is not specified
and the module is loaded.

Fix this by first checking tegra_bl_debug_data_start and
tegra_bl_debug_data_size before accessing them.

Also add a check upfront to check if mandatory bootloader parameter
tegra_bl_prof_start is passed or not. If this parameter is not passed,
bail out the driver initialization.

Bug 3996651

Change-Id: Ibb78d6cefdae1f79ecb09836b833899deacb03ce
Signed-off-by: Deepak Nibade <dnibade@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2900710
Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-05-16 06:28:12 -07:00
Laxman Dewangan
6496e807ed nvpva: Enable TEGRA_FUSE_UPSTREAM
For OOT module build, enable TEGRA_FUSE_UPSTREAM
default.

Bug 4116692

Change-Id: Ib0a8cd983983b0581050634265bf0771f578a2c3
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2904019
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
2023-05-15 06:11:01 -07:00
Laxman Dewangan
83c26ab1fc nvdla: Enable TEGRA_FUSE_UPSTREAM
For OOT module build, enable TEGRA_FUSE_UPSTREAM
default.

Bug 4116692

Change-Id: Ia9a63519c240d874fbbeb126945ef28f79452421
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2904018
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: Amit Sharma (SW-TEGRA) <amisharma@nvidia.com>
Reviewed-by: Arvind M <am@nvidia.com>
2023-05-15 06:10:52 -07:00
Laxman Dewangan
769831d84d cam_fsync: Drop license paragraphs
The cam_fsync files are having the SPDX license forma. Hence,
it is not required to have the license paragraphs.

Remove the non-required license paragraphs details.

Bug 4038415

Change-Id: Ifccc4d12111d076eb4f98c414bc35158da1cc694
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2903865
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-05-15 01:19:58 -07:00
Laxman Dewangan
67d0b7dd96 pva: Drop license paragraphs
The pva files are having the SPDX license forma. Hence,
it is not required to have the license paragraphs.

Remove the non-required license paragraphs details.

Bug 4038415

Change-Id: I4d039b7d8d9ef6eea5ba53ead8c5d1e3bda223b9
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2903864
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-05-15 01:19:53 -07:00
Laxman Dewangan
9ae82f62c3 pva: Replace srctree.nvidia with srctree.nvidia-oot
Replace srctree.nvidia with srctree.nvidia-oot for
PVA makefile as the build system pass only srctree.nvidia-oot.

Bug 4087103

Change-Id: I6b17c2d80957e2c82ebe33ef74f9cad9e6ebb50e
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2903852
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-05-15 01:19:49 -07:00
Laxman Dewangan
214da5b3d2 Makfile: dkms: Get rid of srctree.nvidia
The OOT drivers are no more required the srctree.nvidia
to be set. Removing this initialization.

Bug 4087103

Change-Id: I3485d387e9da92d02407070308496b9a5c8a5d1f
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2903845
Reviewed-by: svcacv <svcacv@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-05-15 01:19:44 -07:00
Mahesh Kumar
d4185fbe2e platform: dce: add delay between ipc_notify admin-seq
Add a few microseconds delay between sending ipc-notify calls for IPC
channel reset. IPC notify ACKs are asynchronous and sending notify when
the previous ACK was still in progress will cause spurious interrupt/ACK
signal and printout FSP state warnings.

Bug 4069133

Change-Id: I20dff299149a66629dc23ab2a7cb7765eac1b4dc
Signed-off-by: Mahesh Kumar <mahkumar@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2900570
Reviewed-by: svc_kernel_abi <svc_kernel_abi@nvidia.com>
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com>
Reviewed-by: svc-mobile-cert <svc-mobile-cert@nvidia.com>
Reviewed-by: Vinod Atyam <vatyam@nvidia.com>
Reviewed-by: Bitan Biswas <bbiswas@nvidia.com>
Tested-by: Vinod Atyam <vatyam@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2902404
2023-05-15 01:18:59 -07:00
Ketan Patil
30ebc1a639 video: tegra: nvmap: Add support for querying granule size
Add support for querying the granule size using NvRmMemQueryHeapParams.
In case of compression carveout it returns granule size in which memory
is allocated while in case of IOVMM heap, it returns PAGE_SIZE.

Bug 3956637

Change-Id: I3ec4f5388caecbca0a728e1878007f6b3d4320ef
Signed-off-by: Ketan Patil <ketanp@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2899867
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com>
Reviewed-by: svc-mobile-cert <svc-mobile-cert@nvidia.com>
Reviewed-by: Pritesh Raithatha <praithatha@nvidia.com>
Reviewed-by: Krishna Reddy <vdumpa@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-05-15 01:18:06 -07:00
Ketan Patil
faa6040875 video: tegra: nvmap: Switch to configurable granule size
In compression carveout, granule size should be configurable via device
tree. Earlier code was written by considering granule size of 2MB,
update the code to use configurable granule size read from DT.

Bug 3956637

Change-Id: Ib1e966117b2bd9511cbcde37a6011c17f38f22e2
Signed-off-by: Ketan Patil <ketanp@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2899865
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com>
Reviewed-by: Pritesh Raithatha <praithatha@nvidia.com>
Reviewed-by: Krishna Reddy <vdumpa@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-05-15 01:18:01 -07:00
Laxman Dewangan
c11f2eb416 cvnas: Integrate drivers from kernel/nvidia to kernel/nvidia-oot
Integrate the cvnas drivers from kernel/nvidia to kernel/nvidia-oot
to get rid of kernel/nvidia dependency.

Merge remote-tracking branch 'origin/dev/ldewangan/nvidia-cvnas-dev-main'
  into oot-cvnas-trans-dev-main

Bug 4083867

Change-Id: Ibd8f2d06f717fc51b62a12b3a59c3c61ed29d513
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
2023-05-15 06:25:45 +00:00
Ketan Patil
300ceb3ea2 tegra: cvnas: Fix type casting issue
CERT-C is reporting following issue:
- Casting cvsram_slice_data[1] from unsigned int to int without checking
its value may result in lost or misinterpreted data.
Fix this by changing the data type of slice_size.

CID 490074
Bug 3745813

Change-Id: Ic52fd016798310b69da69247a6eb2d7a626a4146
Signed-off-by: Ketan Patil <ketanp@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2828530
Reviewed-by: Sachin Nikam <snikam@nvidia.com>
2023-05-15 06:13:34 +00:00
Sagar Gulab Patil
59f352a819 tegra: cvnas: Fix Cert-C error handling bug
In function nvcvnas_power_off casting nvcvsram_readl from unsigned int
to int without checking its value may result in lost or misinterpreted
data. Fix this by changing data type of val to u32.

CID 427418
Bug 3512545

Change-Id: I8be65b1ca73270a4a0d76380207078da745c7057
Signed-off-by: Sagar Gulab Patil <sagargulabp@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2747340
Reviewed-by: Sachin Nikam <snikam@nvidia.com>
2023-05-15 06:13:26 +00:00
Sagar Gulab Patil
659ad2b6ee tegra: cvnas: Fix Cert-C error handling bug
In function nvcvnas_probe casting cvsram_slice_data[0] from unsigned
int to int without checking its value may result in lost or
misinterpreted data. Fix this by changing data type of variable.

ID 490074
Bug 3512545

Change-Id: Ia9f141f14a540f9c2c436bf605d4aec8f3489fb5
Signed-off-by: Sagar Gulab Patil <sagargulabp@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2738506
Reviewed-by: Sachin Nikam <snikam@nvidia.com>
2023-05-15 06:13:11 +00:00
Laxman Dewangan
cb92d33b4e cvnas: Set config variable when build as OOT module
When cvnas driver is build as OOT module, it is required
to set the following config.
	CONFIG_TEGRA_FUSE_UPSTREAM
	CONFIG_TEGRA_CVNAS

Set these config when CONFIG_TEGRA_OOT_MODULE is set.

Bug 3583599

Change-Id: I8deffa609cfc7abf6c9efd69405295077649c8b1
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2715735
Reviewed-by: Bitan Biswas <bbiswas@nvidia.com>
2023-05-15 06:13:03 +00:00
Bharat Nihalani
eda8327741 include: Fix cvnas build errors
Fix cvnas build errors when CONFIG_TEGRA_CVNAS is disabled.

The following build errors are fixed:

nvhost_buffer.c:134: undefined reference to `nvcvnas_get_cvsram_base'
nvhost_buffer.c:135: undefined reference to `nvcvnas_get_cvsram_size'

Bug 3633940

Change-Id: I3f42bb9a0f5d833a70fd05c494fdbbcaab60be1e
Signed-off-by: Bharat Nihalani <bnihalani@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2706940
Reviewed-by: Ketan Patil <ketanp@nvidia.com>
Reviewed-by: Sachin Nikam <snikam@nvidia.com>
2023-05-15 06:12:53 +00:00
Ketan Patil
242600283f video: tegra: nvmap: Do not export cvnas_dev
By exporting cvnas_dev all the internal data of the driver is getting
exposed to any driver that uses it. This could allow drivers to corrupt
this driver data. Hence do not export cvnas_dev, use helper functions to
get it's required member elements from nvmap.

Bug 200722684
Bug 3528414

Change-Id: I17f6fa1e98c777a7ec9118dbc6f0c6359e949f22
Signed-off-by: Ketan Patil <ketanp@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2704698
Reviewed-by: Puneet Saxena <puneets@nvidia.com>
Reviewed-by: Jonathan Hunter <jonathanh@nvidia.com>
Reviewed-by: Sachin Nikam <snikam@nvidia.com>
2023-05-15 06:12:41 +00:00
Ketan Patil
3a87281353 video: tegra: nvmap: Remove dependency of cvnas
Handle dependencies between nvmap and cvnas driver:
- nvmap_register_cvsram_carveout function is called by cvnas driver
(builtin driver for 5.10) and it's definition is present in nvmap driver
(builtin driver for 5.10, but we are trying to make LKM). This is
resulting into build issues while making nvmap as LKM for 5.10
- One option to resolve this is by making cvnas driver as LKM for 5.10
But nvhost, nvdla, cbb are not LKM for 5.10 and are calling functions
defined in cvnas driver e.g. nvcvnas_get_cvsram_base, hence we can't
make cvnas as LKM for 5.10
- Second option is to get rid of the call nvmap_register_cvsram_carveout
from cvnas driver. This approach is implemented in this patch.
- Export cvnas_dev from cvnas driver, do not call the above function
from cvnas driver. During nvmap probe, nvmap itself would call the above
function, as cvnas_dev is exported , it's being used in nvmap driver to
get base, size etc. information, which is needed as argument to above
function, which will register the cvnas carveout in case of 5.10

Bug 200722684

Change-Id: I32e5694386de4a7fef65c3f67ffb9b5066f62ab3
Signed-off-by: Ketan Patil <ketanp@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2678685
2023-05-15 06:12:33 +00:00
Rajkumar Kasirajan
584a58b4b1 tegra: cvnas: set capped clock rate to max
The CVNAS clock does not support dynamic frequency scaling and
it is always expected to run at max rate. When its frequency is
capped at runtime via clock_cap sysfs node, forcefully change
current rate to capped max rate.

Bug 3510538

Change-Id: I133865dbd8cfe58182dca3e6b2b969b99df393b0
Signed-off-by: Rajkumar Kasirajan <rkasirajan@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2665653
2023-05-15 06:12:20 +00:00