Commit Graph

4505 Commits

Author SHA1 Message Date
Jon Hunter
0242b95056 PCI: tegra264: Fix RP off support
We cannot use enum definitions in '#if defined()' statements because the
'#if defined()' is a preprocessor macro that is evaluated prior to
compilation. Fix this by adding a test to conftest to detect if
CMD_PCIE_RP_CONTROLLER_OFF is defined.

Bug 5551652

Change-Id: I71826a58e428f1a335e8e0d895f25f3cea46a65e
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3467641
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Prakhar Srivastava (SW-TEGRA) <prasrivastav@nvidia.com>
2025-10-13 17:57:26 -07:00
Ankur Pawar
9ee2b01686 Camera: fix kernel warning after VI timeout
VI return timeout status when no frames are
received from camera sensor. During the error
recovery, the v4l2 buffers are set to
VB2_BUF_STATE_ERROR, this causes kernel warning.
As per the v4l2 framework correct buffer state
for timeout is VB2_BUF_STATE_QUEUED.

Bug 5512645

Change-Id: Iafc720b1ba74f04490d7d14e2e9014bd599b3cba
Signed-off-by: Ankur Pawar <ankurp@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3463848
Tested-by: Jerry Chang <jerchang@nvidia.com>
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-by: Jerry Chang <jerchang@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: svcacv <svcacv@nvidia.com>
rel-38_eng_2025-10-06
2025-10-07 09:27:06 -07:00
Jon Hunter
76bdc9f5b6 net: can: mttcan: Fix build for Linux v6.17
In Linux v6.17, the 'const' qualifier for the 'struct cyclecounter'
argument on of the cyclecounter 'read' function pointer was dropped.
Add a test to conftest to detect this and update the Tegra MTT CAN
driver accordingly to fix the build.

Bug 5420210

Change-Id: Idff1429bbf45fe160e16a6dbc51e8cb00909a876
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3423831
(cherry picked from commit 10569f9bbea4fc8172a94b8d5c5190fc2687b199)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3462468
Reviewed-by: Brad Griffis <bgriffis@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
2025-10-02 10:14:18 -07:00
Jon Hunter
9976ac1020 net: can: mttcan: Drop support for legacy kernels
Drop support for Linux kernel prior to v5.15 because these are no longer
supported.

Bug 5420210

