This change adds conditional compilation blocks to disable L4T-specific
camera and multimedia drivers when building for embedded Linux platforms.
Key changes include:
- Add ifneq ($(NV_BUILD_SYSTEM_TYPE),embedded-linux) checks in multiple
Makefiles to exclude L4T-specific components
- Introduce NV_IS_L4T define to conditionally include L4T functionality
- Reorganize header includes to support both L4T and embedded Linux builds
- Conditionally wrap L4T-specific struct members and function calls
- Update module dependencies (cdi_mgr now depends on cdi_dev instead of cdi_pwm)
Jira CAMERASW-32251
Change-Id: I934fdd0188e914c07b456c0f6ad379d2a08555ca
Signed-off-by: Mohit Ingale <mohiti@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3294869
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Anubhav Rai <arai@nvidia.com>
Reviewed-by: Jagadeesh Kinni <jkinni@nvidia.com>
Reviewed-by: Vincent Chung <vincentc@nvidia.com>
Reviewed-by: Frank Chen <frankc@nvidia.com>
- Integrate calibration data structure from
Leopard Imaging hawk driver into NVIDIA
hawk driver
- Rearrange EEPROM calibration data structure to
maintain backward compatibility with HAWK, OWL
modules with EEPROMs programmed using earlier
calibration data structure
- Use separate structures for tracking imu noise
parameters and place it after the module
serial number.
- Change module serial number length used for
reading the serial number from EEPROM data
L4T-4649
Change-Id: I17613905e63fef3fc690dca42a0a10bd1f4fc24d
Signed-off-by: Praveen AC <pac@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3072846
(cherry picked from commit 518ae94bb4)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3073820
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Bibek Basu <bbasu@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
(cherry picked from commit 118cd4e0a6)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3173737
Reviewed-by: Brad Griffis <bgriffis@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
- Fixes the frame corruption issue encountered
when simultaneously streaming from two
hawks via E3653 GMSL2 board
- Route each serializer output to a different
deserializer output CSI port instead of
routing video data from both serializers
to the same deserializer output port
- Route data through two virtual channels for
each of the two output ports instead of four
virtual channels all through a single output
port
- Fix serdes programming comments
Bug 4032165
Bug 3753423
JEC-286
Change-Id: I7b4e929e9f5330cc6eb0aa72646ce429a713df7a
Signed-off-by: Praveen AC <pac@nvidia.com>
(cherry picked from commit e31d73fa20)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3073819
Reviewed-by: Bibek Basu <bbasu@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Fix imx477 partial frame issue and wrong frame-length
/exposure time calculations.
Uses hardcoded sensor internal clock frequency
instead of clock values from sensor device tree.
Adding clock frequency to device tree also require
deskew_initial_enable = "true". Setting deskew in
device tree is causing kernel panic in function
nvcsi_deskew_setup(). For unblocking the IMX477
use case, set hardcoded clock in driver for now.
Bug 4384649
Change-Id: Iedb02673c6f4da140aee22adc991805b6aa1eb7e
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3086503
cherry-picked from <4d4e68569911d4424073a3b39f5b2642346a077a>
Signed-off-by: Ankur Pawar <ankurp@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3087470
Reviewed-by: Praveen AC <pac@nvidia.com>
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
Some camera drivers are dependent upon CONFIG_MEDIA_SUPPORT being
enabled in the kernel and if it is not enabled, building these drivers
fail. Fix this by only building the camera drivers dependent upon
CONFIG_MEDIA_SUPPORT when this option is actually enabled.
Bug 4449072
Change-Id: I3637b5763667fbc9965bbeaf126115010e711c7e
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3050559
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
Building nv_ar0234 and nv_hawk_owl sensor drivers with GCC 6/7 fails
with the following errors ...
drivers/media/i2c/nv_ar0234.c:797:66: error: initialiser element is not
constant
.compound_ctrl_size = {sizeof(struct NvCamSyncSensorCalibData),
alternating_exposure_cfg_size},
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/media/i2c/nv_hawk_owl.c:883:59: error: initialiser element is
not constant
.compound_ctrl_size = {sizeof(NvCamSyncSensorCalibData),
alternating_exposure_cfg_size},
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
These older versions of GCC are not able to reconcile the size from the
variable 'alternating_exposure_cfg_size' even though it is defined as
const. Given that the variable 'alternating_exposure_cfg_size' is only
used here, fix this by removing this variable and directly defining the
size in the declaration of the 'compound_ctrl_size' parameter.
Note that the minimum GCC compiler currently supported by the Linux
kernel is v5.1.
Bug 4448563
Change-Id: I4d3ac6eeb961a944901e73a1d92e753cae44220c
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3050272
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-by: Frank Chen <frankc@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
Use conftest to determine the return type of .remove() of
struct i2c_driver is int or void type instead of kernel version.
The return type got changed with commit ed5c2f5fd10d ("i2c:
Make remove callback return void")
Bug 4387902
Change-Id: Iceb50b0c9cd78fefb35aef0831b1ea7e8f74d619
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3037915
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
The compiler option -Wmissing-prototypes is being enabled globally in
the upstream Linux kernel and this causes build failures for various
drivers. The build failures occur because either the driver is missing
an include file which has the prototype or because the function is not
declared statically when it should be (ie. there are no external users).
Fix the various build failures and enable -Wmissing-prototypes to
prevent any new instances from occurring. Note that the only driver that
is not fixed at the moment is rtl8822ce due to large number of failures
and so build this with '-Wno-missing-prototypes' for now, which is not
different to how it was being compiled prior to this change.
Bug 4404965
Change-Id: Ie5572d23659e0346fa035d645d9043b0a6da5fdc
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3027488
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
- update ar0234 driver to support ar0234 sensor
hardware provided support for capturing frames
using alternating exposure time and analog gain
settings through automatic context switching
- added new v4l2 control having control id
TEGRA_CAMERA_CID_ALTERNATING_EXPOSURE for
configuring alternating exposure settings
- other changes to support aforementioned changes
Bug 4064517
Jira L4T-4501
Change-Id: Id1d3d745345836436b16da1fd00cc97f2e3b5553
Signed-off-by: Shashank Kumar <shaskumar@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2881141
(cherry picked from commit e973475525c9a7a99552282316e06126b8fff625)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2987067
Reviewed-by: Anubhav Rai <arai@nvidia.com>
Reviewed-by: Bibek Basu <bbasu@nvidia.com>
Tested-by: Anubhav Rai <arai@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
Upstream commit "7d0b80647f73"
[gpiolib: remove unused gpio_cansleep()]
Removed gpio_cansleep() API as there are no upstream users.
Replace the usage of gpio_cansleep() with gpiod_cansleep(). This is also
backwards compatible with older Kernels.
Bug 4276500
Change-Id: I37230d4371298d724e2311c803409108e93a4fed
Signed-off-by: Kartik Rajput <kkartik@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2978834
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
When building the NVIDIA out-of-tree drivers against 3rd party Linux
kernels where V4L2 support is not be enabled by default, the camera
drivers fail to build. Although this is expected, it is preferred that
the driver can still be built but then fail when loaded. Update the
camera drivers to guard around the V4L2 functions so that the drivers
can still be built but will return an error where needed.
Bug 4119327
Change-Id: I3a1115e5f0451153831c396244c01d7525cb51a1
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2979254
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Upstream Linux commit 03c835f498b5 ("i2c: Switch .probe() to not
take an id parameter") removes the 'id' argument from the I2C probe
callback. Update the ov5693 driver, which defines an I2C probe callback
function, to fix building the driver for Linux v6.3.
Bug 4014315
Change-Id: I8c8954b7c1e1e322fb3f560f6348caac54e5e43d
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2919423
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
Upstream Linux commit 03c835f498b5 ("i2c: Switch .probe() to not take an
id parameter") removes the 'id' argument from the I2C probe callback.
Update the various sensor drivers, which define an I2C probe callback
function, to fix building the drivers for Linux v6.3.
Bug 4014315
Bug 4075345
Change-Id: I2dc06188d1d19e086f108013c63439d9381d6c58
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2889877
Reviewed-by: Rohit Khanna <rokhanna@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
Add ar0234 camera sensor driver code,
max96712 GMSL serializer code, mode tables
and makefile changes. These drivers are copied
from K5.10 camera driver repo. Changes include
svcacv warning fix and eeprom read status is
ignored due to bug 4064490.
Bug 3583587
Bug 4064490
Change-Id: I7ea0ecf959caccafd283c8db5fb7c3be912cf8bb
Signed-off-by: Ankur Pawar <ankurp@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2868422
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
Upstream Linux commit 03c835f498b5 ("i2c: Switch .probe() to not take an
id parameter") removes the 'id' argument from the I2C probe callback.
Update the ov5693 driver, which defines an I2C probe callback function,
to fix building the driver for Linux v6.3.
Bug 4014315
Change-Id: Ic037da06b1999801fb62e6ccd39b92fe86b5402a
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2875027
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>