Commit Graph

2728 Commits

Author SHA1 Message Date
Nitin Kumbhar
0f04078fb6 drivers: nv-virtio-poc: fix coverity issues
Fix issues about unused value of err and overwriting write_size
value.

write_size:
assigned_value: Assigning value from err to write_size here, but that
stored value is overwritten before it can be used.
...
value_overwrite: Overwriting previous write to write_size with value
from copied.

err:
returned_value: Assigning value from nvvc_process_rxdataavaiable()
to err here, but that stored value is overwritten before
it can be used.

CID 10174057
CID 10174058

Bug 3952896

Change-Id: I21ef42b7c1c3fec83e558f80d954b65dbb14a5b8
Signed-off-by: Nitin Kumbhar <nkumbhar@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2969244
Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>
Reviewed-by: svcacv <svcacv@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-08-30 20:33:26 -07:00
Aniket Bahadarpurkar
fa20ae0dd6 soc: tegra: Reduce number of mem areas
Reduce number of memory areas for camrtc dbg tests
for DRAM optimization

Bug 3995285

Change-Id: Icc2250915ada202aee962c691d97f14ca861f31d
Signed-off-by: Aniket Bahadarpurkar <aniketb@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2902767
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: Pekka Pessi <ppessi@nvidia.com>
Reviewed-by: Semi Malinen <smalinen@nvidia.com>
Reviewed-by: Dipesh Gandhi <dipeshg@nvidia.com>
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
2023-08-28 15:12:02 -07:00
pshaw
01ecacf7b4 fsicom: add fsicom multi core support
- smmu and hsp support added for fsicom multi core
  feature in fsicom kernel driver
- probe, suspend and resume will be called for smmu_inst
  0 only as it will have single dev node for comm.
- mailbox 2,5 and 1,4 is used for TX and RX comm. respectively
  with FSI

Jira SS-5744

Change-Id: I859d5945853195ba76996a8c36ca19efd9c4409f
Signed-off-by: pshaw <pshaw@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2952268
Reviewed-by: Praveen James <pjames@nvidia.com>
Reviewed-by: Sumeet Gupta <sumeetg@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-08-27 21:50:21 -07:00
Jian-Min Liu
dc318641f5 nvsciipc: Fix issue associated with no permission to set db
CONFIG_ANDROID kconfig option has been removed from ack-6.1 version,
hence we add ACK_BUILD config to identify android build.

Bug 4223187

Change-Id: I77e6a40fc57a54d2115938e1906faf15ee879d60
Signed-off-by: Jian-Min Liu <jianminl@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2953312
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-08-24 23:32:11 -07:00
Jian-Min Liu
719d3fa024 nvidia-oot: use TEGRA_SYSTEM_TYPE_ACK as ack macro
Use config TEGRA_SYSTEM_TYPE_ACK to control kernel builds only
base on the system type which also aliged to Makefile use.

Bug 4223187

Change-Id: I276208d180d1b3459eccb80d8fdb818f4507d3df
Signed-off-by: Jian-Min Liu <jianminl@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2966713
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-08-24 23:32:04 -07:00
Vamsee Vardhan Thummala
46f980b806 drm/tegra: firewall: Check for is_addr_reg existence in IMM check
In the IMM opcode check, don't call is_addr_reg if it's not set.

Fixes: 8cc95f3fd35e ("drm/tegra: Add job firewall")
Change-Id: I2b7b35afeed774a571fd147aa922718f644c5c88
Signed-off-by: Mikko Perttunen <mperttunen@nvidia.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>
Signed-off-by: Vamsee Vardhan Thummala <vthummala@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2966639
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-08-24 23:21:30 -07:00
Johnny Liu
a588ad882d drm/tegra: Derive count weight from max freq
The original resume_freq will be overridden when the device is put
into suspend mode. Therefore, the resume cycle won't always use the
max frequency of the device to set the actmon count weight.

