In Linux v6.11, commit 1a251f52cfdc ("minmax: make generic MIN() and
MAX() macros available everywhere") causes the PVA driver build to fail
with the following error:
include/uapi/linux/nvpva_ioctl.h:601: error: "MAX" redefined [-Werror]
601 | #define MAX(a, b) ((a) > (b) ? (a) : (b))
Fix this by add guards around the definition of 'MAX' in the
nvpva_ioctl.h file.
Bug 4749580
Change-Id: If7960e0617e659f4e264b1e638e9f8c98a027a73
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3184093
(cherry picked from commit d8bc5883f3)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3185779
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
The Tegra virtual storage driver fails to build for Linux v6.11 because
of the following issues:
1. The functions blk_queue_logical_block_size(),
blk_queue_physical_block_size() and blk_queue_max_discard_sectors()
have been removed.
2. The function blk_queue_write_cache() has too many arguments for
Linux v6.11.
3. The flag QUEUE_FLAG_NONROT is not defined for Linux v6.11.
Disable this driver for Linux v6.11 until this driver is fixed.
Bug 4311184
Bug 4749580
Change-Id: I56f811d6ee29dd0025a5dc199ae84e3fc0f37b21
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3185049
Reviewed-by: Brad Griffis <bgriffis@nvidia.com>
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
In Linux v6.11, commit 1a251f52cfdc ("minmax: make generic MIN() and
MAX() macros available everywhere") causes the Tegra ASoC Utils driver
build to fail with the following error:
sound/soc/tegra/tegra_asoc_utils.c:18: error: "MAX" redefined [-Werror]
18 | #define MAX(X, Y) ((X > Y) ? (X) : (Y))
Fix this by add guards around the definition of 'MAX' in the
Tegra ASoC Utils file.
Bug 4749580
Change-Id: I63df434627e6ee7ab16d865c296b07b91405fdfd
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3185143
Reviewed-by: Sameer Pujar <spujar@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Upstream commit cdd9a571b7d8 ("fs/proc: move page_mapcount() to
fs/proc/internal.h") made page_mapcount() an internal function for Linux
v6.11. This function is used by the NVMAP driver and so implement this
function in the NVMAP driver directly instead. Note that newer kernels
implement folio_entire_mapcount() for compound page counts where as
older kernels use compound_mapcount(). Use conftest to detect which of
these functions is present in the kernel.
Bug 4749580
Change-Id: I6504448727d6b3e9f2caa8581a66aad464ae2426
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3180097
(cherry picked from commit f327656ea3)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3183926
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Ketan Patil <ketanp@nvidia.com>
Bottom two lines in IMX390 SDR mode are completely
black. Fix issue in SDR mode table. Also change the
image resolution to 1936x1096.
Last two line are removed by disabling SMPG(Safety Mechanism Pattern Generator) using register 0x2DFC, 0x2E24.
Bug 4505240
Change-Id: I92047ea83d20f1b4ca4e712718051a9c6e69cfcb
Signed-off-by: Ankur Pawar <ankurp@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3147214
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Praveen AC <pac@nvidia.com>
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
In Linux v6.11, the structure 'kernel_ethtool_ts_info' was added as a
copy of the existing 'ethtool_ts_info' for the kernel and the various
kernel functions were updated to use the new structure. This broke the
build for the nvethernet driver, so add a test to the conftest script to
detect the presence of this new strucutue and update the nvethernet
driver accordingly.
Bug 4749580
Change-Id: I2c5daa0132edee8c98eec3a66e19144484325ab0
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3176868
(cherry picked from commit 9d6283ca4f)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3178809
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Revanth Kumar Uppala <ruppala@nvidia.com>
In Linux v6.11, commit d6f66e292676 ("pwm: Make pwm_request_from_chip()
private to the core") made the function pwm_request_from_chip() a
private function to the PWM core driver. This function is used by both
the CDI and ISC camera drivers and so these driver no longer build
against Linux v6.11.
Fix this by updating the CDI and ISC drivers to use the function
of_pwm_xlate_with_flags() which has been supported since Linux v3.8.
This function internally calls pwm_request_from_chip() and configures
the pwm->args.period parameter and is therefore, equivalent to the
existing code.
Bug 4749580
Change-Id: Id1381ebc08730aaaa6c3591d90bcc4cc95a6c235
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3176063
(cherry picked from commit f308807197)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3178155
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Brad Griffis <bgriffis@nvidia.com>
When CONFIG_V4L2_ASYNC is not enabled and CONFIG_DEBUG_LIST is enabled
then the following kernel panic is observed ...
imx219: probe of 9-0010 failed with error -524
list_add corruption. next->prev should be prev (ffffb2b2e95dad78),
but was 0000000000000000. (next=ffff000088baf508).
------------[ cut here ]------------
kernel BUG at lib/list_debug.c:23!
Internal error: Oops - BUG: 00000000f2000800 [#1] SMP
If CONFIG_V4L2_ASYNC is not enabled in the kernel, then the function
tegracam_v4l2subdev_register() will return -ENOTSUPP and this will cause
the probe of the sensor drivers to fail. Although failing to probe the
driver is expected in this case, it is not expected that this will
trigger a kernel panic if CONFIG_DEBUG_LIST is enabled. The panic is
caused because tegracam_device_unregister() is not being called in the
exit path of the probe function when tegracam_v4l2subdev_register()
returns an error.
Bug 4704110
Change-Id: I4875a31e55c24b5ab0932a683f16a7a74695a6b6
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3162389
Reviewed-by: Paritosh Dixit <paritoshd@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Ankur Pawar <ankurp@nvidia.com>
The RealTek drivers do not build against all Linux distributions because
some Linux distributions have back-ported upstream changes and so the
KERNEL_VERSION checks in the driver do not work for these distributions.
Add compilation flags for these drivers so that we can skip the building
of these drivers for certain Linux distributions.
Please note that the RealTek drivers build fine against Linux v5.14 and
so we should not prevent these driver being built against all Linux
v5.14 kernels.
Bug 4729493
Change-Id: I004d61a884c6f01b4629de56ecc17b55d4fa2cd1
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3171274
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
r8126 driver build is disabled on K6.10 and later. This is
causing the packaging failure where module is not available.
Add dummy driver when real driver is not available to make
packaging success.
Bug 4478230
Change-Id: I6ceef7f92863499c58edaf4ddd19ae65b12a2a00
Signed-off-by: Revanth Kumar Uppala <ruppala@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3158781
Reviewed-by: Bibek Basu <bbasu@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
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
Bug 4652606
Change-Id: Ifabe9e26e840537520d66acca106b37d3c285722
Signed-off-by: Revanth Kumar Uppala <ruppala@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3123359
(cherry picked from commit 20dbe0996b)
Reviewed-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3147911
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
The IMX390 driver was recently updated and this broke building the
driver for Linux v6.1+ kernels. Revert the specific changes that broke
the build and update the max929x driver so that it can also be built for
Linux v6.1+ kernels.
Finally, replace 'gpio_cansleep' with 'gpiod_cansleep' because
'gpio_cansleep' was removed in Linux v6.5. This also aligns with the
other camera drivers that use 'gpiod_cansleep' instead of
gpio_cansleep'.
Bug 4505240
Change-Id: I46960bca1e1e4aeff9bd9fdaed8b2db2be104b5b
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3149880
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: Ankur Pawar <ankurp@nvidia.com>
Reviewed-by: Brad Griffis <bgriffis@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Enable WDR(wide dynamic range) mode for IMX390.
The following modification and addition are done:
1 Add WDR mode table
2 Restructure IMX390 driver for WDR gain and framerate
3 Use common driver to configure serializer(max9295) and
deserializer(max9296)
Bug 4505240
Change-Id: I52fc3f03a66fe4e2446d7b41f409ed4154c42f02
Signed-off-by: Ankur Pawar <ankurp@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3105249
Reviewed-by: Narendra Kondapalli <nkondapalli@nvidia.com>
Reviewed-by: Shubham Chandra <shubhamc@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Praveen AC <pac@nvidia.com>
When nvethernet was updated to support Linux v6.9 kernels, the code that
checks if the variable 'eee_req->advertised' is zero or non-zero was not
updated correctly. For Linux v6.9, the variable 'eee_req->advertised' is
a bitmask and so cannot be checked directly to see if it is zero or
non-zero. Building the nvethernet driver with the flag '-Werror=address'
exposed this issue. Fix this by using the 'linkmode_empty()' function to
determine if 'eee_req->advertised' is zero or non-zero for Linux v6.9
kernels.
Bug 4471899
Bug 4662166
Change-Id: Id4080d62006226648cd398dc8652578c74dd8158
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3146810
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Revanth Kumar Uppala <ruppala@nvidia.com>
Reviewed-by: svcacv <svcacv@nvidia.com>
In Linux v6.10, the 'class' argument was removed from the
i2c_mux_add_adapter() function. Add a test to conftest to detect the
correct number of arguments for i2c_mux_add_adapter() and update the
virtual-i2c-mux driver accordingly to fix the build for Linux v6.10.
Bug 4593750
Change-Id: I7333a511b487b7c2f2fa0ce7c34f2df5f061fbe4
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3142398
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
In Linux v6.10, a pointer to a dynamically allocated 'struct device'
was replaced with a statically allocated 'struct device' in the
'pwm_chip' structure. Update the Tegra camera drivers accordingly to fix
the build for Linux v6.10.
Bug 4593750
Change-Id: I05e15e2a63383ab2f96be6c20e81705de9581869
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3123220
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Brad Griffis <bgriffis@nvidia.com>
In Linux v6.10, a pointer to a dynamically allocated 'struct device'
was replaced with a statically allocated 'struct device' in the
'pwm_chip' structure. Update the Tegra PWM Tachometer driver accordingly
to fix the build for Linux v6.10.
Bug 4593750
Change-Id: I9d629746290282b5c1858f8308128d94ff155c49
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3123219
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Brad Griffis <bgriffis@nvidia.com>
The function blk_queue_max_hw_sectors() was removed in Linux v6.10 and
so add a test to conftest to see if this function is present or not to
allow the driver to build. The virtual-storage driver is currently
broken for Linux v5.19+ kernel due to other incompatibilities with these
newer kernels, but has been updated so that it still builds. Therefore,
allow the driver to build for Linux v6.10 while the driver is fixed
properly for these newer kernels.
Bug 4311184
Bug 4593750
Change-Id: Ic4054c87acdf3c77f03ff94fbdde513d84fe229b
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3142216
(cherry picked from commit c73cf3c92a)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3142204
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Some of the conftest tests are no longer working with the mainline
kernel and this is causing various build failures for drivers. Upstream
commit a3b00f10da80 ("objpool: enable inlining objpool_push() and
objpool_pop() operations") inlined some code that causes build error to
occur when the tests are built with 'Werror=address-of-packed-member'.
Upstream commit 6f303d60534c ("gcc-9: silence 'address-of-packed-member'
warning") disables the option 'address-of-packed-member' for the kernel
already and so fix these new build failures by disabling this option
for the conftest tests.
Bug 4593750
Change-Id: I37af97079bb7734fcd5bf10384b1afc071613594
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3142214
(cherry picked from commit 1a635bb0ea)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3142203
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>