Commit Graph

2826 Commits

Author SHA1 Message Date
Ketan Patil
6b88806712 video: tegra: nvmap: Do not recycle handle id immediately
xa_alloc can return the handle id which was freed recently. Instead,
once handle id is provided, next time start from next handle id. Once
max limit is reached then start from U32MAX / 2 again.

Bug 4171509

Change-Id: Ib5678136835e809632e4a2498b4dffe522e56c8d
Signed-off-by: Ketan Patil <ketanp@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2942022
(cherry picked from commit 2927da12a16d69d2bc49d3a6e910abefefd77f5b)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2942016
Reviewed-by: Sachin Nikam <snikam@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-08-02 14:05:09 -07:00
Jian-Min Liu
9a53ca82d0 Ensure virtualization macro are defined with ACK
The "subdir-ccflags-y += -DCONFIG_TEGRA_VIRTUALIZATION" defined in the
top-level Makefile seems to be ineffective in the ACK build, so it is
redefined in each local Makefile.

Bug 4187941

Change-Id: I47c515a20704736ea44881b65c59639bf8242760
Signed-off-by: Jian-Min Liu <jianminl@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2942314
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: Jonathan Hunter <jonathanh@nvidia.com>
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-08-01 12:38:09 -07:00
Sanjith T D
8975fb1f4b virt_storage: Update calling of ivc_reset()
Below race condition can happen during boot
1) Server calls sivc_reset()
2) Storage client driver has IVC event handler registered, so it gets the event
   and it calls ivc_notified()
3) Server gets ivc event, it calls ivc_notified()
   ( this makes server local state to established )
4) Storage cliend driver also goes to established state
5) After this, storage client driver continued with probe() and
   calls ivc_reset() which results in disconnecting the
   already established connection.

To fix this race condition, perform ivc_reset in storage client
driver right after tegra_hv_ivc_reserve() before registering
the IVC IRQ handler.

Bug 4125055

Change-Id: I36e6db3479f34fb649bdb8d890f24b1783d10cb9
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2943766
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Manish Bhardwaj <mbhardwaj@nvidia.com>
Reviewed-by: Sanjith T D <std@nvidia.com>
Reviewed-by: Vipin Kumar <vipink@nvidia.com>
Tested-by: Manish Bhardwaj <mbhardwaj@nvidia.com>
2023-07-31 06:26:24 -07:00
Sushil Kumar Singh
0f0dc2e6c1 nvethernet: Cancel set speed workqueue on SC7 entry
set speed work function is not cancelled on system suspend
fix this by cancelling the work queue function

Bug 4167378

Change-Id: I2c065011a830470f690441b2c841893479b361fb
Signed-off-by: Sushil Kumar Singh <sushilkumars@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2921347
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
2023-07-28 13:16:35 -07:00
Revanth Kumar Uppala
4c0d72dba6 nvethernet: Fix coverity defect
Issue:
Assigning value 0 to ret, but that stored value is overwritten
before it can be used.

Fix:
Remove unused assignment to ret

CID: 10166550

Bug 3952896

Change-Id: Ieb877e618ca252c218b338682ca02d44096c7a47
Signed-off-by: Revanth Kumar Uppala <ruppala@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2942165
Reviewed-by: Narayan Reddy <narayanr@nvidia.com>
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-07-27 18:42:20 -07:00
Sushil Kumar Singh
cec663aa8d r8168: Fix -20C 10mbps failure in Mods test
Issue:
Ethernet mplan stability tests at -20C for 10Mbps fails with rate 15%
Basically the GPHY 10M power saving includes the below parameters,
clock speed down, pll off and reference voltage off.
During debugging it was found that enable/disable pll circuit
frequently when in 10M low data traffic (such as idle mode) may have
a corner case and plays a part in this issue repro.

Fix:
So plloff saving function should be disable (do not have to open it) for nvidia -20C mplan test case.

Bug 3946623