Change the implementation to use scaling_max_freq to always use the
max frequency of the device to set the actmon count weight.

Bug 4252125

Signed-off-by: Johnny Liu <johnliu@nvidia.com>
Change-Id: Iaaae8ada989cd1ed7dd728fb526ad4391a2f192c
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2967098
Reviewed-by: Mikko Perttunen <mperttunen@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-08-24 09:24:42 -07:00
Mark Mendez
1435b03c66 BPMP: reduce HV timeout to 30 sec
The current timeout of 10 minutes for the BPMP-HV IVC
is too long.  Reducing it to 30 sec

Bug 4180228

Change-Id: Ibfa86bee39c970d0bb3dbdf2b2b446fdb6ad9ef4
Signed-off-by: Mark Mendez <mmendez@nvidia.com>
(cherry picked from commit a775d866e9127b95b7adee8d3b4961bb6ee6ae89)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2962685
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Vipin Kumar <vipink@nvidia.com>
2023-08-24 09:11:47 -07:00
Chris Dragan
1a3e4521c8 misc: mods: update from Perforce to 4.20
Change-Id: I7ea45fb5aa393372299648e326e81ecf62913b40
Signed-off-by: Chris Dragan <kdragan@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2955034
Reviewed-by: Lael Jones <lajones@nvidia.com>
Reviewed-by: Sachin Nikam <snikam@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-08-24 09:03:53 -07:00
Jian-Min Liu
6f90c6d858 Fix unused function errors for ack user build
In Android's user-build, debugfs is not configured. This has led to
multiple warning errors related to Debugfs usage in the nvidia-oot
build. Add CONFIG_DEBUG_FS conditional compilation around the
functions that use it.

drivers/scsi/ufs/ufs-tegra-common.c:39:13: error: unused function
'ufs_tegra_init_debugfs' [-Werror,-Wunused-function]
static void ufs_tegra_init_debugfs(struct ufs_hba *hba)
            ^
 1 error generated.

drivers/platform/tegra/aon/tegra-aon-debug.c:732:13:
error: unused function 'tegra_aondbg_recv_msg'
[-Werror,-Wunused-function]
static void tegra_aondbg_recv_msg(struct mbox_client *cl, void *rx_msg)
            ^

drivers/platform/tegra/aon/tegra-aon-debug.c:749:12:
error: unused function 'aon_dbg_init' [-Werror,-Wunused-function]
static int aon_dbg_init(struct tegra_aondbg *aon)
           ^
 2 errors generated.

Bug 4230728

Change-Id: I4210c3574b4d76205fdca45990e9ccc02c18620a
Signed-off-by: Jian-Min Liu <jianminl@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2964635
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
2023-08-23 11:19:18 -07:00
Revanth Kumar Uppala
37b53e8d72 r8168: update driver to 8.051.02.10m_pll
- Update realtek r8168 driver version to 8.051.02.10m_pll
- This update disables 10M EEE

Bug 4205197

Change-Id: I0d20a2d6061e108192a3066965aff94e8a463ca5
Signed-off-by: Revanth Kumar Uppala <ruppala@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2962412
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-08-23 11:17:30 -07:00
Johnny Liu
1dcfd26f70 drm/tegra: Set nvjpg actmon count weight once
Change the implementation to set count weight values for both actmon and
the engine once in runtime resume cycle to align the implementation as
nvdec for kernel upstream.

Bug 4251915

Signed-off-by: Johnny Liu <johnliu@nvidia.com>
Change-Id: I6df0f13d1c58402cb78e4e05ff6cd6cd21ef2c4b
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2965505
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: Mikko Perttunen <mperttunen@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-08-23 02:34:10 -07:00
Johnny Liu
d6a45460a5 drm/tegra: Set nvenc actmon count weight once
Change the implementation to set count weight values for both actmon and
the engine once in runtime resume cycle to align the implementation as
nvdec for kernel upstream.

Bug 4251915