Change-Id: I659c71f11d4c8996a35c952e0c6b27d7b7dcf239
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3423848
(cherry picked from commit f236f1fbd9d5d7b1886fc3abfa83719da1996772)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3462467
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Brad Griffis <bgriffis@nvidia.com>
2025-10-02 10:14:07 -07:00
Jon Hunter
a5bb404485 virt: tegra: Fix build for Linux v6.17
Upstream commit fc2898ea793a ("workqueue: Remove unused
work_on_cpu_safe") removed the 'work_on_cpu_safe()' function for Linux
v6.17. Fix this by open coding the 'work_on_cpu_safe()' in the Tegra HV
CPU Yield driver.

Bug 5420210

Change-Id: I3110554839853be9a906063d479539543394acbd
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3423830
(cherry picked from commit 97075404a16dc4f9d66147ae4b15a04526978e0e)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3462466
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: Brad Griffis <bgriffis@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
2025-10-02 10:14:02 -07:00
Jon Hunter
74171df1a4 platform: tegra: uss-io-proxy: Migrate to GPIOD
Upstream commit a55893133830 ("gpiolib: Remove unused
devm_gpio_request()") removed the devm_gpio_request() function and this
breaks the Tegra USS IO Proxy driver. The devm_gpiod_get() function has
been supported in the Linux kernel since v4.3 and now that the legacy
GPIO functions are being removed, migrate the Tegra USS IO Proxy driver
over to using GPIO descriptors.

Bug 4387902
Bug 5420210

Change-Id: I0c62977dc4ec829e14f105babdd08bbd64113fa2
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3423827
(cherry picked from commit e4572a5ff434f778178b1dfb39b4c1cf7923db6d)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3462463
Reviewed-by: Brad Griffis <bgriffis@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
2025-10-02 10:13:50 -07:00
Jon Hunter
d814c113bb drm/tegra: Fix build for Linux v6.17
The arguments to the function drm_helper_mode_fill_fb_struct() and
function pointer fb_create() have been updated in the Linux v6.17. Add
the necessary conftest tests to check for the new variants of these
functions and update the Tegra DRM driver accordingly.

Bug 5420210

Change-Id: Ie1470df199d154d3f94f5f7773dcc1ba138e23da
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3423828
(cherry picked from commit dde42d012e4187e798d5d7c3cfa974f49059d0a1)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3462462
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Brad Griffis <bgriffis@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
2025-10-02 10:13:45 -07:00
Jon Hunter
2800fd5f4b drivers: Fix gpio_chip '.set' callback for v6.17
In Linux v6.17, the gpio_chip structure's '.set' callback function was
updated to return an integer. Add a test to conftest to detect this and
update the necessary drivers accordingly.

Bug 5483854

Change-Id: Ie48a50775885a06c8aa23ddb72fdbc73361ab92b
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3440815
(cherry picked from commit 5dc88266853f0c5fbc7dd925187f63c2b6560a4b)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3461855
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: Brad Griffis <bgriffis@nvidia.com>
2025-10-02 10:13:34 -07:00
Jon Hunter
c2fd2c3c66 misc: bluedroid_pm: Ensure 'host_wake' is configured
Currently the wakeup source is configured if only the 'ext_wake' is
valid. However, the bluedroid_pm_timer and proc interface that are
configured when 'ext_wake' is valid, also assumes that 'host_wake' is
also valid. Therefore, update the code to only configure the
bluedroid_pm_timer and proc interface if both of these are valid.

Bug 4958861

Change-Id: I16ef55359c36acc9dc50464f43816ae2ef3c3123
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3397252
(cherry picked from commit b1e18d66aa0ab6d491b88caac5fa9abddb69d0e4)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3462461
Reviewed-by: Brad Griffis <bgriffis@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
2025-10-02 10:13:17 -07:00
Jon Hunter
432f3748e0 misc: bluedroid_pm: Free proc on failure
If the call to wakeup_source_register() fails during probe, then the
'proc' interface is not freed. Ensure that this is freed as expected.

JIRA LINQPJ14-60

Change-Id: I188be2998429c1ada6ccdf765791367e61735359
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3397251
(cherry picked from commit a0f0bebe2a2a54b87f91b1812c22bbd14470a61c)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3461888
Reviewed-by: Brad Griffis <bgriffis@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
2025-10-02 10:13:12 -07:00
Jon Hunter
7c70fbf0cf misc: bluedroid_pm: Verify wakeup registration
The structure returned from the function wakeup_source_register() is not
currently checked to see that a valid structure is returned. If
wakeup_source_register fails to register the wake-up source, then this
function will return a NULL pointer and this will lead to a crash when
defereferencing this pointer. Therefore, check that a valid structure is
returned from wakeup_source_register() and if not then return an error
from the probe function.

JIRA LINQPJ14-60
Bug 4958861

Change-Id: I03356700ab03d6c25080b3806ea8b7da3983a302
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3394894
(cherry picked from commit 14286052fb9dd496b243221fa1066f828451b294)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3405519
Reviewed-by: Brad Griffis <bgriffis@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
2025-10-02 10:13:06 -07:00
Jon Hunter
8407ab4b3e misc: bluedroid_pm: Fix optional GPIOs
The function devm_gpiod_get_optional() will return an error code encoded
as a pointer type if the GPIO requested is not found. Therefore, we need
to use the IS_ERR() macro to determine if the GPIO is valid, otherwise
we could incorrectly attempt to dereference an invalid pointer. This bug
was introduced when migrating the bluedroid driver to use the gpiod
functions.

Bug 4387902
Bug 4958861

Change-Id: Ib9e7494c92226454d93506c2c0d4c80bd6a7493c
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3397231
(cherry picked from commit b461fa1a87f9beb5faa1dc917956603430b12df7)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3405518
Reviewed-by: Brad Griffis <bgriffis@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
2025-10-02 10:13:01 -07:00
Bruce Xu
74cc0f56f2 misc: bluedroid: remove duplicate timer declaration
There are 2 timer defined. One statically and one in the
bluedroid_pm_data struct. Both timers call the same function on expiration. In the case of the statically defined timer this is a problem because it assumes that the timer is part of the bluedroid_pm_data and so calling timer_container_of() or from_timer() results in an invalid pointer and hence kernel panic. Fix this by
removing the statically defined timer.

Bug 4958861

Change-Id: I08f9dc3a032f84ca3350fbec5fb97062da8d6795
Signed-off-by: Bruce Xu <brucex@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3400991
(cherry picked from commit 61490c6a2a65e24068cd33a92d8730260ad83f95)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3405517
Tested-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-by: Jon Hunter <jonathanh@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Brad Griffis <bgriffis@nvidia.com>
2025-10-02 10:12:56 -07:00
Jon Hunter
50c387ecf9 nvmap: Remove dma_buf_ops flag cache_sgt_mapping
The dma_buf_ops flag 'cache_sgt_mapping' has been removed in Linux
v6.16. Although NVMAP has its own caching and so it should be possible
to simply drop this flag, some tests are failing. For now add a test to
conftest to detect if this flag is present and update the NVMAP driver
accordingly.

Bug 5215421

Change-Id: I382d5c62fd550254d387abd1a21e5a1c5cda3a6e
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3384177
(cherry picked from commit 326b31912bf1da7de0a5340826ec1fdaf084c11e)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3461885
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: Brad Griffis <bgriffis@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
2025-10-01 15:28:54 -07:00
Jon Hunter
e004561637 drm/tegra: Update to Linux v6.16-rc1
Update the Tegra DRM driver to Linux v6.16-rc1. In Linux v6.16-rc1, the
drm_dp_link_power_up/down functions were moved from the Tegra DRM driver
into the main DRM code. Conftest is used to detect this change and the
appropriate updates are made to the Tegra DRM driver.

JIRA LINQPJ14-60

Change-Id: Id5449b22e8eda5ee70eb6aed09ce627e63e7722e
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3375214
(cherry picked from commit f8adc0c950eb4905d397b6e1d8e524b856945f0e)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3461883
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: Brad Griffis <bgriffis@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
2025-10-01 15:28:42 -07:00
Jon Hunter
da9c8f46c4 virt: hvc_sysfs: Fix build for Linux v6.16
In Linux v6.16, the 'bin_attribute' argument to the 'read' and 'write'
function pointers of the 'bin_attribute' structure was made const. Add a
test to conftest to detect this and update the Tegra HVC SYSFS driver
accordingly.

JIRA LINQPJ14-60

Change-Id: I74b88bc0d1ed55eca1565386b38d16ff65626132
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3375213
(cherry picked from commit fef581cb0bac2d1468a710927771be9fa027f6e0)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3461880
Reviewed-by: Brad Griffis <bgriffis@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
2025-10-01 15:28:30 -07:00
Jon Hunter
e48b52cbba net: marvell: oak: Fix build for Linux v6.16
In Linux v6.16, the 'index' member of the 'page' structure was renamed
to '__folio_index'. Add a test to conftest to detect this and update the
Marvell OAK ethernet driver accordingly to fix the build for Linux
v6.16.

JIRA LINQPJ14-60

Change-Id: I64a8e60990ea03eb212e79bfde474cd87efdf064
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3375190
(cherry picked from commit 5b61fa9366558e7567dc6b432059e581f347ca1a)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3461879
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: Brad Griffis <bgriffis@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
2025-10-01 15:28:17 -07:00
Jon Hunter
66ab02d7b9 misc: bluedroid_pm: Use wakeup_source_register/unregister
In Linux v6.16, commit 142ba31d8b4a ("PM: wakeup: Do not expose 4 device
wakeup source APIs") made the wakeup_source_add/destroy internal
functions. Instead of using wakeup_source_add/destroy, use
wakeup_source_register/unregister which internally call
wakeup_source_add/destroy and have been supported since Linux v2.6.x
kernels.

JIRA LINQPJ14-60

Change-Id: I6c471677876192e8985c8c336f95184564618c8a
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3375073
(cherry picked from commit 8118ce4f4df7513d26ca3d0150cfa2104e969d35)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3461877
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Brad Griffis <bgriffis@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
2025-10-01 15:28:05 -07:00
Jon Hunter
eaa2a1abe1 media: camera: cdi-mgr: Simplify i2c_board_info init
In Linux v6.16, the 'of_node' structure was removed from the
'i2c_board_info' structure and the 'cdi-mgr' driver fails to build.
Although it is possible to detect whether the 'i2c_board_info' structure
has the 'of_node' structure using conftest, the 'cdi-mgr' driver does
not even use this. Therefore, it is simpler to fix this by using memset
and strncpy to initialize the 'i2c_board_info' structure and this also
aligns the camera 'cdi-mgr' driver with the camera 'isc-mgr' driver that
initializes the 'i2c_board_info' structure in this way.

JIRA LINQPJ14-60

Change-Id: I1d9df0fb1ccea3d303f256f65d187a131b7352ad
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3374654
(cherry picked from commit 30cad15a2e832ad445003911a76627fb18f91b49)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3461876
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Brad Griffis <bgriffis@nvidia.com>
2025-10-01 15:27:53 -07:00
Jon Hunter
594c03645c net: can: mttcan: Fix build for Linux v6.16
In Linux v6.16, the structure 'data_bittiming_params' was added to the
'can_priv' structure and all the related data bittiming parameters were
moved under this new structure. Add a test to conftest to determine if
this new structure is present and update the Tegra MTTCAN driver
accordingly.

JIRA LINQPJ14-60

Change-Id: Ibd8f6bd81a903b15a55d837023dada835a1e72ca
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3374645
(cherry picked from commit 86396ec47b78a7716a5faa8d492d74efc7f23dce)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3461874
Reviewed-by: Brad Griffis <bgriffis@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
2025-10-01 15:27:48 -07:00
Jon Hunter
96cae7f9de drivers: Fix from_timer() for Linux v6.16
In Linux v6.16, commit 41cb08555c41 ("treewide, timers: Rename
from_timer() to timer_container_of()") renamed 'from_timer()' to
'timer_container_of()'. Given that this is a macro we can simplfy see if
the macro 'timer_container_of' is defined and if so use this otherwise
fall back to 'from_timer()'. Update the necessary drivers to fix the
build for Linux v6.16.

JIRA LINQPJ14-60

Change-Id: I7f622b5d046a92da2ade755e6a697c1810f61275
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3383387
(cherry picked from commit 320ec84efd492c0c2711c69104fabc30b4f15ecb)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3461850
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Brad Griffis <bgriffis@nvidia.com>
2025-10-01 15:27:42 -07:00
Jon Hunter
a3097907b3 platform: tegra: bwmgr: Fix debug macro build
When NV_TEGRA264_BWMGR_DEBUG_MACRO_PRESENT is not defined the build
fails and the following errors are seen ...

 drivers/platform/tegra/tegra-bpmp-bwmgr.c:101:12: error:
  ‘tegra_bpmp_bwmgr_devfreq_target’ defined but not used
  [-Werror=unused-function]
  101 | static int tegra_bpmp_bwmgr_devfreq_target(struct device *dev,
                                       unsigned long *freq, u32 flags)
      |            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 drivers/platform/tegra/tegra-bpmp-bwmgr.c:37:12: error:
  ‘tegra_bpmp_bwmgr_max_freq_notifier’ defined but not used
  [-Werror=unused-function]
   37 | static int tegra_bpmp_bwmgr_max_freq_notifier(struct
                  notifier_block *nb, unsigned long action, void *ptr)
      |            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Fix this by ensuring the above functions are not defined if
NV_TEGRA264_BWMGR_DEBUG_MACRO_PRESENT is not defined.

Bug 5483386
Bug 5196455

Change-Id: Ie2b069d163a32220c95ffaba217ddea3686ba92b
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3461865
Reviewed-by: Johnny Liu <johnliu@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
2025-10-01 12:56:56 -07:00
Johnny Liu
099e5e1cd7 platform: tegra: introduce bwmgr kernel driver
This driver exposes EMC frequency control interface to user space via
linux devfreq framework.

Users could change EMC frequency to the frequency value from the
available frequencies of EMC clock:

$ /sys/class/devfreq/bwmgr# cat available_frequencies
665600000 2750000000 3200000000 4266000000

and update the EMC floor frequency by writing into the min_freq QoS
sysfs node:

$ /sys/class/devfreq/bwmgr# echo 4266000000 > min_freq

and update the EMC max frequency by writing into the max_rate QoS
sysfs node to cap the EMC frequency:

$ /sys/class/devfreq/bwmgr# echo 4266000000 > max_freq

This driver does not directly manage the EMC clock rate. Instead it
just delivers the min/max frequency information to BPMP, and BPMP is
still the only entity that has the full control of EMC and other
related memory clocks.

Bug 5483386
Bug 5196455

Change-Id: I6124eeb7411a13bde5c51582064534063abca8d3
Signed-off-by: Johnny Liu <johnliu@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3453755
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: Rajkumar Kasirajan <rkasirajan@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
2025-09-29 21:42:51 -07:00
Jaiyash Agrawal
b6fa67fca1 DCE-KMD: Add header support and use bytes written
Parse header info stored at beginning of buffer to retrieve log buffer
info and use bytes written to print the data depending on if encoding is
enabled or not.

JIRA TDS-17441

Change-Id: I99119be05ddda5c5354ba39497a0e471305863e1
Signed-off-by: Jaiyash Agrawal <jaiyasha@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3436761
Reviewed-by: Vinod Gopalakrishnakurup <vinodg@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3448848
2025-09-29 13:12:50 -07:00
Shobek Attupurath
1c3b3fa89b rtl8852ce: Add Nvidia changes to driver v126-16
- Reduce log level
- Remove unwanted prints
- Add Nvidia sourcetree path

Bug 5422314
Bug 5226667

Change-Id: Iad03a6f70c039c40c785ffeaf44f389b2a666318
Signed-off-by: Shobek Attupurath <sattupurath@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3450867
Reviewed-by: Bitan Biswas <bbiswas@nvidia.com>
Tested-by: Narayana Reddy P <narayanr@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Narayana Reddy P <narayanr@nvidia.com>
2025-09-29 04:28:09 -07:00
Narayana Reddy P
232b194aec rtl8852ce: realtek driver update to v126-16
----------------------------------
rtl8852ce release notes for Nvidia
----------------------------------

v1.19.16_nv-126-16-gbf1934e39.20250910_Certified_Module_beta
* fix scan issue in roaming test

==================================================================
v1.19.16_nv-126-15-ge5204803f.20250827_Certified_Module_beta
* Fix bug of 802.11d CC scan mechanism
[Description]
The 11d CC scan result may sometimes be overwritten by other scans.

==================================================================
v1.19.16_nv-126-14-g196875f8d.20250821_Certified_Module_beta
* fix 6G MBSSID disconnect problem
[Description]
Fix the issue where RSSI was not updated in non-transmitted BSSID, which could
cause disconnection due to incorrect RSSI values.

==================================================================

v1.19.16_nv-126-13-g7a2b96406.20250813_Certified_Module_beta
* fix 6G Enhanced open mode not work
[Description]
(1) Parse capabilities in MBSSID
    e.g. Vendor Specific OUI WMM IE
         Non-Inheritance IE
(2) Handle MBSSID sets
(3) Adjust MAX IE size from 768 to 1840 defined in WIFI Alliance

Bug 5422314
Bug 5226667

Change-Id: I63802c34fdc6e189566843d11992ff64b8e404fa
Signed-off-by: Narayana Reddy P <narayanr@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3450784
Reviewed-by: Shobek Attupurath <sattupurath@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Bitan Biswas <bbiswas@nvidia.com>
2025-09-29 04:28:03 -07:00
Ketan Patil
5ef68aa58f video: tegra: nvmap: Avoid double updation of RSS counter
The RSS counter is updated during buffer allocation as well as mmap,
which is leading to double updation. Fix this by decrementing the RSS
counter during page fault while increment it back during unmap flow.

Bug 5222690

Change-Id: I77972185f20d9d710571cc07ae1c5188060bfa1f
Signed-off-by: Ketan Patil <ketanp@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3447073
Reviewed-by: Ajay Nandakumar Mannargudi <anandakumarm@nvidia.com>
Reviewed-by: Krishna Reddy <vdumpa@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Jon Hunter <jonathanh@nvidia.com>
2025-09-22 16:27:22 -07:00
Ketan Patil
858d73775a video: tegra: nvmap: Account NvMap memory for OOM Decisions
Account NvMap allocated memory into both RSS and CG tracking to make
efficient OOM kill decisions during memory pressure.

NvMap allocates memory via kernel APIs like alloc_pages, the kernel
memory is not accounted on behalf of process who requests the
allocation. Hence in case OOM, the OOM killer never kills the process
who has allocated memory via NvMap even though this process might be
holding most of the memory.

Solve this issue using following approach:
- Use __GFP_ACCOUNT and __GFP_NORETRY flag
-  __GFP_NORETRY will not let the current allocation flow to go into OOM
path, so that it will never trigger OOM.
- __GFP_ACCOUNT causes the allocation to be accounted to kmemcg. So any
allocation done by NvMap will be definitely accounted to kmemcg and
cgroups can be used to define memory limits.
- Add RSS counting for the process which allocates by NvMap, so that OOM
score for that process will get updated and OOM killer can pick this
process based upon the OOM score.
- Every process that has a reference to NvMap Handle would have the
memory size accounted into its RSS. On releasing the reference to
handle, the RSS would be reduced.

Bug 5222690

Change-Id: I3fa9b76ec9fc8d7f805111cb96e11e2ab1db42ce
Signed-off-by: Ketan Patil <ketanp@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3447072
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Krishna Reddy <vdumpa@nvidia.com>
Reviewed-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-by: Ajay Nandakumar Mannargudi <anandakumarm@nvidia.com>
2025-09-22 16:27:17 -07:00
Jon Hunter
6b6d1e009a camera-diagnostics: Fix missing release function
The camera-diagnostic driver is missing a release function for the IVC
channel device that it is creating. This causes the following WARNING to
be observed when probing the camera-diagnostic driver fails ...

 ------------[ cut here ]------------
 Device 'camera-diag' does not have a release() function, it is broken
 and must be fixed. See Documentation/core-api/kobject.rst.
 WARNING: CPU: 8 PID: 756 at drivers/base/core.c:2517 device_release+0x88/0xa8
 ...
 Call trace:
  device_release+0x88/0xa8
  kobject_put+0xac/0x150
  put_device+0x14/0x34
  __mod_of__camera_diag_of_match_device_table+0x602514/0x6033a0
   [camera_diagnostics]
  tegra_ivc_bus_boot_sync+0x204/0x28c [ivc_bus]
  really_probe+0x150/0x2c8
  __driver_probe_device+0x78/0x134
  driver_probe_device+0x3c/0x164
  __driver_attach+0x98/0x1c4
  bus_for_each_dev+0x7c/0xf4
  driver_attach+0x24/0x38
  bus_add_driver+0xec/0x218
  driver_register+0x5c/0x13c
  tegra_ivc_driver_register+0x10/0x1c [ivc_bus]
  init_module+0x18/0x1000
  [camera_diagnostics]
  do_one_initcall+0x58/0x318
  do_init_module+0x58/0x1ec
  load_module+0x1f04/0x2000
  init_module_from_file+0x88/0xd4
  __arm64_sys_finit_module+0x148/0x330
  invoke_syscall+0x48/0x134
  el0_svc_common.constprop.0+0x40/0xf0
  do_el0_svc+0x1c/0x30
  el0_svc+0x30/0xb8
  el0t_64_sync_handler+0x130/0x13c
  el0t_64_sync+0x194/0x198
 ---[ end trace 0000000000000000 ]---

Ideally we would use the 'tegra_ivc_channel_release()' function as the
release function but because the camera-diagnostic driver does not call
'tegra_ivc_channel_create()' to create the channel and does not actually
need to free any memory, simply define a new empty function that can be
called.

Bug 5489551

Change-Id: I6a7de9893af0167409af79599b61faf005047b0e
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3443095
(cherry picked from commit f75c0f228ca4f1a4c17266cb97be2db63b25a592)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3453753
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Brad Griffis <bgriffis@nvidia.com>
2025-09-17 18:56:57 -07:00
Manikanta Maddireddy
8e2a32d25d PCI: tegra264: Add interconnect support
Add interconnect support to set PCIe bandwidth.

Bug 4775460
Bug 5407169

Change-Id: I7e0cbe6a391eb1d25795e39d9711f12ab1d8535e
Signed-off-by: Manikanta Maddireddy <mmaddireddy@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3420338
(cherry picked from commit 5b004c01f21a7f16613a29ee977471f970265577)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3444597
Reviewed-by: svcacv <svcacv@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Bibek Basu <bbasu@nvidia.com>
2025-09-07 21:57:26 -07:00
Jerry Chang
c6da597514 vi5: fix vi5_channel_error_recover memory leak
release chan->request_iova and also chan->emb_buf memory

Bug 5371485

Change-Id: I6e2642733a222a85b2f7d6814716835afc921948
Signed-off-by: Jerry Chang <jerchang@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3403484
(cherry picked from commit f7d53151d1ed7536f9c920a5f3b1ad54f9d8fe32)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3443797
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: Narendra Kondapalli <nkondapalli@nvidia.com>
2025-09-06 08:26:58 -07:00
Revanth Kumar Uppala
8218be96af r8126: Fix PCIe completion timeouts
During PTP operation, abnormal interrupt handling could stall internal
transactions, leading to delayed BAR register reads and PCIe completion
timeout errors.

This patch adjusts the PTP interrupt mechanism to
eliminate the stall and reduce latency.

Bug 4755448

Change-Id: Id7fa3fbcac33ba89b3635d86a15932ac95f7e4bd
Signed-off-by: Revanth Kumar Uppala <ruppala@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3446108
Reviewed-by: Brad Griffis <bgriffis@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Shobek Attupurath <sattupurath@nvidia.com>
2025-09-04 19:44:04 -07:00
abhinayaa
4efe441de5 pva: redesign tracepoints for V3
Add new tracepoints to support profiling of PVA V3 workloads.
These tracepoints will be supported only in non-safety builds.

Change-Id: I5519c31e2f7db7bb3beab8a0dc1eb5d1d073a345
Signed-off-by: abhinayaa <abhinayaa@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3439807
Tested-by: Nan Wang <nanwa@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Nan Wang <nanwa@nvidia.com>
Reviewed-by: Omar Nemri <onemri@nvidia.com>
2025-08-26 16:43:08 -07:00
vinodg
f0c437e616 DCE: KMD: Use seq write to copy in binary format
Encoded data in the buffer is copied to the user
buffer in binary format

Jira TDS-17299

Change-Id: I329c9cd2fc1b91fe8700c4ef3c8d444fee6d4151
Signed-off-by: Vinod Gopalakrishnakurup <vinodg@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3409070
Reviewed-by: Mahesh Kumar <mahkumar@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: svcacv <svcacv@nvidia.com>
(cherry picked from commit f865e4b21dbf5a50d47ef244929b625ff0d9aa78)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3433716
2025-08-20 14:28:04 -07:00
Brad Griffis
a370917376 r8126: use conftest for hrtimer_init
A function called hrtimer_setup() was added in Linux v6.13 with the
intent that it would eventually replace hrtimer_init(). In Linux v6.15
the hrtimer_init() function was removed.

Use conftest to call the appropriate API based on what is defined
in the kernel.

Bug 5466808

Change-Id: I1c1c4e81c840a058d8c4c0b1616c87cb8a8a8beb
Signed-off-by: Brad Griffis <bgriffis@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3436079
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Revanth Kumar Uppala <ruppala@nvidia.com>
2025-08-20 09:12:43 -07:00
Brad Griffis
c959e9d1dc coe: update for compilation against newer kernels
The 'no_llseek' definition was removed in Linux v6.12. Use
NV_NO_LLSEEK_PRESENT to check if it should be defined.

The 'remove' callback of the 'platform_driver" structure was updated in
Linux v6.11 to return void instead of int.

Update rtcpu-coe.c so that it properly handles the above cases.

Bug 5466808

Change-Id: I9306840f0b4a9e5a59a5c161ac3c58af2a70a4ed
Signed-off-by: Brad Griffis <bgriffis@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3436078
Reviewed-by: Igor Mitsyanko <imitsyanko@nvidia.com>
Reviewed-by: svcacv <svcacv@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
2025-08-20 09:12:38 -07:00
nanwa
c1ba8c8eae pva: mirror from gitlab cv/pva-sys-sw
Gitlab commit b284345610ceb ("pva: fix static defects...")

No changes since last deployment.

Change-Id: I56211cf375961730f67e246f4103217b33893286
Signed-off-by: nanwa <nanwa@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3428161
Reviewed-by: Rohit Goel <rogoel@nvidia.com>
Tested-by: Rohit Goel <rogoel@nvidia.com>
Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
2025-08-12 05:58:59 -07:00
Shobek Attupurath
8657f0db30 rtl8852ce: Add Nvidia changes to driver v261-10
- Reduce log level
- Remove unwanted prints
- Add Nvidia sourcetree path

Bug 5440351
Bug 5442104

Change-Id: Ie6655f1570731b1c51ef1aede2973ff4a2604d2b
Signed-off-by: Shobek Attupurath <sattupurath@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3426790
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Ashutosh Jha <ajha@nvidia.com>
Reviewed-by: Revanth Kumar Uppala <ruppala@nvidia.com>
2025-08-11 20:27:55 -07:00
Shobek Attupurath
c9aa3b2f1b rtl8852ce: Add v126-10 to fix disconnect with new channel
Issue - When WiFi operating channel is switched, at times the wifi
role index and role bitmap show that there is already a role
assigned for the channel context and this causes a failure in association. Kernel warning is shown when this occurs.

Fix - Update driver to v126-10 that fixes this issue.

[   57.590860] Call trace:
[   57.590861]  rtw_phl_chanctx_add+0x528/0x8f4 [rtl8852ce]
[   57.590947]  rtw_clear_is_accepted_status+0x4a4/0xbb8 [rtl8852ce]
[   57.591033]  cur_req_hdl+0x3c/0x4c [rtl8852ce]
[   57.591118]  msg_dispatch+0x2dc/0x3f8 [rtl8852ce]
[   57.591204]  dispr_thread_loop_hdl+0x270/0x2dc [rtl8852ce]
[   57.591289]  dispr_share_thread_loop_hdl+0x10/0x1c [rtl8852ce]
[   57.591374]  share_thread_hdl+0xb8/0x1a0 [rtl8852ce]
[   57.591459]  kthread+0x110/0x124
[   57.591466]  ret_from_fork+0x10/0x20

Bug 5440351
Bug 5442104

Change-Id: Ie78c70c1ea7a789351a2ba4ad445c4d0062281da
Signed-off-by: Shobek Attupurath <sattupurath@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3426784
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Ashutosh Jha <ajha@nvidia.com>
2025-08-11 20:27:49 -07:00
Ketan Patil
55bd49a633 video: tegra: nvmap: Reduce log level to avoid spews
OpenRM maps the buffer with remap_pfn_range and then it's user VA is
passed to libnvrm_mem to create a handle out of it. NvMap uses
get_user_pages to get user pages from the VA. It fails for the buffer
mapped with remap_pfn_range. Then it fallbacks to follow_pfn or
follow_pfnmap_start functions to obtain pfn from the VA and then obtain
page pointer from it. But as get_user_pages fails, the corresponding
error prints are getting generated even when not required. Hence reduce
the log level to debug to avoid these unnecessary spews.

Bug 5383624

Change-Id: Idbd3cfe93ce3fac6e27efc5c3bb7a200fc183d26
Signed-off-by: Ketan Patil <ketanp@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3425552
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Pritesh Raithatha <praithatha@nvidia.com>
2025-08-07 03:57:08 -07:00
nanwa
d756afd6a7 pva: mirror from gitlab cv/pva-sys-sw
Gitlab commit b0d3faac3c446 ("Fix syncpt mapping crash in Li...")

Changes since last deployment:

- Fix syncpt mapping crash in Linux KMD

Change-Id: I75429bd652f31ac50b9ddd2deb53c7b455658320
Signed-off-by: nanwa <nanwa@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3423360
Reviewed-by: Mohnish Jain <mohnishj@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
2025-08-05 10:44:59 -07:00
Revanth Kumar Uppala
2c3145ecbe r8126: Modify configs similar to earlier r8126 version
Modified below configs of r8126
CONFIG_SOC_LAN
ENABLE_MULTIPLE_TX_QUEUE
ENABLE_PTP_SUPPORT
ENABLE_RSS_SUPPORT

Bug 5312842

Change-Id: Ief05d33514aed51522488c6c7a801f078c943e30
Signed-off-by: Revanth Kumar Uppala <ruppala@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3417996
Reviewed-by: Shobek Attupurath <sattupurath@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Ashutosh Jha <ajha@nvidia.com>
2025-08-04 09:57:27 -07:00
Revanth Kumar Uppala
009a4a8f5d ethernet: Add dummy driver for r8126
Add dummy driver when real driver is not available to make
packaging success.

Bug 5312842

Change-Id: I9f0e531f0b9d3353c6f98a3872a4c0dd5cb27934
Signed-off-by: Revanth Kumar Uppala <ruppala@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3415213
Reviewed-by: Ashutosh Jha <ajha@nvidia.com>
Reviewed-by: Shobek Attupurath <sattupurath@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
2025-08-04 09:57:23 -07:00
Revanth Kumar Uppala
914b98c3ac r8126: Add r8126 driver version 10.016.00
Add support for r8126 ethernet driverversion 10.016.00
which adds support till K6.15

Bug 5312842

Change-Id: I5987fd9a885fef7be6e1448674fc2e5c61820d1a
Signed-off-by: Revanth Kumar Uppala <ruppala@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3415199
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Shobek Attupurath <sattupurath@nvidia.com>
Reviewed-by: Ashutosh Jha <ajha@nvidia.com>
2025-08-04 09:57:18 -07:00
spatki
4a68689610 tsec: add support for s2idle state
TSEC from t26x onwards is booted by PSC. Since s2idle PSC
never resets tsec, there is no need to handle streamid programming
form KMD side.

Moreover this change also fixes a bug wherein tsec KMD would
poweroff the clocks of TSEC in suspend case.

Bug 5407465

Change-Id: Idb648e2f0e7226bb779bd1a801796fa28c415419
Signed-off-by: spatki <spatki@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3420250
Reviewed-by: Mayuresh Kulkarni <mkulkarni@nvidia.com>
Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>
Reviewed-by: svcacv <svcacv@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
2025-08-04 04:27:14 -07:00
Revanth Kumar Uppala
97c57036d7 r8126: Disable LTR_EN in PCIe DevCtl2 register during probe
Problem:
- When a Downstream Port Containment (DPC) software trigger is issued, the LTR_EN bit in the Root Port (RP) is cleared as per PCIe spec.
- However, LTR_EN bit of RTL8126 endpoint (EP) which is being expected to reset is still active and sends Latency Tolerance Reports (LTR) to RP.
- This behavior violates the PCIe spec, as LTR_EN is a non-sticky bit and should be cleared automatically on reset.
- As the RP has LTR disabled but the EP still sends LTR messages, it results in Unsupported Request (UR) errors on the RP.
- These UR errors trigger AER (Advanced Error Reporting) recovery, which includes a Secondary Bus Reset (SBR).
- The SBR causes the PCIe link to go down and come back up, but the EP again starts sending LTRs, leading to a infinite error-recovery loop.

Workaround:
- As a temporary fix, disable the LTR_EN bit in the RTL8126 EP during its probe.
- This prevents the EP from sending LTR messages, thereby avoiding UR errors and breaking the loop of AER recovery.

Impact:
- Disabling LTR prevents the EP from entering the L1.2 low power state.
- However, ASPM is currently not enabled in the system, so this workaround has no impact.

Bug 4869463

Change-Id: Ibf7effaeb0f22e952645ef7bf6a18287264e1463
Signed-off-by: Revanth Kumar Uppala <ruppala@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3420019
Reviewed-by: Manikanta Maddireddy <mmaddireddy@nvidia.com>
Reviewed-by: Ashutosh Jha <ajha@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
2025-08-01 09:57:47 -07:00
Brad Griffis
991868b8d7 build: print configs being used
Print critical variables kernel_name and system_type.

Print any config files being included in the build.

Bug 5413835

Change-Id: Ie2b59d333f1625ba63dd5f86044534bcba45dd69
Signed-off-by: Brad Griffis <bgriffis@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3420648
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
2025-07-31 07:43:31 -07:00
Brad Griffis
2d06e05d6e configs: add Makefile.config.l4t
Utilize the ability to have a second config file "system_config" that
is specific to the system_type, in this case l4t.

Bug 5413835

Change-Id: I883e5d03b19307f702f2db5774ee22e8d2061def
Signed-off-by: Brad Griffis <bgriffis@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3420523
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-by: Jon Hunter <jonathanh@nvidia.com>
2025-07-31 07:43:27 -07:00
Brad Griffis
f50f1ec51b hvc_sysfs: introduce NV_OOT_HVC_SYSFS_SKIP_BUILD
Add infrastructure to make it possible to have configs that
skip the building of hvc_sysfs.o.

Bug 5413835

Change-Id: I8fa1fd6bbdcc1cc1d4d64c27fb6b913661be38e7
Signed-off-by: Brad Griffis <bgriffis@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3419689
Reviewed-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
2025-07-31 07:43:22 -07:00
Rakibul Hassan
66235b7274 coe: disable allocation power of 2 check
In fringe unexpected cases, HSB (Holoscan sensor bringe) sends image
byte offset larger then allocated image size (e.g. if HSB just sends
incorrect packet, or is configured incorrectly for a different image
size. or just packet corruption).

In such cases, we run into SMMU faults.

To mitigate this, a buffer size of two check was introduced so even
were this to happen, it would not cause SMMU errors.

However, the support for this in UMD is not complete.
Therefore, disable this check until UMD is able to comply with this
buffer constraint.

Jira L4T-7463

Change-Id: I2de31740284627ca117f1fa0a28bde2ef9a82785
Signed-off-by: Rakibul Hassan <rakibulh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3419644
Reviewed-by: Igor Mitsyanko <imitsyanko@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Narendra Kondapalli <nkondapalli@nvidia.com>
Reviewed-by: svcacv <svcacv@nvidia.com>
2025-07-30 07:15:45 -07:00