Change-Id: I87ab9b487fe5924ee9ee16bbb14d7f8c19f3a4e7
Signed-off-by: Sushil Kumar Singh <sushilkumars@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2939046
Tested-by: Revanth Kumar Uppala <ruppala@nvidia.com>
Reviewed-by: Revanth Kumar Uppala <ruppala@nvidia.com>
Reviewed-by: Bitan Biswas <bbiswas@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
Signed-off-by: Revanth Kumar Uppala <ruppala@nvidia.com>
(cherry picked from commit 80f6470d40821bfbad8f8166d22442e949b47173)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2942039
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
2023-07-27 18:41:33 -07:00
Aniket Bahadarpurkar
3b116f7c1a tegra: rtcpu: use separate thread for reading ivc
Using global work queue and its associated worker
pool to read IVC messages from RTCPU may lead to
capture timeouts if the worker thread is not able
to get cpu due to other higher priority threads in
the system. Hence use a separate RT thread to read
IVC.

Notes for nvidia-oot: 

Use low fifo priority for worker threads to avoid
pre-empting the interrupt thread serving the HSP
driver.

Bug 200643334
Bug 3293029
Bug 3291799
Bug 4084364

Old-Change-Id: I5a3e749ec46fac1c7a2de74968169443f5cab939
Signed-off-by: Aniket Bahadarpurkar <aniketb@nvidia.com>
Signed-off-by: Pekka Pessi <ppessi@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2689827
(cherry picked from commit 18d670accc7960b0afbc7b58b339a323e424e010)
Change-Id: I48e22606e53d934d3788d524fd1f496d0f92a04a
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2939796
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: Viktor Horsmanheimo <viktorh@nvidia.com>
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com>
Reviewed-by: svc-mobile-cert <svc-mobile-cert@nvidia.com>
Reviewed-by: Kalle Jokiniemi <kjokiniemi@nvidia.com>
Reviewed-by: Sudhir Vyas <svyas@nvidia.com>
Tested-by: Viktor Horsmanheimo <viktorh@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-07-25 15:26:25 -07:00
Prathamesh Shete
e15d8dc379 pinctrl: dont compile pinmux driver under nvidia-oot
This is being done as pinmux driver is being moved to kernel-oot.

Bug 3950014

Change-Id: Id32a3c0e839ac48dd4e64a58d1c794455463a1ab
Signed-off-by: Prathamesh Shete <pshete@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2844308
Reviewed-by: Jonathan Hunter <jonathanh@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-07-25 15:03:09 -07:00
Bhadram Varka
7cf98e614a nvethernet: return error from ether_get_tx_ts
ether_get_tx_ts, pdata->tx_ts_ref_cnt is an atomic variable
that is used as a mutex in this function and should not return 0
if the function fails to acquire the mutex.
The workqueue is scheduled when the return value of the
judgment function is <0. If one CPU core execution softirq
is running in ether_get_tx_ts function and another CPU core
softirq also calls ether_get_tx_ts function to get hardware
timestamp, then the acquisition of mutex fails and return 0.
After returning 0, the workqueue is not scheduled.
The timestamp cannot be obtained in time. So ether_get_tx_ts
should returns -1 on failure to acquire the mutex.

Bug 4150416

Change-Id: Icffd409b349d8bb8dbf5a483124b3bd3d7ef6cc8
Signed-off-by: Bhadram Varka <vbhadram@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2934350
Reviewed-by: Bitan Biswas <bbiswas@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-07-24 17:41:11 -07:00
Rohit Khanna
2561ee0aa9 drivers: Fix mods arm ffa error for kernel 6.1
Updated from ffa_ops to msg_ops for ffa api

Change-Id: I59bec58f2546d2aee1474d6c63a40b8871cd1e52
Signed-off-by: Rohit Khanna <rokhanna@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2934214
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: Chris Dragan <kdragan@nvidia.com>
Tested-by: Koen Zhao <koenz@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-07-21 20:07:39 -07:00
Abhilash G
2797b7499d scsi: ufs: Remove hardcoded programming to enable HS mode
Remove hardcoded programming to enable HS mode since we
need to support PWM mode for UFS for provisioning.

Bug 3866554

Change-Id: I8b3ef6ca61b51009129f6b42fa169eaa5101c347
Signed-off-by: Abhilash G <abhilashg@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2938538
Reviewed-by: Mallikarjun Kasoju <mkasoju@nvidia.com>
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-07-21 12:11:05 -07:00
omar nemri
8e837b02d4 drivers: pva: add buffer serial id for fences
in order to support unique identification of semaphores
while tracing across VMs, a unique identifier is added
during buffer pin and is emitted in traces.

