Commit Graph

12 Commits

Author SHA1 Message Date
yizhou
737925e58e kmd: re-enable the panic_callback
- introduced a panic_flag in the tegra_rtcpu_trace.
- set panic_flag to 1 when kmd receives panic hsp
  message from RCE.
- the trace buffer readout thread calls rtcpu_trace_snapshot
  to dump out the snapshot section when panic_flag is set to 1.

Bug 5293085

Change-Id: Ief5d9431bfc944fc588f38a69f7758f829cf2e6e
Signed-off-by: yizhou <yizhou@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3368252
Reviewed-by: Evgeny Kornev <ekornev@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Chinniah Poosapadi <cpoosapadi@nvidia.com>
Reviewed-by: Mohit Ingale <mohiti@nvidia.com>
Reviewed-by: Kalle Jokiniemi <kjokiniemi@nvidia.com>
2025-07-24 10:20:35 +00:00
yizhou
4736728ec1 camera: dump out RCE snapshot on CAMRTC_HSP_PANIC
- implemented a panic callback function which dumps out
  the snapshot section of the RCE trace buffer.
- registered the panic callback function with hsp handle
  during handle init time.
- when receiving the CAMRTC_HSP_PANIC from RCE, trigger
  the panic callback function to dump out the RCE snapshot.

Jira CAMERASW-32243

Change-Id: I523a0b51637a6cf1091d578195c75090b52ffcd7
Signed-off-by: yizhou <yizhou@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3341536
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: Shiva Dubey <sdubey@nvidia.com>
Reviewed-by: Vincent Chung <vincentc@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
2025-07-24 10:19:19 +00:00
Mohit Ingale
02a104cbb2 rtcpu: Add Doxygen documentation to RTCPU subsystem
Add detailed Doxygen documentation across all files in the RTCPU subsystem.
This documentation effort follows SWUD Doxygen guidelines and provides
complete API documentation for the entire RTCPU codebase.

Use Cursor Agent to generate SWUD doxygen headers

Jira CAMERASW-31120

Change-Id: I3095ff2e321402e72f0f8f5762bad798ea0ecf19
Signed-off-by: Mohit Ingale <mohiti@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3332472
Reviewed-by: Semi Malinen <smalinen@nvidia.com>
Reviewed-by: Vincent Chung <vincentc@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Frank Chen <frankc@nvidia.com>
2025-07-24 10:19:17 +00:00
Petri Niemela
58478b0ab6 rtcpu: Halt RTCPU using HSP_BYE before reset
Calling tegra_camrtc_reboot() can cause a memory fabric timeout error by
asserting reset when the RTCPU is in the middle of a memory transaction.
As a solution (similar to tegra_camrtc_halt), before asserting the
hardware reset, signaling the RTCPU to suspend its operations using
CAMRTC_HSP_BYE and waiting for RTCPU to enter WFI.

Bug 5051748

Change-Id: Iba8e4e837ee0983ffe9629e7627e0056ce1c2341
Signed-off-by: Petri Niemela <pniemela@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3317142
Reviewed-by: Semi Malinen <smalinen@nvidia.com>
Tested-by: Semi Malinen <smalinen@nvidia.com>
Reviewed-by: svcacv <svcacv@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Sudhir Vyas <svyas@nvidia.com>
2025-07-24 10:19:16 +00:00
Aki Niemi
83df8b7e03 camera/rtcpu: Fix concurrency on reboot
Make sure that if a reboot is in progress, we don't attempt
to reboot the RTCPU again.

Bug 4623451

Change-Id: I8d153edb7ded48100f772e2fdd8afc7621b346bf
Signed-off-by: Aki Niemi <aniemi@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3205581
(cherry picked from commit 4ac65dc2c205c840b3e70e067831de57d43952e3)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3281752
Reviewed-by: Semi Malinen <smalinen@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: Frank Chen <frankc@nvidia.com>
2025-07-24 10:19:16 +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
fraunak
47917521d4 kernel-oot: update pm register offsets
Added t264 specific pdata struct to
use r5_ctrl and pwr_status registers
values.

Jira CAMERASW-11038

Change-Id: I4ae6b3ffee48eff61a6b7a7309c251c38d68bf30
Signed-off-by: fraunak <fraunak@nvidia.com>
2025-07-24 10:19:09 +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
Robert Kelly
98be04181c rtcpu: set op point via sysfs
Create and register set and get operating point sysfs functions.

The operating point notification will contain the requested
operating point.

The nvcap resource manager will extract the operating point
from the notfication and send it to rce via the hsp command
interface.

In turn, rce will apply the operating point by adjusting the
functional clock frequencies for the following camera ip:

- rce hardware
- vi hardware
- isp hardware
- nvcsi

Jira CAMERASW-26378

Signed-off-by: Robert Kelly <rkelly@nvidia.com>
Change-Id: Ia814b2716d3738efb3cbc37307a267140b555f42
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3179593
(cherry picked from commit d259727a57ecf4b9463030b3418715891b3b1209)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3189078
Reviewed-by: Semi Malinen <smalinen@nvidia.com>
Reviewed-by: Frank Chen <frankc@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
2024-08-17 10:38:56 -07: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
Ankur Pawar
6038bd9e6c platform: tegra: rtcpu: use upstream icc API
Use devm_of_icc_get() in rtcpu base and debug driver.
CONFIG_TEGRA_T23X_GRHOST, CONFIG_TEGRA_ISOMGR,
CONFIG_TEGRA_BWMGR are not enabled in K5.15 so cleanup
tegra_camera_platform driver.

Don't read memory-bw from rtcpu dt, set it to max
during probe.

Bug 3997304
Bug 4311411

Change-Id: Ib76b3338749de5d33e13cd518375a6b55dd17f5b
Signed-off-by: Ankur Pawar <ankurp@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2899021
Reviewed-by: Jonathan Hunter <jonathanh@nvidia.com>
Reviewed-by: Johnny Liu <johnliu@nvidia.com>
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-10-13 07:55:59 -07:00
Jon Hunter
19de9797ba platform: tegra: rtcpu: Consolidate Makefiles
Consolidate the RTCPU drivers under a single sub-directory so that a
single Makefile is used to build all these drivers. This also simplifies
the paths for finding the necessary header files.

Bug 4078936

Change-Id: I88e45a2954f759ee0bc8a359bfdf3ef09a55617a
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2897318
(cherry picked from commit 320cf14261d1cf8bcf76cbb030186e7391ca8670)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2898616
Reviewed-by: Ankur Pawar <ankurp@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-05-31 11:29:05 -07:00