Commit Graph

1310 Commits

Author SHA1 Message Date
Manish Bhardwaj
dee4d41861 nvidia-oot: add support for recovery kernel
Stop compilation for nvidia-oot drivers, whose
core kernel support is missing in recovery
kernel.

Bug 3863448

Change-Id: I36f09f74d4448af4b13eeebaaeadc53c3f83e002
Signed-off-by: Manish Bhardwaj <mbhardwaj@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2856892
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-02-23 22:53:00 -08:00
Sushil Kumar Singh
5267694f8e nvethernet: Fix coverity defect
Issue:
Unused value in code with below CID's

10166525
10166540

Fix:
Removed unused variable assignment.

Bug 3952896

Change-Id: I8fa305b26470c08d0eec0e83c8fc5e4fe15be49d
Signed-off-by: Sushil Kumar Singh <sushilkumars@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2860934
Reviewed-by: Bhadram Varka <vbhadram@nvidia.com>
Reviewed-by: Sachin Nikam <snikam@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-02-22 00:45:49 -08:00
Sameer Pujar
2edfbcdf39 ASoC: tegra: Fix uninitialized array index read
The index of the override arrays is related to stream direction.
The variable used to read these array index is not initialized
and is reported by coverity scan. The variable assignment code
is misplaced. Fix this by moving this code to make sure that
the array index read happens after the variable assignment.

CID 10162269
Bug 3952896

Change-Id: I7e8d000860e799a93437d6eb9d1b788cda118c14
Signed-off-by: Sameer Pujar <spujar@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2860609
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: Mohan Kumar D <mkumard@nvidia.com>
Reviewed-by: Sachin Nikam <snikam@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-02-22 00:45:40 -08:00
Frank Chen
dd1d0b6c70 drivers: camera: fix Coverity warnings
Fix camera kernel drivers for the below warnings:

CID 10165214: Unchecked return value (CHECKED_RETURN)
CID 10165215: Unchecked return value (CHECKED_RETURN)
CID 10160154: Unsigned compared against 0 (NO_EFFECT)

Bug 3952896

Change-Id: I82727b5c298d0c39ebba2ae60f6ed76321272ff5
Signed-off-by: Frank Chen <frankc@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2858894
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Vincent Chung <vincentc@nvidia.com>
Reviewed-by: Sachin Nikam <snikam@nvidia.com>
2023-02-22 00:43:56 -08:00
Manish Bhardwaj
a0c0b2f212 nvidia-oot: fix crash issue in vblk driver
Using this patch we are fixing kernel crash
issue which is observed when we are unbinding
the UFS driver, and we are trying to unreserved
the mempool which was never reserved.

Bug 3960718

Signed-off-by: Manish Bhardwaj <mbhardwaj@nvidia.com>
Change-Id: Ib684cc99b9e61aa945ef406af0889aebe57e1a75
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2860634
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: Sanjith T D <std@nvidia.com>
Reviewed-by: Sandeep Trasi <strasi@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-02-21 03:42:31 -08:00
Manish Bhardwaj
aa5d06bcd3 nvidia-oot: fix Coverity defects
Using this patch we are fixing coverity defects in
CAN and storage OOPS driver.

CID 10132028: Unchecked return value (CHECKED_RETURN)
CID 10166522: Uninitialized scalar variable (UNINIT)
CID 10166537: Uninitialized scalar variable (UNINIT)
CID 10166580: Uninitialized scalar variable (UNINIT)

Bug 3952896

Signed-off-by: Manish Bhardwaj <mbhardwaj@nvidia.com>
Change-Id: I3caf0a9121a4480567ce32c6777b547901f24815
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2860630
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: Sachin Nikam <snikam@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-02-21 03:42:27 -08:00
Bitan Biswas
35c308a22c Revert "ASoC: tegra: Fix coverity issue"
This reverts commit b284ab0c11.

Reason for revert: Null pointer exception during boot l4t k515 concord

bug 3990297

Change-Id: I8354b0dc28e88aa3c23adfdce84fa5cb96f88fdb
Signed-off-by: Bitan Biswas <bbiswas@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2859511
Reviewed-by: Akhil R <akhilrajeev@nvidia.com>
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-by: Mohan Kumar D <mkumard@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-02-18 02:30:17 -08:00
Pekka Pessi
8c3deebf44 rtcpu: export capture tracepoints
Bug 3960871