Bug 4149342

Change-Id: I88e53be197f5354834795aab197e8de39535ac5c
Signed-off-by: omar nemri <onemri@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2938555
Reviewed-by: Nikita Chumakov <nchumakov@nvidia.com>
Reviewed-by: Oleg Sikorskiy <osikorskiy@nvidia.com>
Reviewed-by: Amruta Sai Anusha Bhamidipati <abhamidipati@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-07-21 12:09:54 -07:00
Nitin Kumbhar
8472163ba0 drivers: nv virtio poc console driver
Add a back-end char driver to implement a virtio console driver which
handles a part of virtio mmio protocol to send and receive data
from a peer VM. IVC queue and mempool are used for this communication.

Also, this driver adds blocking read, write and poll ops for an
user-space application.

JIRA TSSKERNEL-1
Bug 4050146

This change also cherry-picks the fix pushed in linux-nvidia repo:
https://git-master.nvidia.com/r/c/linux-nvidia/+/2918779

Change-Id: I97a88f1dd4eb9e3ac7e1e94439f3ebc8ac933239
Signed-off-by: Nitin Kumbhar <nkumbhar@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2898234
(cherry picked from commit 10436d9d5bfbbf11ffc63771189b57fdf94e50f6)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2936644
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
Tested-by: Bharat Nihalani <bnihalani@nvidia.com>
Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>
2023-07-21 11:58:30 -07:00
Ankur Pawar
0d04975aed media: i2c: Fix camera driver Coverity defects
Fix the below Coverity defects for lt6911uxc driver

Unchecked return value
CID: 10174208

Dereference null return value
CID: 10174210

Unchecked return value
CID: 10175851

Bug 3952896

Change-Id: I43132879e31f8a27db8fd41c717d598fb2c33490
Signed-off-by: Ankur Pawar <ankurp@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2915435
Reviewed-by: Praveen AC <pac@nvidia.com>
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com>
Reviewed-by: svc-mobile-cert <svc-mobile-cert@nvidia.com>
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-by: Frank Chen <frankc@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-07-21 01:24:49 -07:00
Jian-Min Liu
fc93f2390c Separate -Werror=frame-larger-than as clang can't recognize
Use '-Werror' and '-Wframe-larger-than' to replace
'-Werror=frame-larger-than' since clang compiler can't
ecognize the combination.

Build failure:

error: unknown warning option '-Werror=frame-larger-than=2560'; did you
mean '-Werror=frame-larger-than='? [-Werror,-Wunknown-warning-option]

Bug 4187941

Change-Id: I4d05a8dc96820517e1047b982a24ed97bb21327f
Signed-off-by: Jian-Min Liu <jianminl@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2938229
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
2023-07-20 01:19:53 -07:00
Jon Hunter
9f2ed528c8 drm/tegra: Fix interconnect support for Linux v6.2+
Interconnect support for multimedia engines is disable for Linux v6.2
kernels. Rather than always disabling interconnect support for these
kernels, we just need to ensure the necessary upstream kernel patches
are in place for Linux v6.2 kernels. Therefore, enable interconnect
support for all kernels.

Bug 4097374

Change-Id: Ibceb866ba239454a131543cdff90e68007b28942
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2937758
Reviewed-by: Johnny Liu <johnliu@nvidia.com>
Reviewed-by: Sumit Gupta <sumitg@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-07-20 01:16:09 -07:00
Santosh BS
32221411a4 gpu: host1x: add .signaled op for host1x_syncpt_fence_ops
Add a callback function host1x_syncpt_fence_signaled() to
.signaled op under host1x_syncpt_fence_ops.

.signaled is a optional operation. The change here is a performance
improvement and acts as temporary workaround for sync_file code not
calling enable_signaling.

Bug 4085239

Change-Id: Ief19c2d9af3f504bb1a067bfc9a31b9ef2ecd8fc
Signed-off-by: Santosh BS <santoshb@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2935867
Reviewed-by: Mikko Perttunen <mperttunen@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-07-20 01:10:50 -07:00
Manish Bhardwaj
d421a6465c storage: fix cert-c issue in tegra_hv driver
Using this patch we are fixing below cert error:-
1. check_return: Calling tegra_ivc_init without checking
   return value (as is done elsewhere 42 out of 52 times).