Signed-off-by: Johnny Liu <johnliu@nvidia.com>
Change-Id: Ie2df685e990a4ebcd5a83db23db3c3bc8ab2af37
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2965502
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: Mikko Perttunen <mperttunen@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-08-23 02:34:04 -07:00
Johnny Liu
f279ce0dfc drm/tegra: Set vic actmon count weight once
Change the implementation to set count weight values for both actmon and
the engine once in runtime resume cycle to align the implementation as
nvdec for kernel upstream.

Bug 4251915

Signed-off-by: Johnny Liu <johnliu@nvidia.com>
Change-Id: I63f625a2f64eb8c626c21389b5a3680001495fd5
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2965500
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: Mikko Perttunen <mperttunen@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-08-23 02:33:58 -07:00
Ankur Pawar
834dbf0781 i2c: camera: add updated ar1335 firmware
This new firmware provided by E-CON, starts ar1335 sensor
streaming at 100fps for mode0.

Bug 4111978

Change-Id: I2ba6aa3a2aec23c24319995224880e2fc24ca8ac
Signed-off-by: Ankur Pawar <ankurp@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2941192
Reviewed-by: Praveen AC <pac@nvidia.com>
Reviewed-by: Addarsh Srivastava <addarshs@nvidia.com>
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-08-22 02:13:17 -07:00
snchen
32026c1862 camera: csi: configure cphy by device tree
configure cphy mode by device tree instead of hard code.

bug 3865712

Change-Id: If58b9847e44def0183122c8f6b22d05391051f30
Signed-off-by: snchen <snchen@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2833242
(cherry picked from commit 7ded1647946aa7063ca0de3c8ffc69e27b29b9c5)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2866943
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: Ankur Pawar <ankurp@nvidia.com>
Reviewed-by: Bibek Basu <bbasu@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
Tested-by: Ankur Pawar <ankurp@nvidia.com>
2023-08-22 02:04:21 -07:00
Ashish Mhetre
4a11641e79 platform: tegra: Fix MC-HWPM driver
Simplify the MC-HWPM driver and fix the hang seen during probe of it.
These changes are made to scale the driver for future SOCs as well.
The hang is seen because MC registers are accessed in function
get_platform_dram_num_channels() before the MC aperture is io-mapped.

Bug 4235766

Change-Id: I3c8f9229898ac459c616aca0ef400a8b4c16e66a
Signed-off-by: Ashish Mhetre <amhetre@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2963195
Reviewed-by: Ketan Patil <ketanp@nvidia.com>
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: Sachin Nikam <snikam@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-08-20 17:44:08 -07:00
Ankur Pawar
804feada07 media: add imx477 sensor driver
Add imx477 camera sensor driver code,
mode tables and makefile changes.

Bug 3583587

Change-Id: Ib218e7d67f60f381a0e75edad71e9e5b35288dd3
Signed-off-by: Ankur Pawar <ankurp@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2864577
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
2023-08-20 07:04:10 -07:00
Ankur Pawar
ff01ad1318 media: add imx219 sensor driver
Add imx219 camera sensor driver code,
mode tables and makefile changes.

Bug 3583587

Change-Id: Ic7693de3cbdeeaecd7d9118a1e7819eaab5fdb3a
Signed-off-by: Ankur Pawar <ankurp@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2862964
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
2023-08-19 12:38:50 -07:00
Akshata Bhat
2279d375da dla: kmd: Follow-up update for single DLA boards
+ Updates the DLA0 enumeration logic (added by Gerrit 2945452)
and limits it to single instance boards only

+ On boards with 2 DLAs, the above logic caused DLA0 to be initialized
with DLA1 config and vice-versa.

Reason: DLA instances can be probed/initialized in any order. The first
DLA to call nvdla_probe() was enumerated as DLA0. But the DLA init was
done in accordance with the actual HW instance ID, resulting in device
node mismatch.

Bug 4233463