Signed-off-by: Pekka Pessi <ppessi@nvidia.com>
Change-Id: If805ddaf94fb2a22f056ed450414f449b601fcc7
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2855234
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: Ankur Pawar <ankurp@nvidia.com>
Reviewed-by: Matti Ryttylainen <mryttylainen@nvidia.com>
Reviewed-by: Frank Chen <frankc@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-02-17 07:25:14 -08:00
Mohan Kumar
b284ab0c11 ASoC: tegra: Fix coverity issue
Fix the unchecked return error from of_property_read_u32
function.

CID 10162254

Bug 3952896

Change-Id: Ifaa0cfc275e7a70896fd1f41ed12fcffd76395bd
Signed-off-by: Mohan Kumar <mkumard@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2856343
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: Sameer Pujar <spujar@nvidia.com>
Reviewed-by: Sharad Gupta <sharadg@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-02-16 00:07:49 -08:00
Abhilash G
60153c77c1 scsi: ufs: Make functions static and remove unused functions
Sparse is reporting following warnings:
warning: symbol 'ufs_tegra_disable_mphy_slcg' was not declared.
warning: symbol 'ufs_tegra_mphy_tx_advgran' was not declared.
warning: symbol 'ufs_tegra_mphy_rx_advgran' was not declared.
warning: symbol 'ufs_tegra_ufs_aux_ref_clk_enable' was not declared.
warning: symbol 'ufs_tegra_ufs_aux_ref_clk_disable' was not declared.
warning: symbol 'ufs_tegra_aux_reset_enable' was not declared
warning: symbol 'ufs_tegra_ufs_aux_prog' was not declared.

Resolve these issues by making them static and remove functions
that are not getting called.

Bug 3954363

Change-Id: I59b2feeb45c93d8e51dca4fb0d3c752043c15ecd
Signed-off-by: Abhilash G <abhilashg@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2855754
Reviewed-by: Ketan Patil <ketanp@nvidia.com>
Reviewed-by: Sachin Nikam <snikam@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-02-16 00:04:24 -08:00
Ankur Pawar
5957f061b3 Camera: OOT: misc code fixes for drivers
1. Sensor deep power down and mclk enable
   and disable code.
2. Assign pads member in v4l2_subdev_state
   struct passed to v4l2_subdev_call.
3. emc and iso.emc clock are not available
   in K5.15. Disable clock get function.

Bug 3898807

Change-Id: If9e24ccd837af00df250571e6fc4c907886faf93
Signed-off-by: Ankur Pawar <ankurp@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2835934
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
2023-02-15 23:54:02 -08:00
Ankur Pawar
8b04ed92cb camera: set CSI port-index when preparing graph
When preparing graph, device tree endpoints are
are found to be in reverse order. This leads to
incorrect csi port index associated with video
nodes. Read csi port while preparing graph and
assign it to tegra_channel struct.

Bug 3898807

Change-Id: I39af68386d85bc6299b164864e4503850d606e69
Signed-off-by: Ankur Pawar <ankurp@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2855852
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: Frank Chen <frankc@nvidia.com>
Reviewed-by: Sudhir Vyas <svyas@nvidia.com>
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-02-15 15:56:41 -08:00
Vince Hsu
c41266d8b0 nvethernet: use -mno-outline-atomics for nvethernet
The -moutline-atomics is enabled by default since GCC 10. Specify
-mno-outline-atomics to avoid the error when building with GCC 11.

MODPOST kernel-nvidia-oot/nvidia-oot/Module.symvers
ERROR: modpost: "__aarch64_cas4_acq_rel" [ kernel-nvidia-oot/nvidia-oot/drivers/net/ethernet/nvidia/nvethernet/nvethernet.ko] undefined!
ERROR: modpost: "__aarch64_ldadd4_acq_rel" [ kernel-nvidia-oot/nvidia-oot/drivers/net/ethernet/nvidia/nvethernet/nvethernet.ko] undefined!

Bug 3975705
Bug 200730650

Change-Id: Ief3188dbad704c08deec34f2d23ccd9625fa0a5a
Signed-off-by: Vince Hsu <vinceh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2855788
Reviewed-by: Bitan Biswas <bbiswas@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-02-15 15:56:25 -08:00
Sushil Kumar Singh
877d53d041 nvethernet: Error check for mac address DT node
Issue:
Incorrect return value check for of_get_mac_address()
when reading mac address from dt property.