CID 10177835

Bug 3512545

Change-Id: I625914bbeee69718689d23da942feec9f05e9236
Signed-off-by: Manish Bhardwaj <mbhardwaj@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2937650
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: Sachin Nikam <snikam@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-07-19 08:49:56 -07:00
Jon Hunter
6f92155013 drivers: Enable -Werror for all drivers
Treat all warnings as errors when compiling the out-of-tree drivers.

Bug 4190165

Change-Id: Idba0f6385445b010cd272d5c44c517dfdf1f45ec
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2934460
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-07-19 08:47:23 -07:00
Jon Hunter
308514c910 net: nvethernet: Fix unused variable warning
If DEBUGFS is not enabled, then the following warning is observed ...

 drivers/net/ethernet/nvidia/nvethernet/sysfs.c:3321:6:
  error: unused variable [-Werror=unused-variable]
  3321 |  int ret = 0;
       |      ^~~

Fix this by ensuring that 'ret' is only defined if the DEBUGFS is
enabled.

Bug 4190165

Change-Id: I0182874592f20abe8d53b7bfdcfd099518b23f9c
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2938450
Reviewed-by: Revanth Kumar Uppala <ruppala@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-07-19 08:47:18 -07:00
Jon Hunter
926a606226 platform: tegra: rtcpu: Fix frame-size warning
Building the Tegra RTCPU driver generates the following warning ...

 drivers/platform/tegra/rtcpu/tegra-rtcpu-trace.c:
  In function ‘rtcpu_trace_exceptions’:
 drivers/platform/tegra/rtcpu/tegra-rtcpu-trace.c:331:1:
  error: the frame size of 1424 bytes is larger than 1024 bytes
  [-Werror=frame-larger-than=]
  331 | }
      | ^

Allow the frame size to be 2048 bytes to resolve the warning while a
proper fix is implemented.

Bug 4190165

Change-Id: Id684711f036fce759d7a328ad7d63f754a9b46e0
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2938377
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: Frank Chen <frankc@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-07-19 08:47:13 -07:00
Jon Hunter
bc6f405401 spi: tegra124-slave: Fix support for Linux v6.3
Linux v6.3 updated the GPIO APIs to use GPIO descriptors instead of
indices. This broke the Tegra SPI slave driver and when compiling the
driver for Linux v6.3 various warnings are observed. Update the Tegra
SPI slave driver as necessary to fix support for Linux v6.3.

Bug 4014315
Bug 4190165

Change-Id: Idfa29f729351d2971a649ddbcf1c3e9bf658d160
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2938376
Reviewed-by: Vishwaroop A <va@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-07-19 08:47:08 -07:00
Jon Hunter
9655b8c6b0 net: nvethernet: Fix CONFIG_TEGRA_NVPPS not defined warning
Compiling the nvethernet driver without the ccflag CONFIG_TEGRA_NVPPS
defined generates the following warning ...

 drivers/net/ethernet/nvidia/nvethernet/ether_linux.c:2936:5:
 warning: "CONFIG_TEGRA_NVPPS" is not defined, evaluates to 0 [-Wundef]
  2936 | #if CONFIG_TEGRA_NVPPS
       |     ^~~~~~~~~~~~~~~~~~

Fix this by using '#ifdef' to determine if CONFIG_TEGRA_NVPPS is
defined instead of '#if'.

Bug 4190030

Change-Id: Id1523de6f9ef9f4c72669584efb77ffd9ddf20f3
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2938375
Reviewed-by: Revanth Kumar Uppala <ruppala@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-07-19 08:47:03 -07:00
Jon Hunter
b970ad45ec platform: tegra: dce: Remove unneeded warning flags
The Tegra DCE driver compiles fine without the GCC flags to disable
specific warnings and so remove these to catch any new warnings that get
introduced that might be missed with these flags in place.

Bug 4190165

Change-Id: I4f2d445588baecec89ca9ba979e5d8febe39cf3c
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2938374
Reviewed-by: Mahesh Kumar <mahkumar@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-07-19 08:46:58 -07:00
Jon Hunter
06f4bc788a crypto: Remove -Wno-implicit-fallthrough flag
The crypto drivers compile fine without the ccflag
-Wno-implicit-fallthrough so remove this flag to catch any new warnings
that might be introduced.