Signed-off-by: Akshata Bhat <akshatab@nvidia.com>
Change-Id: Ic054ebdae4aec95fdc50dc068cf1a6f6ecf928bf
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2958902
Reviewed-by: Arvind M <am@nvidia.com>
Reviewed-by: Mitch Harwell <mharwell@nvidia.com>
Reviewed-by: Amit Sharma (SW-TEGRA) <amisharma@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-08-18 11:02:40 -07:00
Saravanan Ponnuswamy
67366636bb nvidia-oot: MISRA violation fixes
This patch fixes the following violations:

CERT STR31-C - 3 violations

Signed-off-by: Saravanan P <saravananp@nvidia.com>
Change-Id: Ic1fa2b18e855a5eb6e28d09fd6f436151ed2a880
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2931426
(cherry picked from commit 4c29b05e2734b197b9ffcdd2a0d7e1e8cc788451)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2943561
Reviewed-by: Shu Zhong <shuz@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-08-18 10:50:42 -07:00
Ankur Pawar
630aa8bba7 media: add pca9570.c driver
Enable pca9570 for IO Expander.
This is used by IMX185.

Bug 4191790

Change-Id: Ia0051718803cc1c898969739a0cb975c7432b647
Signed-off-by: Ankur Pawar <ankurp@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2889570
Reviewed-by: Anubhav Rai <arai@nvidia.com>
Reviewed-by: Frank Chen <frankc@nvidia.com>
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-08-18 10:44:06 -07:00
Mainak Sen
420b84b69d drm/tegra: Stop channel DMA during suspend
When channels are kept open over a suspend cycle, we need to
re-initialize CDMA after resume.

Bug 4133027

Change-Id: I9a2737b377a9ffb37e5f98703b7928bfceab58e3
Signed-off-by: Mainak Sen <msen@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2963164
Reviewed-by: Mikko Perttunen <mperttunen@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-08-17 20:43:47 -07:00
Advaya Andhare
7d1a687636 nvvse: Allowing multiple access to dev node
- This CL partially reverts the changes done in CL - 2891721
- Current implementation checks if multiple process/threads/apps
  try to access same dev node when it is already open by another
  process/thread/app, and throws an error if condition is true causing
  new process/threads/apps to fail as in bug mentioned below
- This change allows multiple process/threads/apps to access the same
  dev node.

bug 4126726
jira ESSS-759

Change-Id: Ibe18449014e69148ae2feebd854b6c5d278f5bc4
Signed-off-by: Advaya Andhare <aandhare@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2946094
(cherry picked from commit 615a1aba49e2662d767a23e47fed329627f6f91e)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2956815
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: Nagaraj P N <nagarajp@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-08-17 20:29:44 -07:00
Bharat Nihalani
0f7f6190a1 nv-virtio-poc: Include correct header
This driver was including <linux/tegra-ivc.h> that uses deprecated
CONFIG_TEGRA_HV_MANAGER. This caused all tegra_hv functions to be
stubbed.

With K5.15, a new header <soc/tegra/virt/hv-ivc.h> should be
used instead that makes use of CONFIG_TEGRA_VIRTUALIZATION which
is enabled as part of the kernel build flow. With this header
included, all tegra_hv functions are correctly linked.

Also, there is no need to include tegra_hv.h as this driver
does not use the functions declared in that header.

Bug 4206871

Change-Id: I6ef6e2cf5f2c88dab015c2f10913ede4fdfd5583
Signed-off-by: Bharat Nihalani <bnihalani@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2954916
Reviewed-by: Nitin Kumbhar <nkumbhar@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-08-17 20:27:27 -07:00
Jian-Min Liu
7bcd11a009 Avoid function re-definition when FS_DEBUG is not set
add FS_DEBUG to the implementation function to avoid re-definition
build error caused by FS_DEBUG is not set with ack user build.

Bug 4230728