Fix:
1. Modify error check condition based on
of_get_mac_address() return values.
2. Fixes the Coverity defect CID 10166538.

Bug 3952896

Change-Id: I65ddd05538ad3039da2a21a79be8bb7a0ed1f3fc
Signed-off-by: Sushil Kumar Singh <sushilkumars@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2857036
Reviewed-by: Bhadram Varka <vbhadram@nvidia.com>
Reviewed-by: Narayan Reddy <narayanr@nvidia.com>
Reviewed-by: Sachin Nikam <snikam@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-02-15 04:32:29 -08:00
Sheetal
d89c0fcf3b ASoC: tegra: Update mux name as per upstream
- Change the Mixer, AMX, ADX, ASRC, OPE, MVC and SFC dai names
  as per upstream.
- Split Mixer, ASRC, OPE, MVC and SFC input and output names to
  RX and TX

Note -
 As per downstream kernel code there will be routing issue
 if DAI names are updated for SFC, MVC and OPE input and
 output. Due to that added those modules output DAIs just to keep
 similar to upstream kernel. Single DAI is used for input and
 output for SFC, MVC and OPE.

Bug 3592105
Bug 3896761

Signed-off-by: Sheetal <sheetal@nvidia.com>
Change-Id: I1bcc141627b9123c4c3921c87c279dbd41f757bc
(cherry picked from commit ae0f5a2b7cfc56b5c53f05aca50fb5f32bac7eca)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-5.10/+/2835313
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2856573
Tested-by: Sameer Pujar <spujar@nvidia.com>
Reviewed-by: Sameer Pujar <spujar@nvidia.com>
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: Sharad Gupta <sharadg@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-02-15 04:31:28 -08:00
Sheetal
69a7eaf40a ASoC: tegra: Update ASRC and OPE control name
Updated ASRC and OPE control names as per upstream kernel.
To simplify the unification of audio scripts

Bug 3592105
Bug 3896761

Change-Id: If9449baed51d59a33efdadff6c7ba3d2858299ca
Signed-off-by: Sheetal <sheetal@nvidia.com>
(cherry picked from commit 524e22f44cdf68ca4eb05a690b89d8ca6e4886d1)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-5.10/+/2844839
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2856572
Tested-by: Sameer Pujar <spujar@nvidia.com>
Reviewed-by: Sameer Pujar <spujar@nvidia.com>
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: Sharad Gupta <sharadg@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-02-15 04:31:23 -08:00
Manish Bhardwaj
a51a3b4d6f nvidia-oot: protect IVC APIs using mutex
While accessing IVC framework APIs is causing concurrency
issue leading to system crash. so protecting the APIs
using mutex.
Also removing the req_lock mutex which is being used
unnecessarily since the shared resources are already protected
by ivc_lock mutex.

Bug 3937188

Signed-off-by: Manish Bhardwaj <mbhardwaj@nvidia.com>
Change-Id: Ie49161b7f2659f9c44352d50f950d8f5a3cae32c
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2856249
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-02-15 04:26:47 -08:00
Nagarjuna Kristam
a62b3e3686 pci: edma: Update SW ring before final PCS
Updated PCS to final descriptor after SW ring callback is updated.
Read back PCS and add mb to ensure write and read AI's of descriptor
are ordered before rining doorbell.

Bug 3747376
Bug 3960792

Change-Id: Ief7e6e91edb19571777c6f589da3e6262b4d24b3
Signed-off-by: Nagarjuna Kristam <nkristam@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2778528
(cherry picked from commit df94316dc980657a66a2becbef94e21e52376a60)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2855011
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: Manikanta Maddireddy <mmaddireddy@nvidia.com>
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-02-10 23:45:32 -08:00
Sushil Singh
9b97e33558 nvethernet: Fix cert c issues
Issue:
CERT EXP33-C - Using uninitialized value.

Fix:
Initialize variable before use

Bug 3959323

Change-Id: Ia4dc3f58ef13c76305ce8242d38a1863986af193
Signed-off-by: Sushil Singh <sushilkumars@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2853914
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
2023-02-10 23:44:41 -08:00
Revanth Kumar Uppala
2172c01a6d ethernet: Get VM IRQ config sequence from nvidia,vm-irq-id
Ethernet driver expect the VM IRQ configuration. The VM IRQ
is provided with the property "interrupt" which have multiple
VM irq numbers and their configurations via the vm irq
configuration node which is referred by property
"nvidia,vm-irq-config".

