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>
In Linux v6.10, the v4l2-subdev callbacks 'g_dv_timings' and
's_dv_timings' were moved from the v4l2_subdev_video_ops structure to
the v4l2_subdev_pad_ops structure. Fix the build for Linux v6.10 by
using conftest to determine which structure is used for these callbacks.
Bug 4593750
Change-Id: Ic54e88da22ed7d1da9b6026a45b9c4307637c7b4
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3142215
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Add the check to see if the device is already in use or not,
while calling s_ctrl by multiple user apps on the same video node.
Here ,The "vb2_is_busy" function checks if the queue represented
by the vb2_queue instance is busy by checking if there are any
buffers in the active queue.If there are any buffers in the active queue,
it means that they are currently being processed by the device driver,
and the queue is considered busy.
Bug 3836336
Change-Id: I3d9b215f953c44d55cbbc287fe94c9b793da5955
Signed-off-by: Praveen AC <pac@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2856359
(cherry picked from commit 780fcc55db93c62d5acd3a3866fd1c841c1fdb7c)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3130746
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Bibek Basu <bbasu@nvidia.com>
Reviewed-by: Shubham Chandra <shubhamc@nvidia.com>
For Linux v6.8, the function strlcpy() has been removed. The function
strscpy() was added in Linux v4.3 and has been preferred over strlcpy().
See upstream Linux commit 30035e45753b ("string: provide strscpy()") for
more details. The Linux checkpatch.pl script warns against using
strlcpy().
The function strscpy() takes the same arguments as strlcpy(), but
returns a type of ssize_t instead of size_t. Update the drivers to use
strscpy() instead of strlcpy().
Bug 4448428
Change-Id: Id6f196f0e81decf1545f9aa4f74f5c63a7f72a48
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3059457
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
Tested-by: Laxman Dewangan <ldewangan@nvidia.com>
There is case where CSI channels are initialized later before
accessing it. In this case, it can cause NULL pointer access.
Add checks before accessing it in the function
tegra_channel_find_linked_csi_subdev().
Bug 4346767
Change-Id: I752898af4b2164540cbd2e071ee36af4cd5f6fde
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3039709
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
Use conftest to determine if media_entity_remote_pad()
function is present or not
This function is removed by commit b2e44430b634 ("media:
mc-entity: Rename media_entity_remote_pad to media_pad_remote_pad_first")
in Linux 6.0
Bug 4387902
Change-Id: I816016731ac44a3c093438310f8e60bd166f2fd7
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3037917
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
kernel drivers can be built as built-in (=y) or module
(=m). The old ways of checking a driver is enabled or
not is to use "#if define(CONFIG_XXX)" for built-in and
"#if defined(CONFIG_xxx_MODULE)" for module.
Switch to the new IS_ENABLED() macro which can check
a driver is configured as built-in or module.
Jira CAMERASW-10141
Change-Id: I9b7e3e911a587da19ca56cdc5ef610d9b4c52850
Signed-off-by: Frank Chen <frankc@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2828089
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: Igor Mitsyanko <imitsyanko@nvidia.com>
Reviewed-by: Ankur Pawar <ankurp@nvidia.com>
Reviewed-by: Matti Ryttylainen <mryttylainen@nvidia.com>
Reviewed-by: Shiva Dubey <sdubey@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>