Change-Id: I0c1d4357ec86f030b386f65cd32bed87b2382557
Signed-off-by: Jian-Min Liu <jianminl@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2952839
Reviewed-by: Kevin Kuo (SW-GPU) <kevkuo@nvidia.com>
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-08-17 20:19:17 -07:00
Mahesh Patil
6883238a21 nvethernet: Fix coverity "unused value"
Bug 3952896

Change-Id: Ie30c3da4d0979f664cb3c951794e905b52e5c005
Signed-off-by: Mahesh Patil <maheshp@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2952208
Reviewed-by: Nagaraj Annaiah <nannaiah@nvidia.com>
Reviewed-by: Bhadram Varka <vbhadram@nvidia.com>
Reviewed-by: Ashutosh Jha <ajha@nvidia.com>
2023-08-17 20:16:21 -07:00
Anubhav Rai
d6bcba5193 vi5: fix v4l2 VI driver channel open
unmap chan_id from DT with capture channel id.
Capture channel id is shared between isp capture
and v4l2. Find a free capture channel that does not
conflict with other clients

bug 3691031

Change-Id: If3cd887db6feb2a1817a7451249185de47d6e9ad
Signed-off-by: Anubhav Rai <arai@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2768753
(cherry picked from commit cf54cc587eba0854236c634b8ec0c1c2c98a3a5d)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2866951
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: Ankur Pawar <ankurp@nvidia.com>
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
Tested-by: Ankur Pawar <ankurp@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-08-17 20:05:09 -07:00
Anubhav rai
b66b703f0e camera: vi: Fix VI clk scaling for gangmode
gangmode uses single VI channel to stream simultaneously
from 2 CSI bricks. The VI clk should be scaled accordingly
to accommodate this bandwidth

bug 3814565

Signed-off-by: Anubhav rai <arai@nvidia.com>
Change-Id: I6912f1aeb878e53e63e3a04c7132219f030973d1
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2791338
(cherry picked from commit 7a95f84f1eb4f60a8e9740876db53b23c95f865e)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2866932
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: Ankur Pawar <ankurp@nvidia.com>
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
Tested-by: Ankur Pawar <ankurp@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-08-17 20:05:03 -07:00
Anubhav Rai
33f74c0dd8 csi5: add lane polarity config
parse the lane polarity config from the DTB and
program the nvcsi brick config accordingly.

bug 3865161

Change-Id: I70f746a40033bafa7d9286790b9c01ae5986a9f8
Signed-off-by: Anubhav Rai <arai@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2855412
(cherry picked from commit bee21e4c839b8c55ac6314fd55f2e36edd547c97)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2953780
Reviewed-by: Ankur Pawar <ankurp@nvidia.com>
Reviewed-by: Praveen AC <pac@nvidia.com>
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-by: Semi Malinen <smalinen@nvidia.com>
Tested-by: Ankur Pawar <ankurp@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-08-17 05:11:26 -07:00
Ketan Patil
1c2599bcba video: tegra: nvmap: Update carveout name
Compression carveout is not correct carveout name as it will be used
by gpu even for non-compression usecases. Hence rename it to gpu
carveout.

Bug 3956637

Change-Id: I802b91d58d9ca120e34655c21f56c0da8c8cf677
Signed-off-by: Ketan Patil <ketanp@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2955536
Reviewed-by: Pritesh Raithatha <praithatha@nvidia.com>
2023-08-16 18:47:35 -07:00
Aniket Bahadarpurkar
3e51976226 tegra: cdi: Add delay while setting gpio
On p3898 platform, VCC_CAM can't handle high
inrush current when gpios are set in parallel.
Hence, a SW WAR is required to add a delay of 5ms
after a gpio is set.

Bug 4125801