The vm irq configuration node have the configuration of
all VM IRQ and each configuration is separated with the
child node like below.

ethernet@6800000 {
	nvidia,vm-irq-config = <&mgbe_vm_irq_config>;
}

	mgbe_vm_irq_config: mgbe-vm-irq-config {
		nvidia,num-vm-irqs = <5>;
		vm_irq1 {
			nvidia,num-vm-channels = <2>;
			nvidia,vm-channels = <0 1>;
			nvidia,vm-num = <0>;
                        nvidia,vm-irq-id = <0>;

		};
		vm_irq2 {
			nvidia,num-vm-channels = <2>;
			nvidia,vm-channels = <2 3>;
			nvidia,vm-num = <1>;
                        nvidia,vm-irq-id = <1>;
		};
		vm_irq3 {
			nvidia,num-vm-channels = <2>;
			nvidia,vm-channels = <4 5>;
			nvidia,vm-num = <2>;
                        nvidia,vm-irq-id = <2>;
		};
		vm_irq4 {
			nvidia,num-vm-channels = <2>;
			nvidia,vm-channels = <6 7>;
			nvidia,vm-num = <3>;
                        nvidia,vm-irq-id = <3>;
		};
		vm_irq5 {
			nvidia,num-vm-channels = <2>;
			nvidia,vm-channels = <8 9>;
			nvidia,vm-num = <4>;
                        nvidia,vm-irq-id = <4>;
		};
	};
};

The child 1(vm_irq1) is link with the VM IRQ  1 listed in
interrupt property, next child which is vm_irq2 is link
with the 2nd VM irq. So, the order of VM configuration
child must be in same order as VM IRQ provided in the
property interrupt.

If the irq configuration order i..e child order is not
matching with VM irq number then there is interrupt issue.

Now, if the VM IRQ config child nodes are provided in base
DT file in same order then the ethernet works fine.
But when applying via overlay, it does not work.
This is because of overlay technique. The overlay logic is
such that it iterates all child node in overlay and
apply the child as first child of target node.
Hence the child sequence provided in overlay fragment
is applied in reverse order in target node. This causes
the irq configuration order not matching with VM IRQs.

To address the overlay issue, read the sequence of
interrupt in property "interrupt" from the newly added property
"nvidia,vm-irq-id" of each child. This way child node
sequence does not matter, and sequence is identified
by property.

Bug 3956724

Change-Id: I5c08edcd8a7e8d3112618dd23050d8b5c10ddc59
Signed-off-by: Revanth Kumar Uppala <ruppala@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2855639
Reviewed-by: Bhadram Varka <vbhadram@nvidia.com>
Reviewed-by: Narayan Reddy <narayanr@nvidia.com>
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-02-10 06:20:04 -08:00
Bharat Nihalani
354ef0dbe0 drivers: Use runtime debugfs check
When kernel command line debugfs=off is specified instead of
disabling CONFIG_DEBUG_FS in defconfig to disable Debug-FS,
debugfs functions like debugfs_create_dir will fail.

Use function debugfs_initialized() to check if debugfs
functionality is enabled before calling any debugfs functions.

This allows us to by-pass debugfs initialization if debugfs
is not enabled.

Bug 3752450

Change-Id: I17390c2d9928638d940454c2ea1b3abf00ed4264
Signed-off-by: Bharat Nihalani <bnihalani@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2855128
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-02-10 06:17:56 -08:00
Junghyun Kim
b8817415d5 drivers: media: CDI: Add Des's power control
Add the new IOCTL command to control the deserilaizer's PWDN signal
instead of enabling it when CDI root opens

Bug 3879569

Change-Id: Ia07c3b4266e1f137d197af130fb2bf12e52a1767
Signed-off-by: Junghyun Kim <juskim@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2835141
(cherry picked from commit 29fb31dad2e63d2669a6a6eb5c2751092b7097e2)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2847959
(cherry picked from commit bd9766952be10722f4cc6a17ff582005b3138b08)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2854722
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
Tested-by: Frank Chen <frankc@nvidia.com>
Reviewed-by: Frank Chen <frankc@nvidia.com>
Reviewed-by: Mohit Ingale <mohiti@nvidia.com>
Reviewed-by: Shiva Dubey <sdubey@nvidia.com>
2023-02-10 06:15:21 -08:00
dbadgaiyan
55cee03ee7 drivers: misc: Fix coverity issues
Fix 2 coverity issues.
CID 10165044
CID 10165045

