Change licensing of include/soc/tegra/camrtc-diag-messages.h and
include/soc/tegra/camrtc-diag.h from NVIDIA Proprietary to GPL-2.0-only,
as these files are used by GPL code. The license incompatibility is
resolved by ensuring all files maintain consistent licensing terms.
Bug 5278776
Change-Id: Ia42d64339458eb6f3320aea142f0360350614b8b
Signed-off-by: Mohit Ingale <mohiti@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3365826
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Frank Chen <frankc@nvidia.com>
Reviewed-by: Semi Malinen <smalinen@nvidia.com>
Reviewed-by: Ganesh Ram Savithri Sreenivas Murthy <ganeshrams@nvidia.com>
cleanup & modularize driver code structure to separate
out HW dependent & independent parts to facilitate adding
support for new SoCs
This patch
- restructure SoC specific code into separate files
- Add function pointers to call HW specific sequences
- adds a common header which is needed by all platforms
- cleans up obsolete code such as memmap of phc regs,
xavier support, etc
- Removes default value assumption for lock_threshold,
pps_freq, sync_trig_interval
Bug 5175333
Change-Id: I106e130fdaa1a166a4a2c9bbaeb3b924af90ab66
Signed-off-by: Sheetal Tigadoli <stigadoli@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3321185
Reviewed-by: Kiran Kumar Bobbu <kbobbu@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Sumeet Gupta <sumeetg@nvidia.com>
Previously, this option was disabled because the clang version
used was too old (clang-r370808, clang 10). This option has been
supported since clang-r416183b, clang 12. In order to avoid potential
build errors, this option is re-enabled.
Bug 5289423
Change-Id: I1d0fd5a3dfdff06e95eeca13f85a263922c6ecaf
Signed-off-by: Jian-Min Liu <jianminl@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3371014
Reviewed-by: Ankita Garg <ankitag@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Fix riace condition between host1x_syncpt_alloc()
and host1x_syncpt_put() by using kref_put_mutex()
instead of kref_put() + manual mutex locking.
This ensures no thread can acquire the
syncpt_mutex after the refcount drops to zero
but before syncpt_release acquires it.
This prevents races where syncpoints could
be allocated while still being cleaned up
from a previous release.
Remove explicit mutex locking in syncpt_release
as kref_put_mutex() handles this atomically.
Bug 5170956
Change-Id: I9e2348482d5c9646556576772f6b90fa7df3acd2
Signed-off-by: Mainak Sen <msen@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3369121
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: Mikko Perttunen <mperttunen@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Enhance IOCTL handler to identify and
handle dma_fence_chain objects that might contain
host1x dma fences. This fixes issues
when userspace passes a dma_fence_chain
(created by DRM_IOCTL_SYNCOBJ_TIMELINE_WAIT
operations) to HOST1X_IOCTL_FENCE_EXTRACT.
The updated code iteratively unwraps fence
chains until it finds a host1x_syncpt_fence or
reaches a fence it can't process. This ensures
proper operation with DRM-based applications
that use timeline syncobj features which internally
use dma_fence_chain.
Bug 4983872
Change-Id: I3eef9d54e2c42180cb5c74236cd64f42a863b7ea
Signed-off-by: Mainak Sen <msen@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3364940
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: Leslin Varghese <lvarghese@nvidia.com>
Tested-by: Arunmozhikannan Soundarapandian <asoundarapan@nvidia.com>
Reviewed-by: Sourab Gupta <sourabg@nvidia.com>
Port the tegra_hv_comm driver to the OOT kernel. This driver allows an
IVC channel to be used as an emulated serial device.
Make the following changes to simplify maintaining compatibility with
different kernel versions:
- Use a generic port type instead of defining a custom one.
- Use existing conftest to determine whether platform_device.remove
returns void.
- Add a conftest to determine whether uart_state.xmit exists.
- Use tty_port.xmit_fifo in kernels where uart_state.xmit has been
removed.
Jira HYP-20929
Change-Id: I1bc218f591d6d741fc39ae5392a9ea95bdc3f117
Signed-off-by: Daniel Kudrow <dkudrow@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3340420
(cherry picked from commit a67e7fd330be5d6c55e35c0ce810ff5124378ae7 in embedded/7.0.3.0)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3301386
Reviewed-by: Bitan Biswas <bbiswas@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
When EP boot up first and RP in power OFF state, default PERST# input is
high due to onboard pull up. When RP is powered ON, it causes a glitch
from high to low due to default pinctl settings, it is perceived as
PERST# assert by Endpoint. In tegra264_pcie_ep_rst_assert() PRNST#
signal is released (set high), this will cause PCIe link up failure.
This WAR is initially added for RP reboot case, to handle a scenario
where EP function driver still executing core_deinit as part of PERST#
assert and mean while RP boot up and ready for link up again. However
on Thor it is measured that core_deinit is taking only ~1.4 msec which
completes before RP boots. So, it is safe to remove PRNST# release WAR
in tegra264_pcie_ep_rst_assert(), this fixes link up failure when RP
boot after EP.
Bug 4981895
Change-Id: Ie24652a267bf3e3bc740d9c40e5b6d6671429b00
Signed-off-by: Srishti Goel <srgoel@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3345684
(cherry picked from commit 8944b4a4d767a144b7204865d26b4e989ee003b6)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3338072
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: Bitan Biswas <bbiswas@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
* 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>
Add support to select initial operating mode (GPIO or TIMER)
through DT property "nvpps-event-mode-init".
This allows users to specify which mode the driver should
start in rather than always defaulting to GPIO mode if gpios
property is specified in DT.
Key changes:
- Add DT property parsing for initial event mode
- Add validation to ensure selected mode is supported
- If this property is not specified, default mode selection
happens based on if nvpps-gpios property is defined or not
- Add informative debug messages about selected mode
- Add error handling for invalid configurations(eg: init
mode is GPIO but gpios property is not defined). If
validation fails, probe returns error instead of
defaulting to TIMER mode.
bug 5253938
Change-Id: I64c2a6565eeb46d6b07cf266cd4189fba9f0fba3
Signed-off-by: Sheetal Tigadoli <stigadoli@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3352704
(cherry picked from commit 091bb3ff50972e8dc3d7b941d850b4c1457b2a9e)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3361726
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Sumeet Gupta <sumeetg@nvidia.com>
Add documentation for the new 'nvpps-event-mode-init'
property in the NVIDIA nvpps driver devicetree bindings.
This optional property allows users to specify whether the
driver should start in GPIO mode (1) or TIMER mode (2).
If not specified then default mode is chosen based on
if the nvpps-gpios property is defined or not.
bug 5253938
Change-Id: I624e50458383a5a61efdb4d5dd790b4a1dc7bb7e
Signed-off-by: Sheetal Tigadoli <stigadoli@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3352703
(cherry picked from commit 3e3c946b6b0122b5cb9afe4f3150301c7f64b3a0)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3361725
Reviewed-by: Sumeet Gupta <sumeetg@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
default DriveOS inter-process endpoint count is about 1300 for now.
DriveAV requirement needs 8192 inter-process channels
(=16384 endpoints) except for DriveOS system usage.
Hence increased the number of inter-process endpoints by 2048
more in considering margin.
Bug 5224327
Change-Id: I47f5a67f9ece917ed5fe873be2e188f128d63961
Signed-off-by: Joshua Cha <joshuac@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3361956
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Simon Je <sje@nvidia.com>
Enabled RST# IRQ during EP_START after tegra264_pcie_ep_rst_deassert is
invoked for EP and disable RST# IRQ during EP_STOP after
tegra264_pcie_ep_rst_assert is executed for EP and EP is not available
anymore. This prevents unwanted EP accesses during RP reset sequence
causing PERST# to toggle, while EP is not ready or available.
Bug 5281037
Change-Id: I43e1fd6c6ccfaae64a6bb2375a3685f186766d78
Signed-off-by: Prakhar Srivastava <prasrivastav@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3363313
Reviewed-by: svcacv <svcacv@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Nagarjuna Kristam <nkristam@nvidia.com>
Reviewed-by: Bitan Biswas <bbiswas@nvidia.com>
Add support for configurable timestamp capture interval
through device tree property 'ts-capture-interval'.
This allows users to tune how frequently timestamps are
to be captured in TIMER mode.
- Add support for device tree property 'ts-capture-interval' (in ms)
- Defaults to 1000ms if property not specified
- Validate interval is within allowed range (100ms - 1000ms)
- Update timer configuration to use configurable capture interval
Bug 5242056
Change-Id: I4a327558576a86650890be4ae7e1ccfa5abe3c1d
Signed-off-by: Sheetal Tigadoli <stigadoli@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3348872
(cherry picked from commit 1317865f5dc042348e1e39b2aa54a7bb6aa1ffdb)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3361722
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Sumeet Gupta <sumeetg@nvidia.com>
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>