Change-Id: Ib235cb00b5ef42c7255be5d212dd9e190630d7bc
Signed-off-by: Aniket Bahadarpurkar <aniketb@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2943541
(cherry picked from commit 6e44996aae022c9e46fb431b75d60c8499bcd874)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2953356
Reviewed-by: Dipesh Gandhi <dipeshg@nvidia.com>
Reviewed-by: Frank Chen <frankc@nvidia.com>
2023-08-16 18:39:52 -07:00
Sagar Tyagi
a65561e6b4 p3898: Bridge driver for MAX96751
Implemented the bridge driver
for MAX96751 HDMI serializer.
In initial version following
features were added.

1) Bring serializer into functional state
2) Drive the RCLKOUT
3) Power management operations

Bug 4069908

Change-Id: Ifbfe5fed3eba5b35303a5072d7eb5935884f1a0f
Signed-off-by: Sagar Tyagi <satyagi@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2905398
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Shu Zhong <shuz@nvidia.com>
2023-08-16 06:38:07 -07:00
Jian-Min Liu
898a587665 Revert "Add compiler flag to avoid function re-definition"
This reverts commit 2cf67077e2.

The CONFIG_TEGRA_VIRTUALIZATION defined in the top-level Makefile
can be effective in the ACK build after refined make cmd.

Bug 4187941
Bug 4223187

Signed-off-by: Jian-Min Liu <jianminl@nvidia.com>
Change-Id: Ibe2eabd7c3b84c8f753a089231e90993f377b513
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2954802
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
2023-08-14 01:55:13 -07:00
Jian-Min Liu
f36fdd5baf Revert "Ensure virtualization macro are defined with ACK"
This reverts commit 9a53ca82d0.

The CONFIG_TEGRA_VIRTUALIZATION defined in the top-level Makefile
can be effective in the ACK build after refined make cmd.

Bug 4187941
Bug 4223187

Signed-off-by: Jian-Min Liu <jianminl@nvidia.com>
Change-Id: Ide57f77b6d82770d9a1eeeb91c25e0b34d5911f0
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2954801
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
2023-08-14 01:55:07 -07:00
Jian-Min Liu
1df2ef7d23 nvidia-oot: Fix compilation warning for ack build
Refine the compiler flags for ACK make command and fix compilation
warnings from the new command.

Bug 4187941
Bug 4223187

Signed-off-by: Jian-Min Liu <jianminl@nvidia.com>
Change-Id: Iff7bf5839c585a6c3d3ef6daefb64eb113c739e2
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2954087
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-08-14 01:54:51 -07:00
Akhil R
37cf697fb1 crypto: tegra: Init keyslot for SHA as well
Inititalize keyslot for SHA algorithms as well since SHA-HMAC
uses the same keyslots.
Also reduce the log level of some prints. The scenario does not
have any functional impact that the user need to be notified.

Bug 4221414

Signed-off-by: Akhil R <akhilrajeev@nvidia.com>
Change-Id: I73449144ce56aaf35fae52aa1c4c5b0bb8c01d9c
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2952640
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-08-13 00:37:29 -07:00
Bruce Xu
db10888783 nvidia-oot: set/clear vm_flags via function
In new kernel, need to update vm_flags via kernel
provided function. Otherwise below error is met:
./include/linux/mm_types.h:476:20: note: non-static data member
'vm_flags' declared const here
                const vm_flags_t vm_flags;
                ~~~~~~~~~~~~~~~~~^~~~~~~~
1 error generated.

Bug 4196760

Change-Id: I03455af7ce3623d0d8a0f0cd56d569ef3c7af9ea
Signed-off-by: Bruce Xu <brucex@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2938942
Reviewed-by: Mikko Perttunen <mperttunen@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-08-11 05:19:43 -07:00
Sameer Pujar
1e35fdd8c5 ASoC: tegra: Align with upstream DT for compatible and clock name
It is nice to have downstream DTB working well with upstream kernel
drivers. This gives a flexibile option for users to choose between
out-of-tree and upstream audio drivers by selectively adding either
of these to deny list.

For clock PLLA_OUT0, upstream DT uses 'plla_out0' clock name where
as downstream uses 'pll_a_out0'. So aligning with upstream DT makes
probe to fail. Thus update the clock name in driver to match upstream
DT bindings.