Bug 3952896

Change-Id: Ide19b44148c9e438284de45aa309c7cdc9e2d2e1
Signed-off-by: dbadgaiyan <dbadgaiyan@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2850604
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: Arihant Jejani <ajejani@nvidia.com>
Reviewed-by: Sachin Nikam <snikam@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-02-04 02:30:44 -08:00
Kartik
6741556a7d soc/tegra: fuse: Remove fuse-burn driver
Burning fuse from Kernel is no longer a valid usecase and the driver is
only used to add sysfs to allow reading fuse values from userspace.
Upstream kernel already supports this with the nvmem interface.

Deprecate and remove the fuse-burn driver as an OOT module.

Bug 3934453

Change-Id: I6963531938adcefca76573d25a510268c515b34a
Signed-off-by: Kartik <kkartik@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2852954
Reviewed-by: Jonathan Hunter <jonathanh@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-02-04 01:05:41 -08:00
Laxman Dewangan
8ea6700062 device-tree: legacy-dts: Build all SoC legacy DTS
Build legacy DTS from all SoCs which are having required
files for OOT build.

Bug 3965392

Change-Id: I348ae27edfabc157fd54788e0a821792c44870b0
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2852800
Reviewed-by: Krishna Yarlagadda <kyarlagadda@nvidia.com>
Reviewed-by: svcacv <svcacv@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-02-04 01:05:28 -08:00
Ashish Mhetre
ff7d0cc87c platform: tegra: rtcpu: Fix cache sync APIs
For dma mappings done with dma_map_sg() calls, dma_sync_sg* calls are
required in order to make sure that caches for all the scattered
addresses are synced. Using dma_sync_single* call for syncing caches
can access address which is not mapped by dma_sync_sg() and cause kernel
exceptions.
Fix this by using correct cache sync calls for appropriate dma mapping
APIs.

Bug 3879036

Change-Id: I30afcf17806c505d94ff4eb7faefab5fbbf9e7b9
Signed-off-by: Ashish Mhetre <amhetre@nvidia.com>
Signed-off-by: Matti Ryttylainen <mryttylainen@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2839838
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: Pekka Pessi <ppessi@nvidia.com>
Reviewed-by: Sachin Nikam <snikam@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-02-04 00:55:14 -08:00
Ishan Shah
947f489dac nvidia-oot: cpuidle: Add idle debugfs nodes
Adding debugfs support to force cpus into idle states. Building as
module instead of driver. Generic to support any standard cpuidle
implementation.

Bug 3583597

Change-Id: I5dd9e8635b844f465bc4c9da7e1d45ee17dd669f
Signed-off-by: Ishan Shah <ishah@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2814926
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-02-04 00:52:39 -08:00
Manish Bhardwaj
db2721e896 vblk: increase vblkdev max minor count
currently the max number of minors for a vblock device is 16
With the current configuration this is exceeding and causes errors
during boot. update the max count to 32

Bug 3899893
JIRA ESLC-7100

Change-Id: I07cf631e95af673ad08d0ecf7186ce9cb0114a1b
Signed-off-by: Manish Bhardwaj <mbhardwaj@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2849763
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
2023-02-02 16:38:17 -08:00
Manish Bhardwaj
43ac1dddff nvidia-oot: port virtual MTD driver
Using this patch we are porting virtual MTD driver to
OOT kernel.

JIRA ESLC-6885

Change-Id: Ia1c949300e3a9af100324a246bd6e0ce76e829d8
Signed-off-by: Manish Bhardwaj <mbhardwaj@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2849759
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
2023-02-02 16:37:57 -08:00
Manish Bhardwaj
01a13440b4 nvidia-oot: port virtual oops storage driver
Using this patch we are porting virtual oops storage driver
to OOT kernel.

JIRA ESLC-7217
Bug 3961155

Change-Id: I60ba159b3a4662cf02d686a1916a110c5158901e
Signed-off-by: Manish Bhardwaj <mbhardwaj@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2849807
Reviewed-by: Suresh Venkatachalam <skathirampat@nvidia.com>
Reviewed-by: Sachin Nikam <snikam@nvidia.com>
2023-02-02 16:37:45 -08:00
Manish Bhardwaj
4d73511481 nvidia: support HSI error injection
Using this patch we are adding HSI error
injection support for SDMMC controller.

JIRA ESLC-7042
Bug 3413214