Bug 4190030

Change-Id: Ibddbd9d76ea1faa4fa4d5b3a1ed12e1eaf36b40d
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2936714
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: Manish Bhardwaj <mbhardwaj@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-07-19 08:46:53 -07:00
Jeremy Alves
10ac600b18 Lan743x - fix SC7 resume
Incorporate fixes from bug 4071996 and 3457173
To fix issue with userland phy driver interface
during sc7 resume

Bug 4172302

Change-Id: I827be437172ed1992baa724149fb39dd1e1f92ac
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2932422
Tested-by: Jeremy Alves <jalves@nvidia.com>
Reviewed-by: Jeremy Alves <jalves@nvidia.com>
Reviewed-by: Praveen Ishwar Bajantri <pbajantri@nvidia.com>
Reviewed-by: Sumeet Gupta <sumeetg@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-07-19 08:45:52 -07:00
Ankit Patel
a922b344f8 nvidia: serial: CH384 driver support added
CH384 is a PCI-Express bus converter chip, which converts PCIE bus to Quad
serial ports and printer port, including four asynchronous serial ports
compatible with 16C550 or 16C750

This VCP driver supports pci to uart chips ch382/ch384, Crystal frequency
support 22.1184M

Bug 3857918

Change-Id: Iae13dbbb0959178d69a93277823d8305973d66be
Signed-off-by: Ankit patel <anpatel@nvidia.com>
(cherry picked from commit c0239f39c89fcd11dc9a3228892e920c680ddf49)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2921009
Tested-by: Jonathan Hunter <jonathanh@nvidia.com>
Reviewed-by: Jonathan Hunter <jonathanh@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-07-19 02:06:45 -07:00
Johnny Liu
10474851f5 gpu: host1x: Correct allocated size for contexts
Oirginal implementation over allocates the memory size for the
contexts list. The size of memory for the contexts list is based
on the number of iommu groups specified in the device tree.

Bug 4183400

Signed-off-by: Johnny Liu <johnliu@nvidia.com>
Change-Id: I0ccfd7c67b995b0b335d05e1fb93c236c335b75d
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2931800
Reviewed-by: Jonathan Hunter <jonathanh@nvidia.com>
Reviewed-by: Bibek Basu <bbasu@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-07-18 12:12:38 -07:00
Sheetal Tigadoli
1a3543c91c drivers:nvpps:print warn msg in GETEVENT ioctl call
print ptp not running warning msg from NVPPS_GETEVENT
ioctl call
Existing print msg was coming even before boot completes
and hence was printing always.
Relocate these warn msgs to print once when NVPPS_GETEVENT
ioctl is called

Jira ESDP-20108

Change-Id: I41ea5133e3f7d3525e3529fd09058225661d66bb
Signed-off-by: Sheetal Tigadoli <stigadoli@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2915293
(cherry picked from commit 1ad9baad22516e8bc83116c8fc9d22b59c000d6a)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2936977
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com>
Reviewed-by: svc-mobile-cert <svc-mobile-cert@nvidia.com>
Reviewed-by: Sumeet Gupta <sumeetg@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-07-17 14:48:34 -07:00
Jon Hunter
789890bd3e net: nvethernet: Fix compilation warning
Building the nvethernet driver generates the following warning ...

 drivers/net/ethernet/nvidia/nvethernet/ether_linux.c:6730:1: warning:
 the frame size of 3664 bytes is larger than 2048 bytes
 [-Wframe-larger-than=]

For now allow the frame size to be 4096 bytes to resolve the warning
while a proper fix is implemented.

Bug 4190030

Change-Id: I5460ec04c80458174c2c51dd0058b7cc191fe808
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2934698
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: Revanth Kumar Uppala <ruppala@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-07-17 14:37:54 -07:00
Jon Hunter
88af3f4d9f crypto: nvvse: Fix compilation warning
Building the nvvse-cryptodev driver generates the following warning ...

 drivers/crypto/tegra-nvvse-cryptodev.c:2118:1: error: the frame size of
  2224 bytes is larger than 2048 bytes [-Werror=fra
me-larger-than=]
 2118 | }
      | ^

