- Sep 23, 2024
-
-
Youssef Samir authored
Flip the order of function pointers inside qaic_gem_funcs for print_info and get_sg_table to match their definition order in struct drm_gem_object_funcs. Change-Id: I261a3d50fa0d4f38ead285caac4e76e059438445 Signed-off-by:
Youssef Samir <quic_yabdulra@quicinc.com>
-
Youssef Samir authored
Functions that operate on qaic_bo are grouped together, then moved above the ioctl definitions and the GEM objects' callback functions. This is done to allow defining drm_gem_object_funcs close() function, without resorting to using forward declarations that might violate the kernel coding style. Change-Id: If55384aa2568ae28c26fec6d6dbbd6a68a318339 Signed-off-by:
Youssef Samir <quic_yabdulra@quicinc.com>
-
- Sep 16, 2024
-
-
Youssef Samir authored
As the number of cards supported by the driver grows, their configurations will differ. The driver needs to become more dynamic to support these configurations. Currently, each card may differ in the exposed BARs, the regions they map to, and the DBC count. Create config structs for each card, and let the driver configure the qaic_device struct based on the configurations passed to the driver. Change-Id: I0a7a60f3b35bf549546240f369c8498cefef9f41 Signed-off-by:
Youssef Samir <quic_yabdulra@quicinc.com>
-
Youssef Samir authored
The PCI_DEVICE_DATA(vend, dev, data) macro expects the dev field to be of a specific format. The reason for choosing this macro is that it sets the driver_data field of the pci_device_id struct. Change the Device ID definitions from PCI_DEV_AICxxx to PCI_DEVICE_ID_QCOM_AICxxx. Change-Id: I3da1ff144af6674bfa4f1fa6c5a0ad90712291d7 Signed-off-by:
Youssef Samir <quic_yabdulra@quicinc.com>
-
Youssef Samir authored
When broadcasting data to multiple nodes via MHI, using skb_clone() causes all nodes to receive the same header data. This can result in packets being discarded by endpoints, leading to lost data. This issue occurs when a socket is closed, and a QRTR_TYPE_DEL_CLIENT packet is broadcasted. All nodes receive the same destination node ID, causing the node connected to the client to discard the packet and remain unaware of the client's deletion. Replace skb_clone() with pskb_copy(), to create a separate copy of the header for each sk_buff. Change-Id: Ib8d4be352a7b5e0123260fbceda71a3c7a02f28c Signed-off-by:
Youssef Samir <quic_yabdulra@quicinc.com>
-
Carl Vanderlip authored
Change-Id: Id0498633b2be02093aeb1f1c08e7bfee1ffa4393 Signed-off-by:
Carl Vanderlip <quic_carlv@quicinc.com>
-
- Sep 12, 2024
-
-
Carl Vanderlip authored
Start using more descriptive feature flag name. Change-Id: I171a156caa8b95dcd30e157032855019ec9f51b8 Signed-off-by:
Carl Vanderlip <quic_carlv@quicinc.com>
-
- Sep 11, 2024
-
-
Jeffrey Hugo authored
SSR dumps will be going through the same devcoredump framework as Sahara dumps. This means that userspace will need to be able to parse both. Update the SSR dump header to match the structure of the Sahara dump header so that userspace can parse both, and identify any future changes. Change-Id: I88070c6c7b837e99866da24846e98b958006b95e Signed-off-by:
Jeffrey Hugo <quic_jhugo@quicinc.com>
-
Jeffrey Hugo authored
Sahara is handled by a kernel implementation now. There is no need to export the channel to userspace. Change-Id: Iee71fc15b99af2f656dbbdc20629b87a7c1ddf00 Signed-off-by:
Jeffrey Hugo <quic_jhugo@quicinc.com>
-
Jeffrey Hugo authored
The Sahara protocol has a crashdump functionality. In the hello exchange, the device can advertise it has a memory dump available for the host to collect. Instead of the device making requests of the host, the host requests data from the device which can be later analyzed. Implement this functionality and utilize the devcoredump framework for handing the dump over to userspace. Similar to how firmware loading in Sahara involves multiple files, crashdump can consist of multiple files for different parts of the dump. Structure these into a single buffer that userspace can parse and extract the original files from. Change-Id: I97870ce77cd1de9b45536555f6c91a638098b58f Signed-off-by:
Jeffrey Hugo <quic_jhugo@quicinc.com>
-
Jeffrey Hugo authored
The AIC100 secondary bootloader uses the Sahara protocol for two purposes - loading the runtime firmware images from the host, and offloading crashdumps to the host. The crashdump functionality is only invoked when the AIC100 device encounters a crash and dumps are enabled. Also the collection of the dump is optional - the host can reject collecting the dump. The Sahara protocol contains many features and modes including firmware upload, crashdump download, and client commands. For simplicity, implement the parts of the protocol needed for loading firmware to the device. Fundamentally, the Sahara protocol is an embedded file transfer protocol. Both sides negotiate a connection through a simple exchange of hello messages. After handshaking through a hello message, the device either sends a message requesting images, or a message advertising the memory dump available for the host. For image transfer, the remote device issues a read data request that provides an image (by ID), an offset, and a length. The host has an internal mapping of image IDs to filenames. The host is expected to access the image and transfer the requested chunk to the device. The device can issue additional read requests, or signal that it has consumed enough data from this image with an end of image message. The host confirms the end of image, and the device can proceed with another image by starting over with the hello exchange again. Some images may be optional, and only provided as part of a provisioning flow. The host is not aware of this information, and thus should report an error to the device when an image is not available. The device will evaluate if the image is required or not, and take the appropriate action. Change-Id: Ieac74d29dd52a52e1765a7babcfad304de098dd6 Signed-off-by:
Jeffrey Hugo <quic_jhugo@quicinc.com> Reviewed-by:
Carl Vanderlip <quic_carlv@quicinc.com> Reviewed-by:
Pranjal Ramajor Asha Kanojiya <quic_pkanojiy@quicinc.com> Reviewed-by:
Bjorn Andersson <andersson@kernel.org> Reviewed-by:
Jacek Lawrynowicz <jacek.lawrynowicz@linux.intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20240322034917.3522388-1-quic_jhugo@quicinc.com
-
Jeffrey Hugo authored
Upcoming Sahara code will require a size_mul() backport. Add it. Change-Id: I529f6d22b2158d57b1686e2326fbf6933188c1e0 Signed-off-by:
Jeffrey Hugo <quic_jhugo@quicinc.com>
-
- Aug 09, 2024
-
-
Youssef Samir authored
The driver currently supports 4 devices, and they can differ in configurations, including the number of DBCs. Currently the DBC count is set to 16 regardless of the device. Add definitions for the number of DBCs per device. Use them as private data to set the number of DBCs to be allocated for each device. Change-Id: I89a470a38779cbc9e0d2b9db28851917a1d13122 Signed-off-by:
Youssef Samir <quic_yabdulra@quicinc.com>
-
- Jul 29, 2024
-
-
Carl Vanderlip authored
Many nonseekable_open calls were changed to stream_open by stream_open.cocci in change c5bf68fe. On older kernels that don't support FMODE_STREAM, simply switch back to using the old open. Change-Id: Ie5d1f460aa209677079f10496d717b2c57059186 Signed-off-by:
Carl Vanderlip <quic_carlv@quicinc.com>
-
Carl Vanderlip authored
DKMS will check MODULE_VERSION to make sure that only newer versions are replacing older ones. Increment the module version so that our version of the module takes precedence. Change-Id: If0e503971446f13a761604d06717041bb3b6ba32 Signed-off-by:
Carl Vanderlip <quic_carlv@quicinc.com>
-
- Jul 25, 2024
-
-
Carl Vanderlip authored
Pull v6.10's switchtec into KMD. v6.8 has sufficient changes to support tool needed for Broadcom switch issue, but v6.10 has some bug fixes. Change-Id: If9290c58e78821a687003b1d6b33c887458a5121 Signed-off-by:
Carl Vanderlip <quic_carlv@quicinc.com>
-
- Jul 19, 2024
-
-
Ajit Pal Singh authored
In the event of 16 AIC100-Ultra+ Cards connected to a server the SOC count will reach 128. Considering 2 MHI channels (QDSS and DIAG) in AMSS mode, the global count of MHI Control channels can go up to 256. Increase the MHI_QAIC_CTRL_MAX_MINORS to 256 to take care of that. Change-Id: Ib62df761c4c677a0d54eea5cd138be689c0fe529 Signed-off-by:
Ajit Pal Singh <quic_ajitpals@quicinc.com>
-
- Jun 19, 2024
-
-
Jeffrey Hugo authored
Add basic support for the new AIC080 product. The PCIe Device ID is 0xa080. AIC080 is a lower cost, lower performance SKU variant of AIC100. From the qaic perspective, it is the same as AIC100. Change-Id: Ic0726ca3d5f6f23556855f1b3a8b729943998e09 Signed-off-by:
Jeffrey Hugo <quic_jhugo@quicinc.com>
-
- Jun 13, 2024
-
-
Jeffrey Hugo authored
The subsystem restart (SSR) handling is changing in firmware. Currently QSM will essentially deactivate the workload, and reactivate it. This makes the SSR event mostly transparent from the user perspective. However, this doesn't work when the error that triggers SSR does not allow for a reactivate, or the network retains some kind of state from input to input. For the former, SSR cannot complete. For the latter, the issue can be silent but the end user will not get the correct output. Instead, SSR behavior in the firmware will involve a deactivate, but not a reactivate. The end user will need to be aware of SSR, and decide the course of action. For the KMD, this means we can release the DBC at the start of SSR and no longer need to hold it in "suspend" for the user. Change-Id: I9d84d8a05c82af9ee2711f64cc929f0276313849 Signed-off-by:
Jeffrey Hugo <quic_jhugo@quicinc.com>
-
- Jun 12, 2024
-
-
Jeffrey Hugo authored
Add basic support for the new AIC200 product. For now, treat as AIC100 as AIC200 will have the same basic functionality. The PCIe Device ID for the physical function is 0xa110 and the virtual function is 0xa111. Change-Id: I8a8660af032e14f3f669d0464118654310057e20 Signed-off-by:
Jeffrey Hugo <quic_jhugo@quicinc.com>
-
- Jun 03, 2024
-
-
Carl Vanderlip authored
Backport patch to deal with class_create was changed to match on calls with only one argument. It was assumed that since the new class_create occurred post drm_accel, that accel_helpers wouldn't need to swap to the new version. However, if DRM_ACCEL isn't configured, the backported accel framework still needs to be used. In addition to changing the call to the single argument, the SmPL patch currently will only match against identifiers, and not the string as used currently. Create a definition that maps to the "accel" name so that the SmPL patch will apply here too. Change-Id: I35e60d9ebd1f2b87a53374f9a1e3c40fd4efc14b Signed-off-by:
Carl Vanderlip <quic_carlv@quicinc.com>
-
- Apr 30, 2024
-
-
Pranjal Ramajor Asha Kanojiya authored
Register accel device as render type node to support IOCTLs that only work with either render node or root access. Example for such IOCTLS are DRM_IOCTL_PRIME_HANDLE_TO_FD and DRM_IOCTL_PRIME_FD_TO_HANDLE. Kernel version from 5.6.0 removed the requirement for device node to be render node. Change-Id: I0920d31a61d95c8983eb036ab944aaaed6b116c8 Signed-off-by:
Pranjal Ramajor Asha Kanojiya <quic_pkanojiy@quicinc.com>
-
- Apr 26, 2024
-
-
Troy Hanson authored
Explicit assignment of driver owner is not required. The MHI framework initializes it. No functional change. Change-Id: I7b16080fdc9e3d1245c71691e296c34f76611571 Signed-off-by:
Troy Hanson <quic_thanson@quicinc.com>
-
Troy Hanson authored
Comply with coding standard. No functional change. Change-Id: I09ec871c48bf6b02489428591392b3a8c6bc2868 Signed-off-by:
Troy Hanson <quic_thanson@quicinc.com>
-
Jeffrey Hugo authored
ns is part of the qrtr.ko, and also opens up a kernel socket to qrtr. This causes the qrtr.ko to automatically have a +2 reference count, and blocks any attempt to remove the module. Add a module parameter that when written to, will cause the ns socket to be closed, thus allowing the module to be removed. Significant changes to the code are needed for a clean rmmod method. Change-Id: I1c3ef21007a27297547bec73f5f55de43645a51b Signed-off-by:
Jeffrey Hugo <quic_jhugo@quicinc.com>
-
- Apr 25, 2024
-
-
Jeffrey Hugo authored
The MHI qrtr transport will not autoload when the host kernel predates 5.7 therefore, force loading the module based on the AIC100 device when backporting. Change-Id: Icf6a602f069827c2fc53736ea22ca25c0450296e Signed-off-by:
Jeffrey Hugo <quic_jhugo@quicinc.com>
-
- Mar 28, 2024
-
-
Jeffrey Hugo authored
The ipc_router channel allows AF_QIPCRTR clients and services to communicate with the AIC100 device. The ipc_router MHI transport layer expects the channel to be named exactly "IPCR". Change-Id: I4fd8d2ccbf6258090a30eaca03e92472e089d700 Signed-off-by:
Jeffrey Hugo <quic_jhugo@quicinc.com>
-
- Mar 07, 2024
-
-
Pranjal Ramajor Asha Kanojiya authored
Two threads of the same process can potential read and write parallelly to head and tail pointers of the same DBC request queue. This could lead to a race condition and corrupt the DBC request queue. Change-Id: I4ce30d33982686cf6dfaa8ff80a6cf7834946447 Signed-off-by:
Pranjal Ramajor Asha Kanojiya <quic_pkanojiy@quicinc.com>
-
- Mar 01, 2024
-
-
Jeffrey Hugo authored
Copyright update in debugfs.h was mistakenly attributed to the Linux Foundation when it should have been attributed to Qualcomm Innovation Center, Inc. Fix this. Change-Id: I36a1a03d5ab30bee99352b0883ed810e24e8b84b Signed-off-by:
Jeffrey Hugo <quic_jhugo@quicinc.com>
-
- Feb 28, 2024
-
-
Carl Vanderlip authored
On Centos7 (3.10.0-1160.105) kernel crashes were seen during soc_resets while running install script. This is due to not initializing the mutex (accidentally removed during rebase). Change-Id: I701bad76c8fedb235c8cb0b9c830864c8af5c435 Signed-off-by:
Carl Vanderlip <quic_carlv@quicinc.com>
-
Pranjal Ramajor Asha Kanojiya authored
Device partitioning feature is no longer supported. Remove any comments related to device partitioning to avoid confusion. Change-Id: If9de09308ba6ebda0e7bd568faf03319e741acd1 Signed-off-by:
Pranjal Ramajor Asha Kanojiya <quic_pkanojiy@quicinc.com>
-
Jeffrey Hugo authored
Timesync is handled by a kernel implementation now. There is no need to export the channel to userspace. Change-Id: I5b2c616cf5d476c59b0eb17fd3290d8536f12cc9 Signed-off-by:
Jeffrey Hugo <quic_jhugo@quicinc.com>
-
- Feb 26, 2024
-
-
Pranjal Ramajor Asha Kanojiya authored
Only for_each_sgtable_dma_sg() should be used to walk through a SG table to grab correct bus address and length pair after calling DMA MAP API on a SG table as DMA MAP APIs updates the SG table and for_each_sgtable_sg() walks through the original SG table. Change-Id: I2fe5ed40449a5ce8d08c0606953b1c409eba2a6c Fixes: ff13be83 ("accel/qaic: Add datapath") Fixes: 129776ac ("accel/qaic: Add control path") Signed-off-by:
Pranjal Ramajor Asha Kanojiya <quic_pkanojiy@quicinc.com>
-
Pranjal Ramajor Asha Kanojiya authored
for_each_sgtable_dma_sg() will be used by the subsequent patch Also fix for_each_sgtable_sg() appropriately. Change-Id: I0136290eca62baaab83247f26234e40be9b8e442 Signed-off-by:
Pranjal Ramajor Asha Kanojiya <quic_pkanojiy@quicinc.com>
-
- Feb 22, 2024
-
-
Jeffrey Hugo authored
With v6.7, the drm_driver debugfs_init callback is no longer called. Drivers are expected to initialize debugfs on their own, using the debugfs_root provided in the drm_device. Also drm_debugfs_create_files() is deprecated. The drm_info structures cannot be used with sub-directories and drm_debugfs_add_files(), so the utility of having them is lost. By removing them, we clean up some #DEFINEs and dynamic memory usage which seems to make the code cleaner. Change-Id: I0e7e8d4e467cbdc0dc90f4da2c0abd838f22f5c4 Signed-off-by:
Jeffrey Hugo <quic_jhugo@quicinc.com>
-
- Feb 15, 2024
-
-
Pranjal Ramajor Asha Kanojiya authored
Power break PCIe RAS event indicates that device is not receiving enough power. This new event comes under the existing PCIe RAS event and it is a correctable error. Add support for this new PCIe RAS event. Change-Id: I94ffd5b8371e6a24af4037773750e551b75ba171 Signed-off-by:
Pranjal Ramajor Asha Kanojiya <quic_pkanojiy@quicinc.com>
-
Pranjal Ramajor Asha Kanojiya authored
Add backward compatibility for older RAS messages coming from device. Change-Id: I6670cd2ea275e82f39a542650f2a2d3866597f21 Signed-off-by:
Pranjal Ramajor Asha Kanojiya <quic_pkanojiy@quicinc.com>
-
- Feb 14, 2024
-
-
Carl Vanderlip authored
This reverts commit c70ed5287a64f1af6dee9691b209c9c2ecd36cc0. Original commit was attempting at clearing up 'unused function' warnings. However, these warnings were valid and were alerting that the patch to add the cleanup routine was failing to apply. Change-Id: I342dc06379d4c0474c7a1af8cd33a7341f8042a4 Signed-off-by:
Carl Vanderlip <quic_carlv@quicinc.com>
-
- Feb 10, 2024
-
-
Carl Vanderlip authored
Some AIC100 family cards have multiple SoCs per PCIe card. Add hwmon channel to support the multi-SoC cards. Cards without multiple SoCs will end up reporting the same info on both channels since there's an equivalence between card/SoC. Change-Id: If94f07b6c4a51363e14beca8c9793f09a3d390c4 Signed-off-by:
Carl Vanderlip <quic_carlv@quicinc.com>
-
Pranjal Ramajor Asha Kanojiya authored
struct ssr_crashdump is the structure that owns the work assigned to ssr_dump_worker(). Change-Id: I73aaf8eb98ba461b5e51b9d75af0e505a28dcaa3 Fixes: 3c8aa32dc783 ("accel/qaic: Fix SSR crashdump collection buffer to 64K") Signed-off-by:
Pranjal Ramajor Asha Kanojiya <quic_pkanojiy@quicinc.com>
-