Change-Id: Ib1300bd133eb48c30439337c8205365dfd30395d
Signed-off-by: Manish Bhardwaj <mbhardwaj@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2849755
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
2023-02-02 16:37:38 -08:00
Hui Liu
04d3fe046f kernel-oot: include: soc: tegra: add ISP7 support
Add new stats buf sizes and offset for ISP7
Add new enable bit for ISP7 HIST2 unit
Reuse crossbar registers for ISP7 mini crossbars
New identifier for ISP7 program structure

Jira CT26X-279

Change-Id: I0015df5b7e5a35818649797fb19deafc40a9ff01
Signed-off-by: huliu <huliu@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2849816
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: Akihiro Mizusawa <amizusawa@nvidia.com>
Reviewed-by: Pekka Pessi <ppessi@nvidia.com>
Reviewed-by: Mika Liljeberg <mliljeberg@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-02-01 05:17:42 -08:00
Ashish Mhetre
7a504c1633 platform: tegra: Remove EMC register access for HV
EMC registers are currently accessed to get DRAM parameters.
As these are platform specific and static, DRAM parameters are added in
device-tree. In case of hypervisor environment, read DRAM properties
from device-tree instead of accessing EMC registers.
Also, MC and EMC register access by kernel is going to be blocked from
hypervisor. So, remove access to these registers.

Bug 3938091

Change-Id: I8a85bef7c34a919a48b3f0999f631f264540585a
Signed-off-by: Ashish Mhetre <amhetre@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2848653
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: Sachin Nikam <snikam@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-01-31 04:19:34 -08:00
Sanjith T D
8efaee4e42 nvidia:vblk: Fix "Using uninitialized value"
Initialze max_ioctl_requests to 0 to fix
"Using uninitialized value" coverity violation.
max_ioctl_requests variable will not be used if IOCTL
operations are not supported on that virtual partition.
So, initializing it to 0 will not have any impact.

CID 10165591
Bug 3952896

Change-Id: Icb50d8af08d6da854bba358722439d5c2ef2a028
Signed-off-by: Sanjith T D <std@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2849581
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-01-30 22:26:51 -08:00
Sheetal Tigadoli
68fd99fc2b drivers: nvpps: initalize PTP TSC sync logic
initalize PTP TSC sync logic

Bug 3700875
Bug 3765552
Bug 3896607

Change-Id: Ic40f71872d2c2087db072c5aab21724ade37d7c4
Signed-off-by: Sheetal Tigadoli <stigadoli@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2826921
(cherry picked from commit e738a9a88817a45947046065485b31a5008ca451)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2841961
(cherry picked from commit 9afd10c509f692fec4aa47dc6ead2f127d83028e)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2847682
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Sumeet Gupta <sumeetg@nvidia.com>
2023-01-25 14:54:59 -08:00
Preetham Chandru Ramchandra
e4113a1995 cpuidle: tegra: cpuidle-tegra-auto compilation fix
Fix the error on compiling cpuidle-tegra-auto as OOT module.
Keeping the change in a separate patch for better tracking the
changes done.

Issues resolved are:
 ERROR: modpost: "s2idle_state"
 Fix: used a local variable s2idle_sc7_state to fix

 ERROR: modpost: "__boot_cpu_id"
 Fix: Used CPU number "0" always. It's a logical number and we
      don't have a dependency on the actual boot CPU.

 ERROR: modpost: "cpuidle_devices"
 Fix: Used a per cpu variable "tegra_auto_cpuidle_drivers" of type
      "struct cpuidle_driver *" to store and fetch the "*drv".

Bug 3583597

Change-Id: Idf1c4f4eecbdd638e31e0b76efa140a8f45616e9
Signed-off-by: Sumit Gupta <sumitg@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2843935
(cherry picked from commit a101f1bf1175f18744082f175f91a411903b9f45)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2819960
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: Sandeep Trasi <strasi@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
Tested-by: Preetham Chandru <pchandru@nvidia.com>
2023-01-20 09:18:50 -08:00
Preetham Chandru Ramchandra
287b23bf62 cpuidle: tegra: Build CPU_IDLE_TEGRA_AUTO as OOT
Build CONFIG_CPU_IDLE_TEGRA_AUTO as 'cpuidle-tegra-auto.ko' module.
It is direct copy of 'nvidia/drivers/cpuidle/cpuidle-tegra-auto.c'.