For now allow the frame size to be 2560 bytes to resolve the warning
while a proper fix is implemented.

Bug 4190030

Change-Id: Id361aebc9f3d83181afc820d8d9cf2ef90e33d55
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2934696
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: Manish Bhardwaj <mbhardwaj@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-07-17 14:37:49 -07:00
Akshata
e1ea98691b dla: kmd: Update resource utilization logic
+ Return 0% resource utilization when DLA
is turned off

Bug 4170503

Change-Id: Iaeb6131dc482a750cae1d54b6931e3dd8c9192d0
Signed-off-by: Akshata Bhat <akshatab@nvidia.com>
(cherry picked from commit 4da14f6b3b80f49ca00c92322ad71d75c8bfd4cd)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2929821
Tested-by: Ninad Malwade <nmalwade@nvidia.com>
Reviewed-by: Ninad Malwade <nmalwade@nvidia.com>
Reviewed-by: Arvind M <am@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-07-16 04:35:47 -07:00
Jeremy Alves
0df8edb69b Lan743/6.1 vanilla driver of Lan7431 from upstream
Adding 6.1.9 unmodified Lan7431 driver to nvidia-oot

This is the unmodified driver from
  K6.1.9
without our NVIDIA specific changes

Bug 3978997

Signed-off-by: Jeremy Alves <jalves@nvidia.com>
Change-Id: Iaf453a1b9dc82355f8c7936823c5c90633fe24d9
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2934591
Tested-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-07-15 08:15:52 -07:00
Jon Hunter
fa591a862a net: wireless: realtek: Fix warnings
Building the realtek wireless driver generates various warnings due to
incorrect indentation or missing curly braces. For example, the
following warnings are seen ...

 drivers/net/wireless/realtek/rtl8822ce/core/rtw_mlme.c: In function
 ‘rtw_drv_scan_by_self’:
 drivers/net/wireless/realtek/rtl8822ce/core/rtw_mlme.c:3167:17:
 warning: this ‘else’ clause does not guard... [-Wmisleading-indentation]
 3167 |                 else
      |                 ^~~~
 drivers/net/wireless/realtek/rtl8822ce/core/rtw_mlme.c:3170:25:
 note: ...this statement, but the latter is misleadingly indented as if
 it were guarded by the ‘else’
 3170 |                         goto exit;
      |                         ^~~~

 drivers/net/wireless/realtek/rtl8822ce/core/efuse/rtw_efuse.c:917:17:
 warning: this ‘if’ clause does not guard... [-Wmisleading-indentation]
  917 |                 if (i % 16 == 0)
      |                 ^~

Fix the indentation and add the necessary curly braces to resolve these
warnings.

Bug 4190030

Change-Id: Ic13f1470043190ffd8401581cb97c908070c2940
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2934697
Reviewed-by: Revanth Kumar Uppala <ruppala@nvidia.com>
Reviewed-by: Shobek Attupurath <sattupurath@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-07-14 20:21:42 -07:00
Jian-Min Liu
2cf67077e2 Add compiler flag to avoid function re-definition
Add CONFIG_TEGRA_VIRTUALIZATION with ack-5.15 build to avoid
re-definition symbols when building tegra_hv.ko

Bug 4187941

Change-Id: I64eb10264b527d59919fbe781198d227d0a21dda
Signed-off-by: Jian-Min Liu <jianminl@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2933664
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: Jonathan Hunter <jonathanh@nvidia.com>
2023-07-14 20:20:16 -07:00
Jon Hunter
69b4420809 platform: tegra: Remove actmon driver for Tegra194
The tegra-cactmon driver is only used for Tegra194 and given that the
out-of-tree drivers are only supported for Tegra234 and newer devices we
can remove this driver.

Bug 4174107

Change-Id: I152e8119b5c179f2d75771c1af2eb5d5f865ccbc
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2927995
Reviewed-by: Laxman Dewangan <ldewangan@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-07-14 20:19:11 -07:00
Manish Bhardwaj
7e764afb5f storage: Update VSC driver for handling erase
1. If vs_blk_dev_config.req_ops_supported has only DISCARD
   support enabled, then REQ_OP_DISCARD should be mapped to
   DISCARD for UFS.

