After programming the TX Register, it takes 3-4 clock cycles for TX
data synchronization to the CEC core domain. The TX_EMPTY interrupt
should not be cleared until this data synchronization is complete.
Enable CEC HW feature to automatically clears the TX_EMPTY interrupt
after TX data synchronization is complete. It takes time for HW to
clear the interrupt and TX_EMPTY can still appear high, hence SW
needs to poll WR_LOCK until it goes to 0. This will avoid SW to
attempt the next TX block during the same TX_EMPTY interrupt.
Also read RX_REGISTER based on the buffer occupancy which is
indicated by the CEC_RX_BUFFER_STAT_0 register.
Bug 4954851
Change-Id: I3ec3792c9ae3b8a00c800c921cf4e4d09369e6b9
Signed-off-by: Ken Chang <kenc@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3322519
Reviewed-by: Bitan Biswas <bbiswas@nvidia.com>
Reviewed-by: Prafull Suryawanshi <prafulls@nvidia.com>
Tested-by: Ruopeng Huang (SW-TEGRA) <robhuang@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Fix a CERT-C Expression violation (CERT EXP39-C)
by properly casting the mapped pointer to
u32* when passing it to show_gather() function.
This ensures type compatibility between the
function parameter and the actual object
being accessed.
Fixes CID 12627322
Jira HOSTX-5971
Change-Id: I8a7224b46f4e36582a06d6d6ee1ba21da18fe43c
Signed-off-by: Mainak Sen <msen@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3324442
Reviewed-by: Vamsee Vardhan Thummala <vthummala@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Raghavendra Vishnu Kumar <rvk@nvidia.com>
Fix NULL pointer dereference when num_unpins is 0,
which causes job->addr_phys to be NULL. In this
case, the code was incorrectly trying to set
job->gather_addr_phys to &job->addr_phys[num_relocs],
which would dereference a NULL pointer.
Add proper NULL checks to prevent this issue
both during allocation and when
using job->gather_addr_phys throughout the code.
Fixes CID 12627383:
- CERT-C Expression (CERT EXP34-C)
Fixes CID 12627953:
- Explicit null dereferenced (FORWARD_NULL)
Jira HOSTX-5971
Change-Id: If417ec5b5431a4f4b716ca73ddf279c9b0336c94
Signed-off-by: Mainak Sen <msen@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3324441
Reviewed-by: Raghavendra Vishnu Kumar <rvk@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: Vamsee Vardhan Thummala <vthummala@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Implement host1x_syncpt_get_shim_info function for
host1x-emu driver and add it to the dynamic dispatch
mechanism in host1x-fence.
This function provides clients with the physical address
of syncpoint aperture, stride and number of
syncpoints, which is needed by various client drivers
like ISP, VI, PVA, GPU etc
Jira HOSTX-5971
Change-Id: I50e60222a035228c981dfa993cb0088e1d15dad2
Signed-off-by: Mainak Sen <msen@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3323327
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Raghavendra Vishnu Kumar <rvk@nvidia.com>
Reviewed-by: Amitabh Dutta <amitabhd@nvidia.com>
In Linux v5.11, commit f026c123001b ("ASoC: topology: use inclusive
language for bclk and fsync") added definitions SND_SOC_DAIFMT_CBP_CFP
and SND_SOC_DAIFMT_CBC_CFC, to replace the legacy definitions
SND_SOC_DAIFMT_CBM_CFM and SND_SOC_DAIFMT_CBS_CFS, respectively. For
Linux v6.15, the legacy definitions have now been removed. Update the
Tegra ASoC machine driver to use the inclusive definitions. Note that
given that we don't support v5.x kernels any more we don't need to worry
about compatibility with older kernels.
JIRA LINQPJ14-47
Change-Id: I4dd38d6c5c9e4d37f4b28aed516c962bf87f2fbd
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3328424
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Sameer Pujar <spujar@nvidia.com>
- Added support for booting from GSC on L4T and updated the VPU allowlist.
- Enabled debug logs by default for debug builds and added a DebugFS node for VPU.
- Addressed data corruption issues in QNX devctls and fixed various KMD data handling bugs.
- Updated DMA configurations and handling.
- Implemented nsight trace logging support and updated VPU stats and NVLOG implementations.
- Other minor bug fixes and documentation updates.
Gitlab commit dc34d709b865 ("intf: Enable following intf tests")
Change-Id: Ide42e0390af9eece5e9ed88ac3eba57b9272d6a1
Signed-off-by: nanwa <nanwa@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3323529
Reviewed-by: Mohnish Jain <mohnishj@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Remove power management functionality from virtual engine driver
as it's no longer needed. This includes suspend/resume operations
and PM ops structure. The driver now relies on system's default
power management behavior.
Jira HOSTX-5933
Change-Id: I092bfa8e2a01345e149ff2c04ed526a0aa7a0944
Signed-off-by: Vamsee Vardhan Thummala <vthummala@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3322473
Reviewed-by: Mikko Perttunen <mperttunen@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Add support to the bootstrap command over the admin channel,
which will be called when a client registers. This command will
perform steps that must be performed only after the client is ready.
TODO: This bootstrap-2 command will be replaced by the existing
bootstrap command which we call during DCE-FW bootstrapping once
we split admin bootstrapping and RM bootstrapping in the DCE-KMD.
Jira TDS-17135
Change-Id: I55330b9ce73e1acf20e2a80d392d7984c91ed65f
Signed-off-by: Mahesh Kumar <mahkumar@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3274949
Reviewed-by: Vinod Gopalakrishnakurup <vinodg@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: svcacv <svcacv@nvidia.com>
Remove dependencies on the following deprecated
nvhost API functions by implementing their functionality
directly in the NVDLA driver:
1. nvhost_module_init:
Replaced with direct implementation in nvdla_module_init:
- Get clock resources and set clock rates
- Initialize reset control
- Set up power management runtime
- Create debugfs entries
2. nvhost_module_deinit:
Replaced with direct implementation in nvdla_module_deinit:
- Disable power management runtime
- Free falcon firmware if present
- Clean up debugfs entries
3. nvhost_module_reset:
Replaced with direct implementation in nvdla_module_reset:
- Handle prepare_poweroff callback
- Acquire and release reset control
- Load clock gating registers
- Handle finalize_poweron callback
4. nvhost_module_busy:
Replaced with direct implementation in nvdla_module_busy:
- Get PM runtime sync
- Handle PM runtime errors
5. nvhost_module_idle and nvhost_module_idle_mult:
Replaced with direct implementations:
- Mark last busy for PM runtime
- Handle autosuspend or regular PM runtime put
6. nvhost_module_pm_ops:
Replaced with custom nvdla_pm_ops structure:
- Implement nvdla_runtime_suspend and nvdla_runtime_resume
- Implement nvdla_suspend and nvdla_resume
- Configure SET_RUNTIME_PM_OPS and SET_SYSTEM_SLEEP_PM_OPS
7. nvhost_module_load_regs:
Replaced with nvdla_module_load_regs:
- Implement register manipulation with direct memory mapped I/O
- Use writel instead of host1x_writel
Bug 4921620
Jira HOSTX-5963
Change-Id: I3006a92a05966da138da31730e97f74f786c9d0c
Signed-off-by: Mainak Sen <msen@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3321246
Reviewed-by: Arvind M <am@nvidia.com>
Reviewed-by: Mitch Harwell <mharwell@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Replace deprecated nvhost client device functions with
their direct implementations to maintain compatibility
with newer host1x drivers:
1. Replace nvhost_client_device_get_resources with
direct implementation:
- Get host1x data from parent device
- Map device resources directly
2. Replace nvhost_client_device_init with
nvdla_client_device_init:
- Allocate character device region
- Create device node using nvdla_client_device_create
3. Replace nvhost_client_device_release with
nvdla_client_device_release:
- Clean up device node
- Unregister character device region
This change ensures the NVDLA driver continues to work
correctly with the host1x driver while removing
dependencies on deprecated functions.The device node
"nvhost-ctrl-dla" is still created with the same
functionality as before.
Bug 4921461
Jira HOSTX-5963
Change-Id: Ib27000fa47fdd72f80ca4030232d31e100c01ea4
Signed-off-by: Mainak Sen <msen@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3320695
Reviewed-by: svcacv <svcacv@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Arvind M <am@nvidia.com>
Reviewed-by: Mitch Harwell <mharwell@nvidia.com>
Replace the deprecated nvhost_syncpt_unit_interface_init()
function with host1x_syncpt_get_shim_info() in
the NVDLA driver. This change:
1. Adds a local def of struct nvhost_syncpt_interface
2. Implements the functionality in nvdla_sync_syncpt.c
3. Adds necessary include files for IOMMU and DMA mapping
This change ensures the NVDLA driver continues to work
correctly with the host1x driver while removing the
dependency on deprecated functions.
Bug 4921461
Jira HOSTX-5963
Change-Id: I085a24045758a2ecbb026654c3ee57a8dfda9271
Signed-off-by: Mainak Sen <msen@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3320585
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: Mitch Harwell <mharwell@nvidia.com>
Reviewed-by: Arvind M <am@nvidia.com>
This change adds SC7 wake support to cec driver.
CEC engine can detect TV packets in SC7 state and
can wake up when particular pattern detected.
In resume functionality, the total arrived packets on FIFO
needs to read and reported back to user-space.
This change adds -
1. Program CEC engine to activate for SC7 wake.
2. Program required opcode and physical address.
3. Register for wake and read packets in resume path.
4. Provide sysfs control to program physical address.
Verification of SC7 wake is done for below cases -
1. TV turn on and off is tested.
2. TV source input change is tested.
3. CEC Analyzer set-stream is tested.
Bug 4974679
Change-Id: Ia1ceeb13b89614c96d0b6d42f2bb58419865414b
Signed-off-by: Robert Huang <robhuang@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3300821
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Bitan Biswas <bbiswas@nvidia.com>
Reviewed-by: Prafull Suryawanshi <prafulls@nvidia.com>
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>
Previous implementation lacks of documentation and it's hard to
understand the effect of changing specific tunable parameter.
Revise the implementation so that the scaling behavior is somehow
aligned with the tegra_wmark governor supported by the actmon. The
only different is that nvhost_podgov governor is polling-based DFS
algorithm and it maintaines the moving average load in the governor
instead of hardware itself.
Bug 4892068
Change-Id: I033cb1359a484d4c9433fa4f2e7a99c42cb636b3
Signed-off-by: Johnny Liu <johnliu@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3315446
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Rajesh Devaraj <rdevaraj@nvidia.com>
using this patch fixing below cert & misra errors:-
- cert_int08_c_violation: Unsigned integer operation
"vma->vm_end - vma->vm_start" may wrap.
- cert_int08_c_violation: Unsigned integer operation
"vma->vm_end - vma->vm_start" may wrap.
- cert_str07_c_violation: Using unsafe interface
"strncpy" instead of "strncpy_s" for string manipulation.
- cert_str07_c_violation: Using unsafe interface "strncat"
instead of "strncat_s" for string manipulation.
- cert_exp39_c_violation: Accessing an object through a
pointer "(uint64_t *)buf" whose type "uint64_t *" is
incompatible with the type of the object
- cert_exp39_c_violation: Calling function
"hyp_trace_get_mask(uint64_t *)" which accesses an object
through a pointer "(uint64_t *)buf" whose type "uint64_t *"
is incompatible with the type of the object. [details]
- cert_exp39_c_violation: Accessing an object through a
pointer "(uint64_t *)buf" whose type "uint64_t *" is
incompatible with the type of the object.
JIRA ESLC-8400
Change-Id: Ia8e03dac4e939078719543d8e6d3bbc464301b16
Signed-off-by: Manish Bhardwaj <mbhardwaj@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3304759
Reviewed-by: svcacv <svcacv@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Sumeet Gupta <sumeetg@nvidia.com>
Reviewed-by: Suresh Venkatachalam <skathirampat@nvidia.com>