Bug 3583597

Change-Id: I78a41eaadaf5f95857829c4f2e961116e764c79e
Signed-off-by: Sumit Gupta <sumitg@nvidia.com>
Signed-off-by: Preetham Chandru Ramchandra <pchandru@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2843934
(cherry picked from commit a29a4cbc2b5ea6180b4750057c8175a0076e5681)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2819959
Reviewed-by: Sandeep Trasi <strasi@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-01-20 09:18:46 -08:00
Suresh Venkatachalam
11b4ca8baa nvidia: handle ioctl call gracefully
Using this patch we are gracefully handling
the scenario when ioctl(pass through) is
generated for UFS storage partition where pass
through commands are not supported

Bug 3870621
Bug 3941252

Change-Id: I22937c630a354178113acba68949465eeda81d03
Signed-off-by: Manish Bhardwaj <mbhardwaj@nvidia.com>
Signed-off-by: Suresh Venkatachalam <skathirampat@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2845464
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: Bitan Biswas <bbiswas@nvidia.com>
Reviewed-by: Sanjith T D <std@nvidia.com>
Reviewed-by: Sandeep Trasi <strasi@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-01-19 07:55:17 -08:00
Suresh Venkatachalam
eec9650f58 nvidia: remove mempool support for UFS devices
Using this patch we are removing the support of
mempool for UFS devices for which pass through
commands are not supported.

Bug 3870621
Bug 3941252

Change-Id: Ifd1be5c4ebeb6f670f0b29f6f19e5ce458446ee7
Signed-off-by: Manish Bhardwaj <mbhardwaj@nvidia.com>
Signed-off-by: Suresh Venkatachalam <skathirampat@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2845274
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Bitan Biswas <bbiswas@nvidia.com>
Reviewed-by: Sanjith T D <std@nvidia.com>
Reviewed-by: Sandeep Trasi <strasi@nvidia.com>
Reviewed-by: svcacv <svcacv@nvidia.com>
2023-01-19 07:54:34 -08:00
Suresh Venkatachalam
04ba246081 vblk: Remove restricting slots based on mempool
The number of slots that is available for queuing
requests is calculated based on mempool size.
For UFS, with IOVA feature enabled, this calculation
is not needed.
Updated code to not restrict slots based on mempool
if IOVA is enabled.

Bug 3941252