The sound DT supports compatibles to either work with upstream or
downstream machine drivers. Earlier the source 'tegra_codecs.c' was
modified to make it potentially usable for upstream machine driver
as well and thus it has upstream compatible checks. This check is
now replaced with a flag which is known to be set only during
upstream machine driver probe.

Bug 4119612

Change-Id: Icd5d97343029e35a5702ff4dc527881fb9277346
Signed-off-by: Sameer Pujar <spujar@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2948525
Reviewed-by: Mohan Kumar D <mkumard@nvidia.com>
Reviewed-by: Dara Ramesh <dramesh@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-08-10 00:33:15 -07:00
Wayne Chang
5fe0f39e06 usb: typec: Add fusb301 driver support
The change adds fusb301 driver support on k5.15.

Bug 4119758

Signed-off-by: Wayne Chang <waynec@nvidia.com>
Change-Id: I9af363b46e71853c1681c68396dff7f5e9036d6a
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2917816
Tested-by: Brad Griffis <bgriffis@nvidia.com>
Reviewed-by: Brad Griffis <bgriffis@nvidia.com>
Reviewed-by: Bibek Basu <bbasu@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-08-10 00:26:01 -07:00
Johnny Liu
d412dc39e1 drm/tegra: Set actmon count weight for nvdec once
Method invocation for updating count weight for nvdec may conflict
with a job being submitted through host1x.

Change the implementation to set count weight values for both actmon and
the engine once in runtime resume cycle to prevent possible conflicts.

Bug 3962196

Signed-off-by: Johnny Liu <johnliu@nvidia.com>
Change-Id: I19d160abd90373721df78cdb107ca396a206a6e8
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2952692
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
2023-08-09 10:50:55 -07:00
Johnny Liu
69d9f479a4 drm/tegra: Unify logic for suspend and resume
Two main changes for the suspend and resume:
1. Set clock to Fmin/Fmax in suspend/resume cycles
2. Reorder the code in suspend and resume functions and add recovering
   logic when error happens in between

Bug 4224081

Signed-off-by: Johnny Liu <johnliu@nvidia.com>
Change-Id: Iadb0b1f960ca8b9c80094d1769a2d90496263124
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2948452
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
2023-08-09 10:40:23 -07:00
Sahil Mukund Patki
61af983ca4 tsec: fix coverity defect
Issue:
Unchecked return value for clk_prepare_enable function.

Fix:
Add check for return value of clk_prepare_enable function and take
proper action in case of error.

CID 10162292

Bug 3952896

Change-Id: I2f3a75d028fbed2f855b72d2efc9a30844b8c336
Signed-off-by: Sahil Mukund Patki <spatki@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2950809
Reviewed-by: Ketan Patil <ketanp@nvidia.com>
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-08-08 20:56:29 -07:00
Johnny Liu
c983eec625 drivers: pva: skip vpu load reading when suspended
WHen PVA is already suspended, there is no need to resume the device
through nvhost_module_busy and send mailbox request to PVA for VPU load
reading. It avoids switching CV power domain on and off.

Bug 4168798

Signed-off-by: Johnny Liu <johnliu@nvidia.com>
Change-Id: Ib9ec4d4ded2b96ee8f76267e190087612d1e0468
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2946818
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: Ninad Malwade <nmalwade@nvidia.com>
Reviewed-by: Omar Nemri <onemri@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-08-08 06:47:35 -07:00
Ketan Patil
edf9d114e1 video: tegra: nvmap: Don't perform repetitive ioremap
__ioremap function called during cache maint takes more time in case of
multiple processes compared to single process. This is impacting camera
tests when multiple cameras are used. For carveouts, nvmap performs page
by page ioremap and then cache maint on it. Optimize this with following
steps:
- During first cache_maint of the buffer, perform ioremap on entire
buffer and save the kernel V.A.
- Next time, when cache_maint is called on the same buffer, we will
reuse the saved kernel V.A.

