253 Commits

Author SHA1 Message Date
Jon Hunter
56068ded4d media: i2c: max967xx: Fix build for pre Linux v6.3
In Linux v6.3, commit 03c835f498b5 ("i2c: Switch .probe() to not take an
id parameter") removed the ID parameter from the I2C probe function. The
max96712 does not build for Linux kernels prior to Linux v6.3 because it
assumes that the ID parameter has been removed. There is an existing
conftest that checks to see if the probe function requires and ID
parameter and so update the max967xx drivers accordingly to fix the build
for kernels prior to Linux v6.3.

Note we should avoid using explicit kernel version checks in out-of-tree
drivers because this does not work for 3rd party kernels. Therefore,
remove the kernel version.h because this is not used or needed.

Bug 5277201

Change-Id: Idbc569d782a952ee9ea0a91aace54df20f50701d
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3506342
Tested-by: Shawn Bai <xueyuanb@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Shawn Bai <xueyuanb@nvidia.com>
2025-12-08 06:12:28 -08:00
Shawn Bai
2e202467e3 [MAX96712][MAX96726]support RAW10 and RAW16 to ToT
Bug 5277201

Change-Id: I0d402e7d26b700f78e3a5ce4a461b33f4f2cda1c
Signed-off-by: Shawn Bai <xueyuanb@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3458947
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: Jukka Kaartinen <jkaartinen@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: Narendra Kondapalli <nkondapalli@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Ankur Pawar <ankurp@nvidia.com>
Reviewed-by: svcacv <svcacv@nvidia.com>
2025-12-05 05:09:51 -08:00
Shawn Bai
ef3128dda2 [MAX96712][MAX96726]add max96712/726 TPG driver
max96712, run in fixed configuration
    1. resolution: 3840x2160
    2. FPS: 30
    3. data rate 1900Mbps
    4. pixel format: RAW10
    5. PHY mode: DPHY 4Lane

max96726, run in fixed configuration
    1. resolution: 3840x2160
    2. FPS: 30
    3. data rate: DPHY 2500Mbps, CPHY 4500Msps
    4. pixel format: RAW16

Bug 5060621

Change-Id: I0ab8139f3b8e4756b7558653ea516e5fbc2f719d
Signed-off-by: Shawn Bai <xueyuanb@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3447885
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Jukka Kaartinen <jkaartinen@nvidia.com>
Reviewed-by: Narendra Kondapalli <nkondapalli@nvidia.com>
2025-12-05 05:09:36 -08:00
Shawn Bai
38e2452efc [Camera]polarity swizzle, clk settle, shmoo en
in modeX prop in dts,

   lane_polarities = <0 4 0 4>;

   cil_clksettletime = "10";

   shmoo_enable = "true";
   afe_hf_gain = "6";
   edge_delay = "3";

Bug 5277201

Change-Id: If0c8202ed2703b7e484bf981982a71a0ed09bf06
Signed-off-by: Shawn Bai <xueyuanb@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3447880
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: Ankur Pawar <ankurp@nvidia.com>
Reviewed-by: Narendra Kondapalli <nkondapalli@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Jukka Kaartinen <jkaartinen@nvidia.com>
2025-12-05 05:09:29 -08:00
Johnny Liu
4d81ee0f63 drivers: video: Remove emc clock management
EMC clock is not intended to be managed by the kernel/ccplex. It is
completely managed by the BPMP BWMGR driver.

Remove outdated code that touches emc clock directly, and fix the NULL
pointer dereference issue.

Bug 5622903

Change-Id: Ied1b6aaceaa026f954917b4b46f47dece1521d62
Signed-off-by: Johnny Liu <johnliu@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3487187
Reviewed-by: Chinniah Poosapadi <cpoosapadi@nvidia.com>
Reviewed-by: Narendra Kondapalli <nkondapalli@nvidia.com>
Reviewed-by: Shubham Chandra <shubhamc@nvidia.com>
Reviewed-by: Akihiro Mizusawa <amizusawa@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: svcacv <svcacv@nvidia.com>
2025-11-25 19:42:09 -08:00
fraunak
59fa283238 camera: Add ISP floorsweeping support to Linux
This commit implements T264 ISP floorsweeping functionality in the Linux
kernel driver, extending the existing RCE firmware implementation to
provide transparent ISP unit redirection at the kernel level.

Changes:
- Add isp_capture_query_availability_mask_probe() function to query ISP
  availability mask from RCE firmware during driver probe via IVC
- Add isp_capture_find_first_available() helper function to find the
  first available ISP unit from a bitmask for HW assignment
- Integrate floorsweeping logic into isp_get_nvhost_device() to handle
  SW-to-HW ISP unit mapping with thread-safe assignment
- Add isp_capture_get_capabilities() function to expose ISP availability
  to userspace via new IOCTL (ISP_CAPTURE_GET_CAPABILITIES)
- Add probe-time caching of ISP availability mask to avoid repeated IVC
  queries during runtime
- Add comprehensive error handling and safety mechanisms for unknown
  configurations

Implementation details:
- Uses CAPTURE_ISP_FUSE_QUERY_REQ/RESP IVC messages for querying RCE
- Maintains SW-to-HW ISP unit mapping array protected by mutex
- The SW-to-HW mappings persist for the driver's lifetime, given that
  multiple channels make use of the same SW unit ID's and we do not
  have tracking of all open channels during runtime
- Integrates with existing ISP setup flow before buffer allocation
- Maintains backward compatibility with non-T264 hardware
- Conservative approach: blocks requests when no ISP units are available

Floorsweeping logic (handled by RCE firmware, exposed as bitmask):
- Mask bit N set = ISP N available (not fused off)
- Mask bit N clear = ISP N fused off (unavailable)
- Examples:
  - 0x3 (0b11): Both ISP0/ISP1 available (no floorsweeping)
  - 0x1 (0b01): Only ISP0 available → all requests map to ISP0
  - 0x2 (0b10): Only ISP1 available → all requests map to ISP1
  - 0x0: No ISP units available (block all requests)

Benefits:
- Transparent operation for applications using fusacapture library
- Automatic ISP unit redirection without API changes
- Improved hardware yield by supporting single-ISP configurations
- Robust error handling and safety mechanisms
- Minimal performance overhead with probe-time caching

The implementation complements the existing RCE firmware floorsweeping
support and provides a complete end-to-end solution for T264 ISP
floorsweeping across all software layers.

Bug 5640706

Change-Id: If85ee3178e857394300479dd42e636f5f5d3bd23
Signed-off-by: fraunak <fraunak@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3491180
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Evgeny Kornev <ekornev@nvidia.com>
Reviewed-by: Kalle Jokiniemi <kjokiniemi@nvidia.com>
Reviewed-by: Semi Malinen <smalinen@nvidia.com>
Tested-by: Akihiro Mizusawa <amizusawa@nvidia.com>
2025-11-25 13:12:39 -08: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>
2025-10-07 09:27:06 -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
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
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
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
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
Igor Mitsyanko
bbcbfbb49e coe: remove scratch buffer
Scratch buffer is no longer used by RCE as it now requires four image
buffers to be provided by user before streaming starts.

Jira CT26X-1892

Change-Id: Ib69a58db95b074d5b908d7fd9b1c3ccfb361b72b
Signed-off-by: Igor Mitsyanko <imitsyanko@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3419643
Reviewed-by: svcacv <svcacv@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Narendra Kondapalli <nkondapalli@nvidia.com>
Tested-by: Raki Hassan <rakibulh@nvidia.com>
2025-07-30 07:15:40 -07:00
Igor Mitsyanko
5dbcf5524b coe: keep track of registered buffers
Modify logic of CoE IOCTLs REGISTER_BUFFER and CAPTURE_REQUEST to use
pre-registered buffers identified with an index. Instead of userspace
specifying a DMA_BUF ID for each capture request it will now specify a
simple index 0-3 of a pre-registered DMA_BUF.

Jira CT26X-1892

Change-Id: Icc3e0f3f8f572d4590f8d64badc8eea89f52c663
Signed-off-by: Igor Mitsyanko <imitsyanko@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3419642
Reviewed-by: Narendra Kondapalli <nkondapalli@nvidia.com>
Reviewed-by: svcacv <svcacv@nvidia.com>
Tested-by: Raki Hassan <rakibulh@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Raki Hassan <rakibulh@nvidia.com>
2025-07-30 07:15:35 -07:00
Igor Mitsyanko
2909c904dc coe: move Rx descriptor mem from uncached region
RCE no longer manipulates Rx descriptor ring with CPU accesses, but uses
a DMA engine instead. Rx descriptor mem can be moved out of uncached
RCE region.
As RCE uncached region is now empty - remove it.

Jira CT26X-1892

Change-Id: I3651468680349041ae77d39eefc6fd1ccfba7eb2
Signed-off-by: Igor Mitsyanko <imitsyanko@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3419641
Tested-by: Raki Hassan <rakibulh@nvidia.com>
Reviewed-by: Narendra Kondapalli <nkondapalli@nvidia.com>
Reviewed-by: Raki Hassan <rakibulh@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: svcacv <svcacv@nvidia.com>
2025-07-30 07:15:30 -07:00
Igor Mitsyanko
913e46c90d coe: move PKTINFO from uncached RCE region
RCE firmware no longer writes anything to PKTINFO buffers and just reads
them. PKTINFO can be moved out of uncached RCE memory region and treated
like a normal allocation.

Jira CT26X-1892

Change-Id: I918d7d5c7e7cbe07255e9d89459932148dd7418f
Signed-off-by: Igor Mitsyanko <imitsyanko@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3419640
Reviewed-by: svcacv <svcacv@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Tested-by: Raki Hassan <rakibulh@nvidia.com>
Reviewed-by: Narendra Kondapalli <nkondapalli@nvidia.com>
2025-07-30 07:15:25 -07:00
Igor Mitsyanko
45423af499 coe: fix driver reinsert
Fix CoE driver rmmod/insmode cleanup logic to avoid resource leacking.

Jira CT26X-1892

Change-Id: I8539fd32965adf0fb302d7177a22fa1dd94c75d6
Signed-off-by: Igor Mitsyanko <imitsyanko@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3419639
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: Narendra Kondapalli <nkondapalli@nvidia.com>
Tested-by: Raki Hassan <rakibulh@nvidia.com>
2025-07-30 07:15:20 -07:00
Igor Mitsyanko
344aa664d2 coe: make CoE capture more robust
Modify CoE capture logic a bit to make it more robust and error-proof:
- RCE Rx queue limit size is 16, no point to have 32 elements long queue
  in kernel.
- Pass kernel's queue length to RCE when opening a channel so it can be
  validated (to not exceed RCE max depth)
- validate image buffers IOVA addresses and buffer length before queuing
  to RCE

Jira CT26X-1892

Change-Id: I199143fe726ebab05a1236d4b14b59f0528d65a8
Signed-off-by: Igor Mitsyanko <imitsyanko@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3419638
Reviewed-by: svcacv <svcacv@nvidia.com>
Tested-by: Raki Hassan <rakibulh@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Narendra Kondapalli <nkondapalli@nvidia.com>
2025-07-30 07:15:15 -07:00
Rakibul Hassan
f374450381 coe: Add Camera Over Ethernet cababilities
The following change is a squash change that aims to reintroduce
Camera Over Ethernet (CoE) functionality to kernel.

Bug 5401884
Bug 5419655

Change-Id: Id2fc0263c43ed8566241dbf712aa603a3b3a76f4
Signed-off-by: Rakibul Hassan <rakibulh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3419627
Reviewed-by: Anubhav Rai <arai@nvidia.com>
Reviewed-by: Narendra Kondapalli <nkondapalli@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Igor Mitsyanko <imitsyanko@nvidia.com>
Reviewed-by: Jon Hunter <jonathanh@nvidia.com>
2025-07-30 07:15:10 -07:00
Shubham Chandra
5500a4aee6 media: camera: modify error log to info log
v4l2-compliance has a negative test for image size,
resulting in an error log. Modify this error log to
info to avoid reporting kernel error/warning failure.

Bug 5143480

Change-Id: I5ec459f97c5b09e130293b59c19c1eb3ea9a53ee
Signed-off-by: Shubham Chandra <shubhamc@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3396425
Reviewed-by: Ankur Pawar <ankurp@nvidia.com>
Reviewed-by: Bitan Biswas <bbiswas@nvidia.com>
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: Nithin Varghese <nvarghese@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
2025-07-24 10:20:36 +00:00
Praveen AC
459e781d79 virtual i2c mux support for other Hawks
* Add virtual i2c bus support for 2nd, 3rd
& 4th Hawks to read/write EEPROM data
while streaming
* Move MAX96712 function declarations to
a proper header file instead of using extern
declarations in .c files. This fixes checkpatch
warnings about externs in .c files and improves
code organization

Bug 4807682

Change-Id: Ie4e7f7b9adc6fe6255a517cd5f076afdc754384a
Signed-off-by: Praveen AC <pac@nvidia.com>
(cherry picked from commit 57dc20f5a8)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3365540
Reviewed-by: Narendra Kondapalli <nkondapalli@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Ankur Pawar <ankurp@nvidia.com>
2025-07-24 10:20:35 +00:00
Mark Stephen Krueger
872a72234a kmd: trigger RCE snapshot on timeout
Jira CAMERASW-32243

Change-Id: I529a0d39990f6a20ff9780089383deebe22e2741
Signed-off-by: Mark Krueger <mkrueger@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3355776
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: Ying Zhou <yizhou@nvidia.com>
Reviewed-by: Shiva Dubey <sdubey@nvidia.com>
Reviewed-by: svcacv <svcacv@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: Mohit Ingale <mohiti@nvidia.com>
2025-07-24 10:20:35 +00:00
Frank Chen
48f3711947 nvidia-oot: cdi: Update cdi package buf size check
The original checking for cdi_dev_package buffer size is wrong,
it should not check the max size against max I2C payload size.

If the cdi_dev_package buffer size is too big for i2c transfer,
it will be breaking down to smaller sizes and transferred using
multiple I2C messages.

Define a new MAX_CDI_DEV_PACKAGE_BUFFER_SIZE for checking the
cdi_dev_package buffer size.

Bug 5107765
Jira CAMERASW-333779

Change-Id: Ieec049d51af4911dfd31410f43aa4733b75d265d
Signed-off-by: Frank Chen <frankc@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3365281
Reviewed-by: Kevin Xie (SW-TEGRA) <kevixie@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Ganesh Ram Savithri Sreenivas Murthy <ganeshrams@nvidia.com>
Reviewed-by: Samuel Hung <samuelh@nvidia.com>
2025-07-24 10:20:35 +00:00
zyi
c71ca8521c kernel: nvidia-oot: fix TAINTED_SCALAR
Fix TAINTED_SCALAR static analysis:
- camera/fusa-capture/capture-isp-channel.c

New violations are in
fusa_kmd: delta per rule
=======================================================
New :
=======================================================
Total new violations : 0
=======================================================
Fixed:
 -       TAINTED_SCALAR:  -3 defects
 - MISRA C-2012 Directive 4.14:  -3 defects
=======================================================
Total fixed violations : -6
=======================================================

Jira CAMERASW-33480

Change-Id: I428982ba33a26dcd5bb66e7b9a13ea689d7a8d1f
Signed-off-by: Yi Zhang <zyi@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3363100
Tested-by: Mike Jia <mijia@nvidia.com>
Reviewed-by: Frank Chen <frankc@nvidia.com>
Reviewed-by: Yang Xu <yangxu@nvidia.com>
Reviewed-by: Ankur Pawar <ankurp@nvidia.com>
Reviewed-by: Sumeet Gupta <sumeetg@nvidia.com>
Reviewed-by: Divyash Kumar <divyashk@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Mike Jia <mijia@nvidia.com>
2025-07-24 10:20:35 +00:00
Xiaoming Xiang
f717989baf fuzz: syzkaller semi automation script
Jira CAMERASW-30740

Change-Id: I429c9465b1fa1873d3a5e9ef3d9a182e22e486c9
Signed-off-by: Xiaoming Xiang <xxiang@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3314647
Reviewed-by: Ming Chang (SW-TEGRA) <mingchang@nvidia.com>
Reviewed-by: Frank Chen <frankc@nvidia.com>
Reviewed-by: Patrick Young <payoung@nvidia.com>
2025-07-24 10:19:19 +00:00
zyi
9192e31e0a fuzz: nvidia-oot: syzkaller fuzz test description
Involving the following modules: cam_fsync cdi fusa_kmd

Jira CAMERASW-30645

Change-Id: Iebba84a0df43f0acc8b8d3906be5e0d1f85505fe
Signed-off-by: zyi <zyi@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3307513
Reviewed-by: Ming Chang (SW-TEGRA) <mingchang@nvidia.com>
Reviewed-by: Patrick Young <payoung@nvidia.com>
Reviewed-by: Frank Chen <frankc@nvidia.com>
Reviewed-by: Xiaoming Xiang <xxiang@nvidia.com>
Tested-by: Xiaoming Xiang <xxiang@nvidia.com>
2025-07-24 10:19:19 +00:00
Xiaoming Xiang
b081602754 fuzz: nvidia-oot: fix syzkaller fuzz test crash
fix cdi and fusa kmd module crash

Jira CAMERASW-30661

Change-Id: I78b49a5f0d65f7c69ff1f1a8b746c4091d4adeb7
Signed-off-by: Xiaoming Xiang <xxiang@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3337853
Reviewed-by: Ming Chang (SW-TEGRA) <mingchang@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Patrick Young <payoung@nvidia.com>
Reviewed-by: Frank Chen <frankc@nvidia.com>
2025-07-24 10:19:19 +00:00
Mohit Ingale
a8bff2c6e5 camera:kmd replace WARN/WARN_ON usage
Replace use of WARN or WARN_ON kernel with dev_warn to improve logging
behavior. This change ensures that error conditions are reported with
clear informative messages rather than kernel stack traces that can
flood logs.

Additional information:
- The files `drivers/platform/tegra/rtcpu/debug.c` and
  `drivers/platform/tegra/rtcpu/hsp-combo.c` present in the original
  codebase were deleted as part of unrelated refactoring in the
  target repository; hence, changes related to these files in the
  patch were not applied.
- Additional changes are done to replace WARN_ON at other places.

Bug 4719119

Change-Id: Id12f1b4de77f8b007b557de140257a3bd7478b52
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/3308911
Signed-off-by: Mohit Ingale <mohiti@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3352892
Reviewed-by: Jagadeesh Kinni <jkinni@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Vincent Chung <vincentc@nvidia.com>
Reviewed-by: Frank Chen <frankc@nvidia.com>
2025-07-24 10:19:19 +00:00
Jon Hunter
04b1b44e81 media: camera: Use conftest for CSI2 config
In Linux v5.18, commit 20c238dfb26c ("media: v4l2-mediabus: Drop legacy
V4L2_MBUS_CSI2_*_LANE flags"), commit 5a6ac3f4b46f ("media:
v4l2-mediabus: Drop legacy V4L2_MBUS_CSI2_CHANNEL_* flags") and
commit b9f7caa7753a ("media: v4l2-mediabus: Drop
V4L2_MBUS_CSI2_CONTINUOUS_CLOCK flag") removed various CSI2 flags.
Out of these flags we only need to set the number of lanes. The other
flags are redundant. The configuration was moved by
commit 94d964e58ad6 ("media: v4l2-fwnode: Move bus config structure
to v4l2_mediabus.h") to the structure v4l2_mbus_config_mipi_csi2
which itself is under the structure v4l2_fwnode_endpoint. Use conftest
to detect if the structure v4l2_mbus_config_mipi_csi2 is present and
avoid using kernel version checks.

Bug 4425688

Change-Id: Icd597492e48831326c203a6556176ac3767472a3
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3354475
(cherry picked from commit 2f83033498)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3354638
Reviewed-by: Paritosh Dixit <paritoshd@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Tested-by: Brad Griffis <bgriffis@nvidia.com>
Reviewed-by: Brad Griffis <bgriffis@nvidia.com>
2025-07-24 10:19:19 +00:00
Junghyun Kim
7b863e3e09 kernel: cdi: Update fsync logic
CIM version 3 for Ferrix is added in DT which can be used to select
GPIO port number of IO expander to control the multiplexer for
each deserializer

Bug 5163582

Change-Id: I3ce608be9f5c18af005e1bc6fea9c73daeef7995
Signed-off-by: Junghyun Kim <juskim@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3342728
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: Mohit Ingale <mohiti@nvidia.com>
Reviewed-by: Frank Chen <frankc@nvidia.com>
Reviewed-by: Chinmay Mahajan <cmahajan@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
2025-07-24 10:19:19 +00:00
Mohit Ingale
41bf84e591 tegra: fsync: Fix tick calculation for freq generation
Use DIV_ROUND_DOWN_ULL consistently for frequency calculations to match
QNX implementation. For 30Hz signals, reference ticks were calculated
as 1041667 for a value of 1041666.67, while QNX correctly uses 1041666.

When generating precise frequencies, this rounding difference affects
how extra ticks distribute across periods (covering the 0.67 gap over
3 periods). The QNX implementation works correctly because it rounds down,
while the Linux implementation was rounding up.

This change ensures proper fractional tick distribution and prevents
signal drift over time for frequencies that aren't exact multiples of
the TSC clock unit.

Bug 5223558

Change-Id: I5fbeafd1e37c92fe95f2f3605d1ae225eacb88c8
Signed-off-by: Mohit Ingale <mohiti@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3348278
Reviewed-by: Justin Kim (SW-TEGRA) <juskim@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Frank Chen <frankc@nvidia.com>
Reviewed-by: Ian Kaszubski <ikaszubski@nvidia.com>
2025-07-24 10:19:19 +00:00
Ankur Pawar
9597e077cd media: camera: remove t194 from nvcsi driver files
Refactor nvcsi driver files to replace t194, with
more general name. Modify the makefile as well
As t194 on dev-main is deprecated as a platform.

Compatible string "nvidia,tegra194-nvcsi" remains
to maintain backward compatibility and avoid any
device tree changes.

Bug 3790154

Change-Id: Iad742dfc75430a9b74bf9d03bf5e89c0912eeab1
Signed-off-by: Ankur Pawar <ankurp@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3313179
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Anubhav Rai <arai@nvidia.com>
Reviewed-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-by: Brad Griffis <bgriffis@nvidia.com>
2025-07-24 10:19:18 +00:00
kevixie
04fdeac230 nvidia-oot: CameraSW: KMD SWUD update
+ Use CameraDoxygenWorkflowV1_02182025 to generate
  SWUD doxygen headers for functions in FusaCap KMD
  and RTCPU
+ Use Cursor Agent to generate SWUD doxygen headers
  for FusaCap capture-vi.c

Jira CAMERASW-32271

Change-Id: Ida6b94d6ffea3df593fa793cc4b9a150c87187ba
Signed-off-by: kevixie <kevixie@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3313956
Reviewed-by: Mohit Ingale <mohiti@nvidia.com>
Reviewed-by: Jagadeesh Kinni <jkinni@nvidia.com>
Reviewed-by: Frank Chen <frankc@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
2025-07-24 10:19:18 +00:00
Jon Hunter
a59a10dfeb drivers: Update timer APIs for Linux v6.15
In Linux v6.15, the timer APIs hrtimer_init() and del_timer() have been
removed. The hrtimer_setup() was added in Linux v6.13 to replace
hrtimer_init() and hrtimer_init() have finally been removed. The
functions del_timer()/del_timer_sync() were renamed to
timer_delete()/timer_delete_sync() in Linux v6.15. Use conftest to
detect these changes and update the drivers as necessary.

JIRA LINQPJ14-47

Change-Id: Id3994900384aad4b91155507cda91e04898ab12c
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3336168
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: Brad Griffis <bgriffis@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: svcacv <svcacv@nvidia.com>
2025-07-24 10:19:18 +00:00
Jukka Kaartinen
9e6481e659 vi: Add check for csi_port
Validate csi_port already in the setup phase to have same
behaviour as in the QNX.

Bug 5048625

Change-Id: Id53faa8c97899fe590da9b2e90dc72cac9e1b4ae
Signed-off-by: Jukka Kaartinen <jkaartinen@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3315532
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Mohit Ingale <mohiti@nvidia.com>
Reviewed-by: Semi Malinen <smalinen@nvidia.com>
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: Frank Chen <frankc@nvidia.com>
2025-07-24 10:19:17 +00:00
Yuyuan Chen
b21532e8c8 kernel: nvidia-oot: Fix Static issues
Fix TAINTED_SCALAR and Directive 4.14

Jira CAMERASW-32773

Change-Id: I94534469e34d1826f09784391701838448de3dfa
Signed-off-by: Yuyuan Chen <yuyuanc@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3321543
Reviewed-by: Ankur Pawar <ankurp@nvidia.com>
Reviewed-by: Patrick Young <payoung@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Frank Chen <frankc@nvidia.com>
Reviewed-by: Sumeet Gupta <sumeetg@nvidia.com>
Reviewed-by: Ryan Li <ryanli@nvidia.com>
2025-07-24 10:19:17 +00:00
Mohit Ingale
5c39da20d5 media: camera: Reject channel setup for already configured stream id
If channel is already opened for given stream id and virtual channel id,
reject the request and error out.

Bug 5048625

Change-Id: I57c87128ce41c116fb2c8ef276908ff395864a9b
Signed-off-by: Mohit Ingale <mohiti@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3319273
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Bhushan Rayrikar <brayrikar@nvidia.com>
Reviewed-by: Vincent Chung <vincentc@nvidia.com>
Reviewed-by: Semi Malinen <smalinen@nvidia.com>
Reviewed-by: Jukka Kaartinen <jkaartinen@nvidia.com>
Reviewed-by: Frank Chen <frankc@nvidia.com>
2025-07-24 10:19:17 +00:00
Jon Hunter
2ff6b64efd media: camera: Fix declaration-after-statement
The camera driver fails to build if the compiler option
-Werror=declaration-after-statement is enabled and the following error
is seen ...

 drivers/media/platform/tegra/camera/tegracam_ctrls.c:1120:17: error:
 ISO C90 forbids mixed declarations and code
 [-Werror=declaration-after-statement]
  1120 |                 int index = tegracam_get_ctrl_index(cid);
       |                 ^~~

JIRA CAMERASW-32529

Fix this by moving the declaration of the 'index' and 'size' variables
to the start of the for-loop code block.

Change-Id: I69590c147e8effd031b962606a077856ad4f8d07
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3316537
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Frank Chen <frankc@nvidia.com>
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: Mike Jia <mijia@nvidia.com>
2025-07-24 10:19:16 +00:00
Zhiyuan Wang
8895bf14e8 linux: kmd: fix the bug TOP25 03/05 Part 9
Add dev-err when failure:
- drivers/media/platform/tegra/camera/vi/mc_common.c

Jira CAMERASW-32689

Change-Id: I87dc4593fe91889406a8d61843d260e953a2a1c2
Signed-off-by: Zhiyuan Wang <zhiwang@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3316291
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Semi Malinen <smalinen@nvidia.com>
Reviewed-by: Ajith Kumar <ajithk@nvidia.com>
Reviewed-by: Frank Chen <frankc@nvidia.com>
2025-07-24 10:19:16 +00:00
yongtaos
34a6c5ad76 kernel: nvidia-oot: Fix Linux KMD coverity defect
Fix NULL_RETURNS and EXP34-C coverity defects for cam_fsync.c.

Jira CAMERASW-32531

Change-Id: Id2503145229ff71802c41737722f6ad955ca3519
Signed-off-by: yongtaos <yongtaos@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3316287
Reviewed-by: Semi Malinen <smalinen@nvidia.com>
Reviewed-by: Sumeet Gupta <sumeetg@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: Zhiyuan Wang <zhiwang@nvidia.com>
2025-07-24 10:19:16 +00:00
Junsheng Chen
90b244eb03 linux: kmd: static analysis TOP25 S03/05 Part 4
Under the following path:
- drivers/media/platform/tegra/camera/camera_common.c
- drivers/media/platform/tegra/camera/fusa-capture/capture-isp.c
- drivers/media/platform/tegra/camera/fusa-capture/capture-vi.c
- drivers/media/platform/tegra/camera/sensor_common.c
- drivers/media/platform/tegra/camera/tegracam_core.c
- drivers/media/platform/tegra/camera/tegracam_utils.c
- drivers/media/platform/tegra/camera/vi/graph.c

Jira CAMERASW-32528

Change-Id: I8f3bb839dfe6e61928642f0ca32bcaf972d6c84a
Signed-off-by: Junsheng Chen <junshengc@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3314084
Reviewed-by: Shan Neng Chen <snchen@nvidia.com>
Reviewed-by: Sumeet Gupta <sumeetg@nvidia.com>
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: Ankur Pawar <ankurp@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Zhiyuan Wang <zhiwang@nvidia.com>
2025-07-24 10:19:16 +00:00
mijia
5ad213c183 kernel: nvidia-oot: Fix Linux KMD coverity defects
Fix INT32-C  INT32-Cand INT08-C coverity defects
for cdi_mgr.c and tegracam_ctrls.c.

JIRA CAMERASW-32529

Change-Id: I97f915f94264d78ae8e493874ccf889c9183fc93
Signed-off-by: mijia <mijia@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3314543
Reviewed-by: Sudhir Vyas <svyas@nvidia.com>
Reviewed-by: Ankur Pawar <ankurp@nvidia.com>
Tested-by: Patrick Young <payoung@nvidia.com>
Reviewed-by: Frank Chen <frankc@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Ryan Li <ryanli@nvidia.com>
2025-07-24 10:19:16 +00:00
Zhiyuan Wang
c4fb69048c linux: kmd: static analysis TOP25 03/05 Part 9
Under the following path:
- drivers/media/platform/tegra/camera/fusa-capture/capture-vi-channel.c
- drivers/media/platform/tegra/camera/vi/mc_common.c
- drivers/platform/tegra/rtcpu/capture-ivc.c
- drivers/platform/tegra/rtcpu/ivc-bus.c
- drivers/platform/tegra/rtcpu/reset-group.c

Jira CAMERASW-32533

Change-Id: I4b3d36c77ab09cd930c80fe07846fd9e0e9c28df
Signed-off-by: Zhiyuan Wang <zhiwang@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3314106
Reviewed-by: Frank Chen <frankc@nvidia.com>
Tested-by: Patrick Young <payoung@nvidia.com>
Reviewed-by: Ajith Kumar <ajithk@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Semi Malinen <smalinen@nvidia.com>
2025-07-24 10:19:16 +00:00
yongtaos
7512e6b575 kernel: nvidia-oot: Fix Top-25 coverity defects
Fix NULL_RETURNS and EXP34-C coverity defects for cam_fsync.c.

Jira CAMERASW-32531

Change-Id: I59090d6136c83fe0fa35386d13cd2284eb516c41
Signed-off-by: yongtaos <yongtaos@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3313977
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Vincent Chung <vincentc@nvidia.com>
Reviewed-by: Sumeet Gupta <sumeetg@nvidia.com>
Reviewed-by: Semi Malinen <smalinen@nvidia.com>
Reviewed-by: Zhiyuan Wang <zhiwang@nvidia.com>
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: Ankur Pawar <ankurp@nvidia.com>
2025-07-24 10:19:16 +00:00
Akihiro Mizusawa
cb4fd77199 host: isp: Deprecate nvhost syncpt APIs
Replace Nvhost syncpt APIs with host1x equivalents in the ISP
host1x driver and the ISP channel driver.
Note the WAR to include host1x-next.h before nvhost.h. The nvhost.h
header will be deprecated in the future.

Bug 4922416

Change-Id: I2dd298d60e1a55fe7a0cbb3ae804f5aa3b5d3610
Signed-off-by: Akihiro Mizusawa <amizusawa@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3300668
Reviewed-by: Chinniah Poosapadi <cpoosapadi@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: Frank Chen <frankc@nvidia.com>
Reviewed-by: svcacv <svcacv@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: FNU Raunak <fraunak@nvidia.com>
2025-07-24 10:19:16 +00:00
Akihiro Mizusawa
7cbca491db host: vi: Deprecate nvhost syncpt APIs
Replace Nvhost syncpt APIs with host1x equivalents in the VI
host1x driver and the VI channel driver.
Note the WAR to include host1x-next.h before nvhost.h. The nvhost.h
header will be deprecated in the future.

Bug 4922416

Change-Id: I5dccf8bef069f894802dce777939cb8262a3cf14
Signed-off-by: Akihiro Mizusawa <amizusawa@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3296280
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Chinniah Poosapadi <cpoosapadi@nvidia.com>
Reviewed-by: Frank Chen <frankc@nvidia.com>
Reviewed-by: FNU Raunak <fraunak@nvidia.com>
2025-07-24 10:19:15 +00:00
Mohit Ingale
794163ce8e media: tegra: Conditionally disable L4T-specific drivers in embedded Linux builds
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>
2025-07-24 10:19:15 +00:00
Ankur Pawar
4299b8bfe0 camera: fusa: Fix concurrency issue
Fix concurrent access issue in destroy_buffer_table().
The function is freeing buffers while only holding the
write lock during hash deletion. Other threads could
still be accessing the buffers.

Create a temporary list within the lock and then unmap
the addresses safely.

Bug 5017044

Change-Id: Ib262570aaa19f65c4cb3959123a85c5f66e5db68
Signed-off-by: Ankur Pawar <ankurp@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3306890
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-by: Zuyi Hu <zuyih@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Praveen AC <pac@nvidia.com>
2025-07-24 10:19:15 +00:00
Yuyuan Chen
d27873d84e kernel: nvidia-oot: Fix Static issues S2/5
Jira CAMERASW-31832

Change-Id: I67167abc5939569ab644a22cdf3ce494ee43f391
Signed-off-by: Yuyuan Chen <yuyuanc@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3305725
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Vincent Chung <vincentc@nvidia.com>
Reviewed-by: Sumeet Gupta <sumeetg@nvidia.com>
Reviewed-by: Semi Malinen <smalinen@nvidia.com>
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: Ryan Li <ryanli@nvidia.com>
2025-07-24 10:19:15 +00:00
Yuyuan Chen
3b31f76f27 kernel: nvidia-oot: Fix Static issues S2/5
Jira CAMERASW-31832

Change-Id: I4060480865bf3895fae22127bb3e0c915af8af9f
Signed-off-by: Yuyuan Chen <yuyuanc@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3297678
Reviewed-by: Sumeet Gupta <sumeetg@nvidia.com>
Tested-by: Patrick Young <payoung@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Ryan Li <ryanli@nvidia.com>
Reviewed-by: Semi Malinen <smalinen@nvidia.com>
Reviewed-by: Vincent Chung <vincentc@nvidia.com>
2025-07-24 10:19:15 +00:00