- Define boot log related HSP message ID's.
- Call camrtc_hsp_vm_read_boot_log as the first step during the HSP
handshake.
- The read_boot_log function will wait for 2000 ms for a boot log
message. If the RCE has hung during boot, this will timeout, and return
with error.
- Move dev_set_drvdata to before camrtc_hsp_probe in camrtc_hsp_create.
Explanation: The RCE, during a normal boot sequence, will boot before
the RTCPU KMD starts probing, so the mailbox will already be full
when the HSP driver is initializing. The RTCPU HSP full interrupt
handler will be called immediately after the handlers are registered
by the mailbox driver. The interrupt handler will reference the HSP
device's drvdata, and it was a race condition as to whether the
interrupt handler would be called before the drvdata was set.
Thus, this change sets drvdata before the interrupt handlers are
installed to prevent this race condition.
- Update the full interrupt handler to return if camhsp is null.
Jira CAMERASW-27443
Change-Id: Ibb7ed41771d2178e0d06adb94ae1955db61b9d92
Signed-off-by: Akihiro Mizusawa <amizusawa@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3239620
Reviewed-by: Chinniah Poosapadi <cpoosapadi@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Semi Malinen <smalinen@nvidia.com>
Reviewed-by: Frank Chen <frankc@nvidia.com>
This patch implements the following improvements:
1. Add proper NULL pointer checks to prevent dereferencing
NULL pointers
2. Break down the isp_capture_setup function into smaller, more
manageable chunks to improve readability and error handling
3. Consistently set error codes before jumping to failure handling
4. Standardize the use of goto statements for error cases
5. Improve error logging using dev_err() to provide more context
for debugging
Bug 4778298
Jira CAMERASW-27054
Change-Id: I62ff4868b81107ac41e8561729cf1b9bede6c909
Signed-off-by: ayush <ajef@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3220092
(cherry picked from commit 905ff68fe62a42685a97402e58a1fa3cbcab28f4)
Change-Id: I7ec8f31ce058f2658d776080c62e44dd5b190463
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3250557
Tested-by: Ayush Jef <ajef@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Bitan Biswas <bbiswas@nvidia.com>
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: Semi Malinen <smalinen@nvidia.com>
Reviewed-by: Frank Chen <frankc@nvidia.com>
Add a userspace interface for providing access to the memory syncpoint
shim through dma-buf file descriptors. Applications can pass references
to syncpoints to other devices that only support memory semaphores to
facilitate synchronization with syncpoints.
Only syncpoints allocated through the DRM file descriptor ("owned" by
the application) can be exported read-write. All syncpoints can be
exported read-only.
Jira HOSTX-5722
Bug 4919132
Change-Id: I4f5c007b7f9ba65780c418b4e22c5f59a11ef84d
Signed-off-by: Mikko Perttunen <mperttunen@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3252026
Reviewed-by: Santosh BS <santoshb@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Retrieve information for the memory syncpoint shim from the device tree
and add an interface to provide the information to other drivers.
The memory syncpoint shim is a special area on the data backbone,
where each memory page corresponds to a host1x syncpoint. Reading
the page returns the value of the syncpoint, and writing to it
increments the syncpoint by one.
Jira HOSTX-5722
Bug 4919132
Change-Id: Ie892abd754f7543fbc56844dcc40cab3f837e305
Signed-off-by: Mikko Perttunen <mperttunen@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3252025
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Santosh BS <santoshb@nvidia.com>
If we have any export symbols in nvmap, we would have to show the
interactions between KMDs as a path in our threat model.
Hence remove the following unnecessary export symbols from nvmap.
- nvmap_register_vidmem_carveout: Not being used on TOT
- nvmap_dev: Used by one of nvmap_ktest which is also being cleaned up.
JIRA TMM-5842
Change-Id: I65d466a37ef51f3222bed4d084efaff92480a21f
Signed-off-by: Ketan Patil <ketanp@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3254553
Reviewed-by: Sachin Nikam <snikam@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Pritesh Raithatha <praithatha@nvidia.com>
Firmware requests triggered by userspace action can be executed
in interruptible context, which can cause signals to interrupt
firmware loading.
Ordinarily, one would propagate the error code to userspace and
let it retry. However, request_firmware does not have proper
handling of retryable errors, as sysfs fallbacks will clobber
the original error code. Furthermore, pm_runtime, through which
we would propagate the error code, doesn't support transient
resume failures either.
As such, as a quick fix, change to request_firmware_direct and
retry it directly in situ 10 times.
Bug 4753613
Co-developed-by: Zuyi Hu <zuyih@nvidia.com>
Signed-off-by: Mikko Perttunen <mperttunen@nvidia.com>
Change-Id: Idb9a04d4fa80aeffbfd0ad0176cce55c4dedf488
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3202848
(cherry picked from commit a17e81cad18bbdfef0194471524b675d74501054)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3219109
(cherry picked from commit 30c08f369a8f3acd642fcec70814086bd472e734)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3253514
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Santosh BS <santoshb@nvidia.com>
Tested-by: Zuyi Hu <zuyih@nvidia.com>
This patch fixes a race condition between
tegra_dce_unregister_ipc_client and dce_client_ipc_wakeup.
If dce_client_ipc_wakeup is called just after unregistering
it'll result in accessing already freed data structures and
kernel crash. This patch adds a check to validate if the client_ipc
struct is valid before accessing its members.
Bug 4913921
Change-Id: Ie7f25379d7254d1f1ad4fb17baafee353f6d9eca
Signed-off-by: Mahesh Kumar <mahkumar@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3239873
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Vinod Gopalakrishnakurup <vinodg@nvidia.com>
- Initialize lock per device node and take lock at the
start of processing of each ioctl command. This is needed
because there is only one set of IOVA buffers allocated
during init per device node. Without lock it leads to
race conditions when more than one app uses the same
device node.
- Release tfm after each API call for both sha and hmac-sha
- Validate rng buffer size provided by user
- Support buf size up to HW supported limit for GCM-Dec req
if tag verify is supported by HW.
Jira ESSS-1517
Bug 4881474
Change-Id: I338558656ac00b91750e74990bb47c5a35f31e08
Signed-off-by: Nagaraj P N <nagarajp@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3233377
Reviewed-by: Leo Chiu <lchiu@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Sandeep Trasi <strasi@nvidia.com>
- Compile axi-nvdla.ko alongside nvhost-nvdla.ko driver.
- Fix the sequence of register programming that is unique
to DLA3.
- Introduce a debugfs node for bitbang loading the IMEM/DMEM
contents.
- Raised Bug 4942853 to track the syncpoint features.
- Address review comments from the previous patchsets in
regard to the DLA3 updates.
Bug 4916080
Change-Id: I6859868e6cdd3e11f90e76a8bcf79a9676cd5a52
Signed-off-by: Arvind M <am@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3205466
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: Mitch Harwell <mharwell@nvidia.com>
Reviewed-by: Ken Adams <kadams@nvidia.com>
Reviewed-by: Amit Sharma (SW-TEGRA) <amisharma@nvidia.com>
Reviewed-by: Vishal Thoke <vthoke@nvidia.com>
issue: PHY ID allocation is failing during the
stress test of insmod and rmmod of nvethernet
module, since PHYIDs were exhausing during the
module insertion.
fix: deregister fixed link in remove for
freeing up the PHYIDs which were allocated during
probe.
Bug 4754744
Signed-off-by: Narayan Reddy <narayanr@nvidia.com>
Change-Id: I6e71c684d4fcc5bb99a971c7d4d41726998cd8ec
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3245742
Reviewed-by: Bitan Biswas <bbiswas@nvidia.com>
Reviewed-by: Bhadram Varka <vbhadram@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Mohan Thadikamalla <mohant@nvidia.com>
Upstream has removed iommu_present function from k6.13, hence remove
call to this function from nvmap, as IOMMU will be always present in
any latest SOC. We will rely on dont-convert-iovmm-to-carveout property
from DT to avoid converting the entire IOVMM to carveout.
Bug 4923950
Change-Id: Ia7e374e81ab8c78f3d17187aebd2fcf0170fabdc
Signed-off-by: Ketan Patil <ketanp@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3243903
Reviewed-by: Sachin Nikam <snikam@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-by: Pritesh Raithatha <praithatha@nvidia.com>
Transmit: Add test_tx_bandwidth_dump_enable support to
transmit packets from the driver which helps measure
line rate for 25G and 10G.
pkt1500, pkt8192, pkt64 packet sizes can be configured.
Receive- Drop Packets at the driver level.
Bug 4742868
Change-Id: I52fe1b73b169dfedc06afea5fb62d7bc21fd9ba1
Signed-off-by: Nagaraj Annaiah <nannaiah@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3197198
Reviewed-by: Ashutosh Jha <ajha@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
After removing nvmap_priv.h, nvmap no longer builds for Linux v6.10+
kernels and error such as the following are observed ...
drivers/video/tegra/nvmap/nvmap_alloc.c:41:24: error: implicit
declaration of function 'vzalloc'; did you mean 'kzalloc'?
[-Werror=implicit-function-declaration]
41 | return vzalloc(len);
| ^~~~~~~
| kzalloc
drivers/video/tegra/nvmap/nvmap_alloc.c:52:17:
error: implicit declaration of function 'vfree'; did you mean
'kvfree'? [-Werror=implicit-function-declaration]
52 | vfree(ptr);
| ^~~~~
| kvfree
Fix this by including vmalloc.h in the necessary files.
JIRA TMM-5751
Change-Id: I49fae7ea5a78f0029706c2bd12b5553e5903f31b
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3243752
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Ketan Patil <ketanp@nvidia.com>
Building the rtl8852ce driver with various different Linux v6.x kernels
fail for various reasons.
For Linux v6.6 the build fails with errors such as ...
drivers/net/wireless/realtek/rtl8852ce/phl/phl_sta.c: In function
'phl_cmd_set_seciv_hdl':
drivers/net/wireless/realtek/rtl8852ce/phl/phl_sta.c:4907:16: error:
implicit conversion from 'enum rtw_hal_status' to
'enum rtw_phl_status' [-Werror=enum-conversion]
4907 | return rtw_hal_set_dctrl_tbl_seciv((void*)phl_info->hal,
| sta, sta->sec_iv);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
For Linux v6.8 the build fails with the above and the following ...
drivers/net/wireless/realtek/rtl8852ce/phl/phl_sta.c:301:5: error:
no previous declaration for '_phl_get_macid'
[-Werror=missing-declarations]
301 | u16 _phl_get_macid(struct phl_info_t *phl_info,
| ^~~~~~~~~~~~~~
For Linux v6.10 the build fails with the above and the following ...
drivers/net/wireless/realtek/rtl8852ce/core/rtw_ap.c:6265:9: error:
suggest braces around empty body in an 'else' statement
[-Werror=empty-body]
6265 | ;
| ^
drivers/net/wireless/realtek/rtl8852ce/core/rtw_sta_mgt.c:742:1: error:
'static' is not at beginning of declaration
[-Werror=old-style-declaration]
742 | u32 static _rtw_free_core_stainfo(_adapter *padapter , struct
| sta_info *psta, u8 aid,
| const u8 *hwaddr)
| ^~~
For Linux v6.12, the driver build is completely broken because of the
following build error ...
drivers/net/wireless/realtek/rtl8852ce/os_dep/linux/wifi_regd.c:1007:17:
error: too few arguments to function 'cfg80211_cac_event'
1007 | cfg80211_cac_event(evt->netdev, &evt->chandef,
| evt->event, GFP_KERNEL);
| ^~~~~~~~~~~~~~~~~~
For Linux v6.6+ mark the driver as broken and do not build this for
Linux v6.6+ kernels until these issues are addressed.
Bug 4667769
Change-Id: Id6b060f6b39ba4ef64d6388e06ef1e038c19206f
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3226276
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3242573
Reviewed-by: svcacv <svcacv@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Shobek Attupurath <sattupurath@nvidia.com>