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
Bob Zhang
3aa403fa33
kernel: nvidia-oot: Fix Linux KMD coverity defects
...
Fix INT30-C and INT08-C coverity defects for
capture-vi.c and tegracam_ctrls.c.
Fix MISSING_LOCK coverity defects for channel.c.
JIRA CAMERASW-30788
Change-Id: I6ad218cb9184f09d04d862a4c8f3f6db35db65cf
Signed-off-by: Bob Zhang <bozhang@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3275901
Reviewed-by: svcacv <svcacv@nvidia.com >
Reviewed-by: Xiaoming Xiang <xxiang@nvidia.com >
Reviewed-by: Anubhav Rai <arai@nvidia.com >
Reviewed-by: Sumeet Gupta <sumeetg@nvidia.com >
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com >
Reviewed-by: Ankur Pawar <ankurp@nvidia.com >
2025-07-24 10:19:13 +00:00
Yuyuan Chen
ff7cf02ef2
kernel: nvidia-oot: Fix Static issues S12/11
...
Jira CAMERASW-30258
Change-Id: I5fd26611f6bac71ec186458a583622b55ba8735e
Signed-off-by: Yuyuan Chen <yuyuanc@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3262275
Reviewed-by: Ankur Pawar <ankurp@nvidia.com >
Reviewed-by: Sumeet Gupta <sumeetg@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:13 +00:00
Junsheng Chen
cd6a1c3a7d
linux: kmd: static analysis S12/11 part 4
...
Under the following path:
- drivers/media/platform/tegra/camera/fusa-capture/capture-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/tegracam_utils.c
- drivers/media/platform/tegra/camera/vi/core.c
Jira CAMERASW-30251
Change-Id: Iec7c29a184a060b8e7f44f3614bcbc9f8182aea6
Signed-off-by: Junsheng Chen <junshengc@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3270228
Reviewed-by: svcacv <svcacv@nvidia.com >
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com >
Reviewed-by: Sumeet Gupta <sumeetg@nvidia.com >
Reviewed-by: Zhiyuan Wang <zhiwang@nvidia.com >
Reviewed-by: Ankur Pawar <ankurp@nvidia.com >
2025-07-24 10:19:13 +00:00
kevixie
5ce08ee3ce
nvidia-oot: cameraSW: add data validation to dt reads
...
+ Add the following data validation checks based on
gaps identified when inspecting code for
SHR-9320:
+ FSYNC: Add check to ensure existence of generators
property before parse
+ FSYNC: Add check to ensure generators in default
group adhere to LCM rule
+ CDI: Add check to ensure reg_len / dat_len do
not exceed 2 bytes
+ CDI: Ensure err is set before jumping to err_probe
+ CDI: Jump to err_probe if IOExpander i2c-bus read
fails
+ CDI-TCA: Return error if reg_len or dat_len
out of expected range
+ FuSaCap: Ensure isp/vi-max-channels validated
+ VI: Add check for vi-mapping index found (this was
already caught in existing code, but error message
was non-specific)
+ camera_common: Add check for err that was set but
never read
+ RTCPU: Add debug prints for properties not found
Jira CAMERASW-30537
Change-Id: I9953029f594c0153d6c335913944fb8906adedd9
Signed-off-by: kevixie <kevixie@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3280557
Reviewed-by: Vincent Chung <vincentc@nvidia.com >
Reviewed-by: Frank Chen <frankc@nvidia.com >
Reviewed-by: Mohit Ingale <mohiti@nvidia.com >
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com >
2025-07-24 10:19:13 +00:00
Yuyuan Chen
188b622e75
kernel: nvidia-oot: Fix Static issues S11/27
...
Fix TAINTED_SCALAR and Directive 4.14
Jira CAMERASW-29899
Change-Id: I1712d392b8271be0db912d536027d960f343e3fe
Signed-off-by: Yuyuan Chen <yuyuanc@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3273387
Reviewed-by: Sumeet Gupta <sumeetg@nvidia.com >
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com >
Reviewed-by: Frank Chen <frankc@nvidia.com >
Reviewed-by: Ankur Pawar <ankurp@nvidia.com >
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com >
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com >
Reviewed-by: Ryan Li <ryanli@nvidia.com >
2025-07-24 10:19:13 +00:00
Rakibul Hassan
d4f85d7379
nvidia-oot: camera: vi: track syncpt threshold
...
This change does the following:
- Keep the capture progress syncpt threshold up to date by
incrementing it when a capture request is made
- Fast forward the syncpoints via host1x api on reset
Bug 4882047
Change-Id: Ic2a677575d9ade45ae6b69de5fd49d40029f7053
Signed-off-by: Rakibul Hassan <rakibulh@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3248336
(cherry picked from commit 6343864b8b7f70f1bc87f8503f28b07a3bb024bc)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3240448
Reviewed-by: Justin Kim (SW-TEGRA) <juskim@nvidia.com >
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com >
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com >
Reviewed-by: Shiva Dubey <sdubey@nvidia.com >
Tested-by: Justin Kim (SW-TEGRA) <juskim@nvidia.com >
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com >
2025-07-24 10:19:11 +00:00
Jon Hunter
ff48ee63b1
drivers: Fix MODULE_IMPORT_NS for Linux v6.13
...
In Linux v6.13, commit cdd30ebb1b9f ("module: Convert symbol namespace
to string literal") updated the MODULE_IMPORT_NS macro to take a string
literal as an argument in Linux v6.13. Use conftest to detect if
MODULE_IMPORT_NS takes a string literal as an argument and update the
various drivers accordingly.
Bug 4991705
Change-Id: I8f34860648965dc2334e2916d5404522510778ff
Signed-off-by: Jon Hunter <jonathanh@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3263798
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com >
Reviewed-by: Brad Griffis <bgriffis@nvidia.com >
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com >
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com >
2025-07-24 10:19:11 +00:00
snchen
28668cde01
vi5: camera: add ovrride capture timeout control
...
add CID to override the capture timeout.
bug 4737219
Change-Id: I6df8e760ce8051054ba34a8b85b00bb237f9cd98
Signed-off-by: snchen <snchen@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3173821
(cherry picked from commit 20374db85d )
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3196700
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com >
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com >
2025-07-24 10:19:10 +00:00
Jon Hunter
f01227d4ea
drivers: Drop inline from driver remove wrapper
...
The driver remove function is a function pointer and therefore, it does
not make sense to define the function as an 'inline'. Update the
coccinelle script and drivers to remove the inline statement.
Bug 4749580
Change-Id: Ia03691b75c4edffe609f27468b911a92a5ddbd68
Signed-off-by: Jon Hunter <jonathanh@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3233980
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com >
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com >
2025-07-24 10:19:08 +00:00
Aki Niemi
4c71b3d40d
camera/capture: Fix NULL checks on channel release
...
Make cure the channel is non-NULL when releasing and unpinning
the VI channel and capture descriptor buffers, respectively.
Bug 4623451
Change-Id: Ieb7f48b2d69a08fb00f7dd8f57fba376d66f9dcd
Signed-off-by: Aki Niemi <aniemi@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3192587
(cherry picked from commit 99b3c9be9c85b2fb2f06aa1551d893fe11134afe)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3219712
Reviewed-by: Mohit Ingale <mohiti@nvidia.com >
Reviewed-by: Vincent Chung <vincentc@nvidia.com >
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com >
Tested-by: Mohit Ingale <mohiti@nvidia.com >
Reviewed-by: Frank Chen <frankc@nvidia.com >
Reviewed-by: Ganesh Ram Savithri Sreenivas Murthy <ganeshrams@nvidia.com >
2025-07-24 10:19:07 +00:00
Jon Hunter
951b2423a8
drivers: Fix platform_driver remove for Linux v6.11
...
In Linux v6.11, the 'platform_driver' structure 'remove' callback was
updated to return void instead of 'int'. Update all the impacted drivers
as necessary to fix this.
Bug 4749580
Change-Id: I3bb5c549777f7ccad0e3f870373fdd25726ad7ed
Signed-off-by: Jon Hunter <jonathanh@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3182878
Reviewed-by: Brad Griffis <bgriffis@nvidia.com >
Tested-by: Brad Griffis <bgriffis@nvidia.com >
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com >
2024-08-11 17:20:34 -07:00
Jon Hunter
cb8b9f5a53
drivers: Fix missing vmalloc.h for Linux v6.10
...
Upstream commit 690da22dbfa8 ("asm-generic/io.h: kill vmalloc.h
dependency") removed the vmalloc.h header file from io.h and this breaks
building various drivers with the latest -next kernels. Fix this
by ensuring vmalloc.h is included and in most cases slab is not actually
needed and so remove this where possible. Note that it is fine to make
this change for all current supported kernels.
Bug 4593750
Change-Id: I003d1302bda226d356467e6ede99949b2716940a
Signed-off-by: Jon Hunter <jonathanh@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3141984
Reviewed-by: Brad Griffis <bgriffis@nvidia.com >
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com >
2024-05-22 09:19:24 -07:00
Ankur Pawar
1c517ab4d5
camera: fix the kernel freeze after driver unbind
...
Kernel freeze is occurring due to incorrect cleanup
in vi5.c.
Fix for kernel freeze:
1 Don't call vi_channel_drv_unregister() and
tegra_vi_media_controller_cleanup() in vi5_remove.
2 capture_vi_probe() is calling vi_channel_drv_register() and
tegra_capture_vi_media_controller_init(), so capture_vi_remove()
should call vi_channel_drv_unregister() and
tegra_vi_media_controller_cleanup()
3 Use correct dev pointer in vi_channel_drv_unregister().
Code cleanup:
1 Remove use_legacy_path variable that was used for T186.
2 Removed unused t194_vi5_file_private struct.
Bug 4415340
Change-Id: I7a75d90e1d2a1fb78a6a5b083a66836b1723156c
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3077660
cherry-picked from <29e88ed17e757c0129a54a3fb44990cec4a33983>
Signed-off-by: Ankur Pawar<ankurp@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2936745
Reviewed-by: Anubhav Rai <arai@nvidia.com >
Reviewed-by: Shubham Chandra <shubhamc@nvidia.com >
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com >
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com >
2024-02-27 20:30:14 -08:00
Matti Ryttylainen
f19d5372b4
camera: Switch VI/ISP events to ftrace
...
* Switch VI frame_begin and frame_end events to produce ftrace traces
instead of eventlib events.
* Switch ISP task_begin and task_end events to produce ftrace traces
instead of eventlib events.
* Add class IDs for VI/ISP
* Switch VI/ISP task_submit events to ftrace
Bug 4080214
Signed-off-by: Matti Ryttylainen <mryttylainen@nvidia.com >
Change-Id: I7776005bb89eaed168c65c62d8aa19c553559fdb
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2911804
Reviewed-by: Semi Malinen <smalinen@nvidia.com >
Reviewed-by: Jukka Kaartinen <jkaartinen@nvidia.com >
Reviewed-by: Oleg Sikorskiy <osikorskiy@nvidia.com >
Reviewed-by: Ajith Kumar <ajithk@nvidia.com >
Reviewed-by: Sudhir Vyas <svyas@nvidia.com >
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com >
2023-06-19 12:28:58 -07:00
Frank Chen
92ac7bc35a
media: camera: Build tegra-camera as OOT module
...
Port camera drivers below from /kenrel/nvidia to
/kernel/nvidia-oot as OOT modules:
- Fusa-capture driver
- Tegra V4L2 framework driver
- vi/csi driver
- tegra camera platform driver
Change-Id: I390af27096425bb11e0934201dd1a90f001bb3fa
Signed-off-by: Frank Chen <frankc@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2780698
Reviewed-by: FNU Raunak <fraunak@nvidia.com >
Reviewed-by: Ankur Pawar <ankurp@nvidia.com >
Reviewed-by: Shiva Dubey <sdubey@nvidia.com >
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com >
2022-12-13 06:15:42 -08:00