Bug 3922175

Change-Id: Iecb372365409de1951bcc8e6f3d8e8e867bb2a80
Signed-off-by: Ketan Patil <ketanp@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2948759
Reviewed-by: Barton Xu (SW-TEGRA) <bartonx@nvidia.com>
Reviewed-by: Krishna Reddy <vdumpa@nvidia.com>
Reviewed-by: Sachin Nikam <snikam@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-08-07 05:01:37 -07:00
dbadgaiyan
e063d55fff nvscic2c-pcie: update async error reporting
NVSCIC2C_PCIE_EDMA_XFER_ERROR is returned when failure received from
PCIe EDMA in callback or when job scheduling failed.
Remove returning NVSCIC2C_PCIE_EDMA_XFER_ERROR in case of PCIe EDMA job
schedule failure as schedule failure should be due to validation failure.

UMD will return NVSCIC2C_PCIE_VALIDATION_ERROR for this case too.

Jira NVIPC-1333
Bug 4197626
Signed-off-by: dbadgaiyan <dbadgaiyan@nvidia.com>

Change-Id: I6e079360b4129aebcd75204267934f7b821a4b99
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2941054
(cherry picked from commit 6e58a46b78e37b5a6399bebc2f16c338b6444487)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2947673
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: Arihant Jejani <ajejani@nvidia.com>
Reviewed-by: Vipin Kumar <vipink@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
Tested-by: Deepak Kumar Badgaiyan <dbadgaiyan@nvidia.com>
2023-08-05 13:09:23 -07:00
Johnny Liu
d171c817ec drm/tegra: Correct icc cleanup logic
Since devm_of_icc_get is used, no need to call icc_put when device probe
fails or device driver is removed.

Bug 4222919

Signed-off-by: Johnny Liu <johnliu@nvidia.com>
Change-Id: Ide313c6f56e1bef83ffe3718cd434abbdaeec869
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2947933
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: Mikko Perttunen <mperttunen@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-08-04 14:09:18 -07:00
Sushil Kumar Singh
8fc898d1ec nvethernet: assign macsec private data to NULL
Issue:
L4T platforms on boot comes up with MTU as 1500.
However on changing the MTU to jumbo, the final
MTU which gets set accounts the MACSEC ICV tag
len and reduces the MTU by 34 bytes even though
the platform does not support MACSEC.

Fix:
Assign macsec allocated private data to NULL and
use the NULL check in ndo mtu change ioctl call
to reject MTU reduction if macsec is not supported.

Bug 4137597

Change-Id: Ica3003b54762dd5d240c9b0c5c012049b4e503b2
Signed-off-by: Sushil Kumar Singh <sushilkumars@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2928569
Reviewed-by: Revanth Kumar Uppala <ruppala@nvidia.com>
Reviewed-by: Bibek Basu <bbasu@nvidia.com>
Tested-by: Revanth Kumar Uppala <ruppala@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-08-04 13:57:42 -07:00
Akshata
410b23ffce dla: kmd: Update logic for single DLA boards
+ Added logic to enumerate single instance DLA as
DLA0 for Linux builds

Bug 4165116

Change-Id: If01bfa98a9bcef02270056d786e4574785a46850
Signed-off-by: Akshata <akshatab@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2945452
Reviewed-by: svcacv <svcacv@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-08-03 20:27:56 -07:00
omar
058bb1ad7f drivers: pva: add checks on block height
Block height has valid values > 0 and < 6. Add checks to validate
values to be legal.

Additionally, a value of 0xff indicates channel has no block linear
transfer descriptors.  0xff to be converted to 0.

Bug 4185281

Change-Id: I8a2ff03a4098a27eb0ad6a773abbb50a2cbc50a7
Signed-off-by: omar <onemri@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2944683
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-08-02 14:13:53 -07:00