2. If vs_blk_dev_config.req_ops_supported has only SECURE_ERASE
   support enabled, then REQ_OP_DISCARD and REQ_OP_SECURE_ERASE
   both should be mapped to SECURE_ERASE for UFS.

3. If vs_blk_dev_config.req_ops_supported has only ERASE
   support enabled, then REQ_OP_DISCARD and REQ_OP_SECURE_ERASE
   both should be mapped to ERASE for UFS.

Bug 4176555

Signed-off-by: Manish Bhardwaj <mbhardwaj@nvidia.com>
Change-Id: I01599df9ab93525120106dfabf2d345ab8b64770
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2920433
Reviewed-by: Sanjith T D <std@nvidia.com>
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com>
Reviewed-by: svc-mobile-cert <svc-mobile-cert@nvidia.com>
Reviewed-by: Sandeep Trasi <strasi@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-07-14 08:37:46 -07:00
Jon Hunter
6fa354a3b2 thermal: tegra-oc-event: Fix warning
Building the tegra-oc-event driver generates the following warning ...

 drivers/thermal/tegra234-oc-event.c:180:31: warning: assignment discards
 ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
   180 |         tegra234_oc->soc_data = match->data;                                                                                                                                                                                                |                               ^

Fix this by correcting the type for the soc_data structure member.

Bug 4190030

Change-Id: I8879186dfbf247eea57266281f489d57c9675292
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2934695
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com>
Reviewed-by: svc-mobile-cert <svc-mobile-cert@nvidia.com>
Reviewed-by: Yi-Wei Wang <yiweiw@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-07-12 19:11:48 -07:00
Jon Hunter
620319b7c8 gpu: host1x: Remove unused variable
Building the host1x driver generates the following warning ...

 drivers/gpu/host1x/actmon.c:334:16:
 warning: unused variable ‘err’ [-Wunused-variable]
  334 |         int i, err;
      |                ^~~

Fix this by removing the unused variable.

Bug 4190030

Change-Id: I1c026253793a850bc2ac0d7778029407cc79f162
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2934694
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com>
Reviewed-by: svc-mobile-cert <svc-mobile-cert@nvidia.com>
Reviewed-by: Johnny Liu <johnliu@nvidia.com>
Reviewed-by: svcacv <svcacv@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-07-12 19:11:43 -07:00
Jon Hunter
0dfc692f7d hwmon: f75308: Remove unused variable
Building the f75308 driver generates the following warning ...

 drivers/hwmon/f75308.c: In function ‘f75308_detect’:
 drivers/hwmon/f75308.c:1034:29: warning: unused variable ‘adapter’
 [-Wunused-variable]
 1034 |         struct i2c_adapter *adapter = client->adapter;
      |                             ^~~~~~~

Fix this by removing the unused variable 'adapter'.

Bug 4190165

Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Change-Id: Ib8672b1e9288bb0684bc8bee617b068d01e1fc6d
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2934693
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com>
Reviewed-by: svc-mobile-cert <svc-mobile-cert@nvidia.com>
Reviewed-by: Yi-Wei Wang <yiweiw@nvidia.com>
Reviewed-by: svcacv <svcacv@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-07-12 19:11:39 -07:00
Jon Hunter
74b186dc9e drivers: pva: Fix compilation error
When building the PVA driver with GCC 13 the following error is
observed ...

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

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

Bug 4190030

Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Change-Id: Iafe0da2a59f55420aa96ebc985c5352dfbed9c74
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2934461
Reviewed-by: Omar Nemri <onemri@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-07-12 19:09:08 -07:00
Jon Hunter
9b40e459a1 nvdla: kmd: Fix compilation error
When building the DLA KMD driver with GCC 13 the following error is
observed ...

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

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

Bug 4190030

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

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

Bug 4167219

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

bug 4155882
Bug 4159212
jira ESSS-707

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

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

CID 10177627

Bug 3512545

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

Bug 4183393

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

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

Bug 4168788

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

Bug 4168788

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

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

Bug 4168788

Signed-off-by: Johnny Liu <johnliu@nvidia.com>
Change-Id: I72bcd6d92383595a41c2de5cad708610a205ba25
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2931874
Reviewed-by: Santosh BS <santoshb@nvidia.com>
Reviewed-by: Bibek Basu <bbasu@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-07-07 07:00:47 -07:00