Change-Id: I5a2e6c3f6e4fd568fcff47fef7462659ee6db555
Signed-off-by: Sanjith T D <std@nvidia.com>
Signed-off-by: Suresh Venkatachalam <skathirampat@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2845252
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: Bitan Biswas <bbiswas@nvidia.com>
Reviewed-by: Sandeep Trasi <strasi@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-01-19 07:54:30 -08:00
Frank Chen
7514ddd6c0 media: camera: Fix CDI MGR driver for Linux v6.2
Upstream Linux kernel commit ff62b8e6588f ("driver core: make struct
class.devnode() take a const *") updated the 'devnode' function pointer
under the class structure to take a const device struct. This breaks
building the Tegra CDI MDR driver with Linux v6.2. Make the
necessary changes to the CDI MGR driver to fix the build breakage.

Also update CDI MGR GPIO code since devm_fwnode_get_gpiod_from_child()
is deprecated in Linux v6.2. Switch to use devm_fwnode_gpiod_get_index()
for Linux v6.2.

Bug 3936429

Change-Id: I327ebe1fa42d89a63e0b483d3ce1ff1b8b168532
Signed-off-by: Frank Chen <frankc@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2843858
Reviewed-by: Ian Kaszubski <ikaszubski@nvidia.com>
Reviewed-by: Jonathan Hunter <jonathanh@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-01-18 10:20:02 -08:00
Pekka Pessi
14032c34fb rtcpu: capture-ivc: fix NULL check in tx
Move NULL check away from tracing wrapper.

CID 587876

Bug 3745813
Bug 3597603

Signed-off-by: Pekka Pessi <ppessi@nvidia.com>
Change-Id: Ibbdc4eae796f8633ab1c731d6dcaf49fd1d7023a
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2844424
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: Semi Malinen <smalinen@nvidia.com>
Reviewed-by: Sachin Nikam <snikam@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-01-17 10:56:20 -08:00
Pekka Pessi
942cfaa0ce rtcpu: capture-ivc: add NULL check in tx
Check backpointer for NULL.

CID 10160552

Bug 3745813
Bug 3597603

Signed-off-by: Pekka Pessi <ppessi@nvidia.com>
Change-Id: Id653d7b5521d47d3c2f808ee2576eecda3c19a1f
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2844423
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: Semi Malinen <smalinen@nvidia.com>
Reviewed-by: Sachin Nikam <snikam@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-01-17 10:56:16 -08:00
Pekka Pessi
8a5f2dc62b rtcpu: fix isp event tracing
The capture sequence and program sequence fields were swapped in
the ISP event traces.

CID 10160560

Bug 3745813
Bug 3597603

Change-Id: I5ef4751968c90b0be92a139215b80617c6d4dad2
Signed-off-by: Pekka Pessi <ppessi@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2844422
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: Semi Malinen <smalinen@nvidia.com>
Reviewed-by: Sachin Nikam <snikam@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-01-17 10:56:11 -08:00
Pekka Pessi
8531a63fc6 rtcpu: fix overflow in device tree code
Check the device tree property size for overflows. Refactor code
and remove extra pointer arithmetics.

CID 491822

Bug 3745813

Change-Id: I2cc6d448ceea1e287da47577e249dcd27240e6a6
Signed-off-by: Pekka Pessi <ppessi@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2844421
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: Semi Malinen <smalinen@nvidia.com>
Reviewed-by: Sachin Nikam <snikam@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-01-17 10:56:06 -08:00
Revanth Kumar Uppala
8ca99872cc nvethernet: Resolve "Wframe-larger-than" warning
Removing duplicate structure variables to eliminate
"Wframe-larger-than" warning.

Bug 3793131

Change-Id: I480b11293708fb97e1f86b862e275a62b6a0f854
Signed-off-by: Revanth Kumar Uppala <ruppala@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2837140
Reviewed-by: Bhadram Varka <vbhadram@nvidia.com>
Reviewed-by: Jonathan Hunter <jonathanh@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-01-16 10:14:18 -08:00
Matti Ryttylainen
af0a39164b tegra: camera: Remove dead code from rtcpu drivers
Remove BWMGR code that is not used in K5.15 from tegra-camera-rtcpu and
debug drivers

Jira CAMERASW-10218

Change-Id: I7ab83a92ba200c5f7bfcd3d121a5a3c94751bd9c
Signed-off-by: Matti Ryttylainen <mryttylainen@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2821839
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
2023-01-12 01:15:43 -08:00
Jon Hunter
d2024697f3 media: camera: Fix CDI devnode function pointer for Linux v6.2
Upstream Linux kernel commit ff62b8e6588f ("driver core: make struct
class.devnode() take a const *") updated the 'devnode' function pointer
under the class structure to take a const device struct. This breaks
building the Tegra CDI MDR driver with Linux v6.2. Make the
necessary changes to the CDI MGR driver to fix the build breakage.

Bug 3936429

Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Change-Id: I4f2b75afa05b9ab5f4058b24f4022b0f0a8e6235
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2841045
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-01-11 11:27:05 -08:00
Jon Hunter
bfccd0291a pinctrl: tegra234: Fix build for Linux v6.2
Building the Tegra234 PINCTRL driver with Linux v6.2 fails with the
following error ...

 drivers/pinctrl/tegra/pinctrl-tegra234.c:72:2: error: implicit
  declaration of function ‘seq_printf’ [-Werror=implicit-function-declaration]
    seq_printf(s, " %s", dev_name(pctldev->dev));
    ^~~~~~~~~~

Fix this by including the "seq_file.h" header file that defines this
function.

Bug 3936429

Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Change-Id: I5c584a853025575fae78e1ca7a521914479f0c90
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2841036
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
2023-01-11 11:27:00 -08:00
Jon Hunter
c9981b9ac9 scsi: ufs: Fix build for Linux v6.2
Building the Tegra UFS driver with Linux v6.2 fails with the following
error ...

 drivers/scsi/ufs/ufs-tegra.c:1004:10: error: implicit declaration of
 function ‘pinctrl_select_state’ [-Werror=implicit-function-declaration]
    ret = pinctrl_select_state(ufs_tegra->ufs_pinctrl,
          ^~~~~~~~~~~~~~~~~~~~

Fix this by including the "pinctrl/consumer.h" header file that defines
this function.

Bug 3936429

Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Change-Id: I91fdbcb39d8d458021661e2103aa2dc236001066
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2841035
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
2023-01-11 11:26:56 -08:00