€•…Œsphinx.addnodes”Œdocument”“”)”}”(Œ rawsource”Œ”Œchildren”]”(Œ translations”Œ LanguagesNode”“”)”}”(hhh]”(hŒ pending_xref”“”)”}”(hhh]”Œdocutils.nodes”ŒText”“”ŒChinese (Simplified)”…””}”Œparent”hsbaŒ attributes”}”(Œids”]”Œclasses”]”Œnames”]”Œdupnames”]”Œbackrefs”]”Œ refdomain”Œstd”Œreftype”Œdoc”Œ reftarget”Œ#/translations/zh_CN/accel/qaic/qaic”Œmodname”NŒ classname”NŒ refexplicit”ˆuŒtagname”hhh ubh)”}”(hhh]”hŒChinese (Traditional)”…””}”hh2sbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ#/translations/zh_TW/accel/qaic/qaic”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubh)”}”(hhh]”hŒItalian”…””}”hhFsbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ#/translations/it_IT/accel/qaic/qaic”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubh)”}”(hhh]”hŒJapanese”…””}”hhZsbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ#/translations/ja_JP/accel/qaic/qaic”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubh)”}”(hhh]”hŒKorean”…””}”hhnsbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ#/translations/ko_KR/accel/qaic/qaic”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubh)”}”(hhh]”hŒPortuguese (Brazilian)”…””}”hh‚sbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ#/translations/pt_BR/accel/qaic/qaic”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubh)”}”(hhh]”hŒSpanish”…””}”hh–sbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ#/translations/sp_SP/accel/qaic/qaic”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubeh}”(h]”h ]”h"]”h$]”h&]”Œcurrent_language”ŒEnglish”uh1h hhŒ _document”hŒsource”NŒline”NubhŒcomment”“”)”}”(hŒ%SPDX-License-Identifier: GPL-2.0-only”h]”hŒ%SPDX-License-Identifier: GPL-2.0-only”…””}”hh·sbah}”(h]”h ]”h"]”h$]”h&]”Œ xml:space”Œpreserve”uh1hµhhh²hh³Œ=/var/lib/git/docbuild/linux/Documentation/accel/qaic/qaic.rst”h´KubhŒsection”“”)”}”(hhh]”(hŒtitle”“”)”}”(hŒ QAIC driver”h]”hŒ QAIC driver”…””}”(hhÏh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÍhhÊh²hh³hÇh´KubhŒ paragraph”“”)”}”(hŒaThe QAIC driver is the Kernel Mode Driver (KMD) for the AIC100 family of AI accelerator products.”h]”hŒaThe QAIC driver is the Kernel Mode Driver (KMD) for the AIC100 family of AI accelerator products.”…””}”(hhßh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÝh³hÇh´KhhÊh²hubhÉ)”}”(hhh]”(hÎ)”}”(hŒ Interrupts”h]”hŒ Interrupts”…””}”(hhðh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÍhhíh²hh³hÇh´K ubhÉ)”}”(hhh]”(hÎ)”}”(hŒIRQ Storm Mitigation”h]”hŒIRQ Storm Mitigation”…””}”(hjh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÍhhþh²hh³hÇh´KubhÞ)”}”(hX4While the AIC100 DMA Bridge hardware implements an IRQ storm mitigation mechanism, it is still possible for an IRQ storm to occur. A storm can happen if the workload is particularly quick, and the host is responsive. If the host can drain the response FIFO as quickly as the device can insert elements into it, then the device will frequently transition the response FIFO from empty to non-empty and generate MSIs at a rate equivalent to the speed of the workload's ability to process inputs. The lprnet (license plate reader network) workload is known to trigger this condition, and can generate in excess of 100k MSIs per second. It has been observed that most systems cannot tolerate this for long, and will crash due to some form of watchdog due to the overhead of the interrupt controller interrupting the host CPU.”h]”hX6While the AIC100 DMA Bridge hardware implements an IRQ storm mitigation mechanism, it is still possible for an IRQ storm to occur. A storm can happen if the workload is particularly quick, and the host is responsive. If the host can drain the response FIFO as quickly as the device can insert elements into it, then the device will frequently transition the response FIFO from empty to non-empty and generate MSIs at a rate equivalent to the speed of the workload’s ability to process inputs. The lprnet (license plate reader network) workload is known to trigger this condition, and can generate in excess of 100k MSIs per second. It has been observed that most systems cannot tolerate this for long, and will crash due to some form of watchdog due to the overhead of the interrupt controller interrupting the host CPU.”…””}”(hjh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÝh³hÇh´Khhþh²hubhÞ)”}”(hXøTo mitigate this issue, the QAIC driver implements specific IRQ handling. When QAIC receives an IRQ, it disables that line. This prevents the interrupt controller from interrupting the CPU. Then AIC drains the FIFO. Once the FIFO is drained, QAIC implements a "last chance" polling algorithm where QAIC will sleep for a time to see if the workload will generate more activity. The IRQ line remains disabled during this time. If no activity is detected, QAIC exits polling mode and reenables the IRQ line.”h]”hXüTo mitigate this issue, the QAIC driver implements specific IRQ handling. When QAIC receives an IRQ, it disables that line. This prevents the interrupt controller from interrupting the CPU. Then AIC drains the FIFO. Once the FIFO is drained, QAIC implements a “last chance†polling algorithm where QAIC will sleep for a time to see if the workload will generate more activity. The IRQ line remains disabled during this time. If no activity is detected, QAIC exits polling mode and reenables the IRQ line.”…””}”(hjh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÝh³hÇh´Khhþh²hubhÞ)”}”(hX)This mitigation in QAIC is very effective. The same lprnet usecase that generates 100k IRQs per second (per /proc/interrupts) is reduced to roughly 64 IRQs over 5 minutes while keeping the host system stable, and having the same workload throughput performance (within run-to-run noise variation).”h]”hX)This mitigation in QAIC is very effective. The same lprnet usecase that generates 100k IRQs per second (per /proc/interrupts) is reduced to roughly 64 IRQs over 5 minutes while keeping the host system stable, and having the same workload throughput performance (within run-to-run noise variation).”…””}”(hj+h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÝh³hÇh´K$hhþh²hubeh}”(h]”Œirq-storm-mitigation”ah ]”h"]”Œirq storm mitigation”ah$]”h&]”uh1hÈhhíh²hh³hÇh´KubhÉ)”}”(hhh]”(hÎ)”}”(hŒSingle MSI Mode”h]”hŒSingle MSI Mode”…””}”(hjDh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÍhjAh²hh³hÇh´K*ubhÞ)”}”(hX'MultiMSI is not well supported on all systems; virtualized ones even less so (circa 2023). Between hypervisors masking the PCIe MSI capability structure to large memory requirements for vIOMMUs (required for supporting MultiMSI), it is useful to be able to fall back to a single MSI when needed.”h]”hX'MultiMSI is not well supported on all systems; virtualized ones even less so (circa 2023). Between hypervisors masking the PCIe MSI capability structure to large memory requirements for vIOMMUs (required for supporting MultiMSI), it is useful to be able to fall back to a single MSI when needed.”…””}”(hjRh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÝh³hÇh´K,hjAh²hubhÞ)”}”(hXTo support this fallback, we allow the case where only one MSI is able to be allocated, and share that one MSI between MHI and the DBCs. The device detects when only one MSI has been configured and directs the interrupts for the DBCs to the interrupt normally used for MHI. Unfortunately, this means that the interrupt handlers for every DBC and MHI wake up for every interrupt that arrives; however, the DBC threaded irq handlers only are started when work to be done is detected (MHI will always start its threaded handler).”h]”hXTo support this fallback, we allow the case where only one MSI is able to be allocated, and share that one MSI between MHI and the DBCs. The device detects when only one MSI has been configured and directs the interrupts for the DBCs to the interrupt normally used for MHI. Unfortunately, this means that the interrupt handlers for every DBC and MHI wake up for every interrupt that arrives; however, the DBC threaded irq handlers only are started when work to be done is detected (MHI will always start its threaded handler).”…””}”(hj`h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÝh³hÇh´K1hjAh²hubhÞ)”}”(hŒæIf the DBC is configured to force MSI interrupts, this can circumvent the software IRQ storm mitigation mentioned above. Since the MSI is shared it is never disabled, allowing each new entry to the FIFO to trigger a new interrupt.”h]”hŒæIf the DBC is configured to force MSI interrupts, this can circumvent the software IRQ storm mitigation mentioned above. Since the MSI is shared it is never disabled, allowing each new entry to the FIFO to trigger a new interrupt.”…””}”(hjnh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÝh³hÇh´K9hjAh²hubeh}”(h]”Œsingle-msi-mode”ah ]”h"]”Œsingle msi mode”ah$]”h&]”uh1hÈhhíh²hh³hÇh´K*ubeh}”(h]”Œ interrupts”ah ]”h"]”Œ interrupts”ah$]”h&]”uh1hÈhhÊh²hh³hÇh´K ubhÉ)”}”(hhh]”(hÎ)”}”(hŒ%Neural Network Control (NNC) Protocol”h]”hŒ%Neural Network Control (NNC) Protocol”…””}”(hjh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÍhjŒh²hh³hÇh´K?ubhÞ)”}”(hX¡The implementation of NNC is split between the KMD (QAIC) and UMD. In general, QAIC understands how to encode/decode NNC wire protocol, and elements of the protocol which requires kernel space knowledge to process (for example, mapping host memory to device IOVAs). QAIC understands the structure of a message, and all of the transactions. QAIC does not understand commands (the payload of a passthrough transaction).”h]”hX¡The implementation of NNC is split between the KMD (QAIC) and UMD. In general, QAIC understands how to encode/decode NNC wire protocol, and elements of the protocol which requires kernel space knowledge to process (for example, mapping host memory to device IOVAs). QAIC understands the structure of a message, and all of the transactions. QAIC does not understand commands (the payload of a passthrough transaction).”…””}”(hjh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÝh³hÇh´KAhjŒh²hubhÞ)”}”(hŒßQAIC handles and enforces the required little endianness and 64-bit alignment, to the degree that it can. Since QAIC does not know the contents of a passthrough transaction, it relies on the UMD to satisfy the requirements.”h]”hŒßQAIC handles and enforces the required little endianness and 64-bit alignment, to the degree that it can. Since QAIC does not know the contents of a passthrough transaction, it relies on the UMD to satisfy the requirements.”…””}”(hj«h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÝh³hÇh´KHhjŒh²hubhÞ)”}”(hXÜThe terminate transaction is of particular use to QAIC. QAIC is not aware of the resources that are loaded onto a device since the majority of that activity occurs within NNC commands. As a result, QAIC does not have the means to roll back userspace activity. To ensure that a userspace client's resources are fully released in the case of a process crash, or a bug, QAIC uses the terminate command to let QSM know when a user has gone away, and the resources can be released.”h]”hXÞThe terminate transaction is of particular use to QAIC. QAIC is not aware of the resources that are loaded onto a device since the majority of that activity occurs within NNC commands. As a result, QAIC does not have the means to roll back userspace activity. To ensure that a userspace client’s resources are fully released in the case of a process crash, or a bug, QAIC uses the terminate command to let QSM know when a user has gone away, and the resources can be released.”…””}”(hj¹h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÝh³hÇh´KLhjŒh²hubhÞ)”}”(hŒzQSM can report a version number of the NNC protocol it supports. This is in the form of a Major number and a Minor number.”h]”hŒzQSM can report a version number of the NNC protocol it supports. This is in the form of a Major number and a Minor number.”…””}”(hjÇh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÝh³hÇh´KThjŒh²hubhÞ)”}”(hŒzMajor number updates indicate changes to the NNC protocol which impact the message format, or transactions (impacts QAIC).”h]”hŒzMajor number updates indicate changes to the NNC protocol which impact the message format, or transactions (impacts QAIC).”…””}”(hjÕh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÝh³hÇh´KWhjŒh²hubhÞ)”}”(hŒkMinor number updates indicate changes to the NNC protocol which impact the commands (does not impact QAIC).”h]”hŒkMinor number updates indicate changes to the NNC protocol which impact the commands (does not impact QAIC).”…””}”(hjãh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÝh³hÇh´KZhjŒh²hubeh}”(h]”Œ#neural-network-control-nnc-protocol”ah ]”h"]”Œ%neural network control (nnc) protocol”ah$]”h&]”uh1hÈhhÊh²hh³hÇh´K?ubhÉ)”}”(hhh]”(hÎ)”}”(hŒuAPI”h]”hŒuAPI”…””}”(hjüh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÍhjùh²hh³hÇh´K^ubhÞ)”}”(hŒQAIC creates an accel device per physical PCIe device. This accel device exists for as long as the PCIe device is known to Linux.”h]”hŒQAIC creates an accel device per physical PCIe device. This accel device exists for as long as the PCIe device is known to Linux.”…””}”(hj h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÝh³hÇh´K`hjùh²hubhÞ)”}”(hX+The PCIe device may not be in the state to accept requests from userspace at all times. QAIC will trigger KOBJ_ONLINE/OFFLINE uevents to advertise when the device can accept requests (ONLINE) and when the device is no longer accepting requests (OFFLINE) because of a reset or other state transition.”h]”hX+The PCIe device may not be in the state to accept requests from userspace at all times. QAIC will trigger KOBJ_ONLINE/OFFLINE uevents to advertise when the device can accept requests (ONLINE) and when the device is no longer accepting requests (OFFLINE) because of a reset or other state transition.”…””}”(hjh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÝh³hÇh´Kchjùh²hubhÞ)”}”(hŒMQAIC defines a number of driver specific IOCTLs as part of the userspace API.”h]”hŒMQAIC defines a number of driver specific IOCTLs as part of the userspace API.”…””}”(hj&h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÝh³hÇh´Khhjùh²hubhŒdefinition_list”“”)”}”(hhh]”(hŒdefinition_list_item”“”)”}”(hŒ¤DRM_IOCTL_QAIC_MANAGE This IOCTL allows userspace to send a NNC request to the QSM. The call will block until a response is received, or the request has timed out. ”h]”(hŒterm”“”)”}”(hŒDRM_IOCTL_QAIC_MANAGE”h]”hŒDRM_IOCTL_QAIC_MANAGE”…””}”(hjAh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j?h³hÇh´Klhj;ubhŒ definition”“”)”}”(hhh]”hÞ)”}”(hŒThis IOCTL allows userspace to send a NNC request to the QSM. The call will block until a response is received, or the request has timed out.”h]”hŒThis IOCTL allows userspace to send a NNC request to the QSM. The call will block until a response is received, or the request has timed out.”…””}”(hjTh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÝh³hÇh´KkhjQubah}”(h]”h ]”h"]”h$]”h&]”uh1jOhj;ubeh}”(h]”h ]”h"]”h$]”h&]”uh1j9h³hÇh´Klhj6ubj:)”}”(hX"DRM_IOCTL_QAIC_CREATE_BO This IOCTL allows userspace to allocate a buffer object (BO) which can send or receive data from a workload. The call will return a GEM handle that represents the allocated buffer. The BO is not usable until it has been sliced (see DRM_IOCTL_QAIC_ATTACH_SLICE_BO). ”h]”(j@)”}”(hŒDRM_IOCTL_QAIC_CREATE_BO”h]”hŒDRM_IOCTL_QAIC_CREATE_BO”…””}”(hjrh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j?h³hÇh´KrhjnubjP)”}”(hhh]”hÞ)”}”(hXThis IOCTL allows userspace to allocate a buffer object (BO) which can send or receive data from a workload. The call will return a GEM handle that represents the allocated buffer. The BO is not usable until it has been sliced (see DRM_IOCTL_QAIC_ATTACH_SLICE_BO).”h]”hXThis IOCTL allows userspace to allocate a buffer object (BO) which can send or receive data from a workload. The call will return a GEM handle that represents the allocated buffer. The BO is not usable until it has been sliced (see DRM_IOCTL_QAIC_ATTACH_SLICE_BO).”…””}”(hjƒh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÝh³hÇh´Kohj€ubah}”(h]”h ]”h"]”h$]”h&]”uh1jOhjnubeh}”(h]”h ]”h"]”h$]”h&]”uh1j9h³hÇh´Krhj6h²hubj:)”}”(hŒwDRM_IOCTL_QAIC_MMAP_BO This IOCTL allows userspace to prepare an allocated BO to be mmap'd into the userspace process. ”h]”(j@)”}”(hŒDRM_IOCTL_QAIC_MMAP_BO”h]”hŒDRM_IOCTL_QAIC_MMAP_BO”…””}”(hj¡h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j?h³hÇh´KvhjubjP)”}”(hhh]”hÞ)”}”(hŒ_This IOCTL allows userspace to prepare an allocated BO to be mmap'd into the userspace process.”h]”hŒaThis IOCTL allows userspace to prepare an allocated BO to be mmap’d into the userspace process.”…””}”(hj²h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÝh³hÇh´Kuhj¯ubah}”(h]”h ]”h"]”h$]”h&]”uh1jOhjubeh}”(h]”h ]”h"]”h$]”h&]”uh1j9h³hÇh´Kvhj6h²hubj:)”}”(hX;DRM_IOCTL_QAIC_ATTACH_SLICE_BO This IOCTL allows userspace to slice a BO in preparation for sending the BO to the device. Slicing is the operation of describing what portions of a BO get sent where to a workload. This requires a set of DMA transfers for the DMA Bridge, and as such, locks the BO to a specific DBC. ”h]”(j@)”}”(hŒDRM_IOCTL_QAIC_ATTACH_SLICE_BO”h]”hŒDRM_IOCTL_QAIC_ATTACH_SLICE_BO”…””}”(hjÐh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j?h³hÇh´K|hjÌubjP)”}”(hhh]”hÞ)”}”(hXThis IOCTL allows userspace to slice a BO in preparation for sending the BO to the device. Slicing is the operation of describing what portions of a BO get sent where to a workload. This requires a set of DMA transfers for the DMA Bridge, and as such, locks the BO to a specific DBC.”h]”hXThis IOCTL allows userspace to slice a BO in preparation for sending the BO to the device. Slicing is the operation of describing what portions of a BO get sent where to a workload. This requires a set of DMA transfers for the DMA Bridge, and as such, locks the BO to a specific DBC.”…””}”(hjáh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÝh³hÇh´KyhjÞubah}”(h]”h ]”h"]”h$]”h&]”uh1jOhjÌubeh}”(h]”h ]”h"]”h$]”h&]”uh1j9h³hÇh´K|hj6h²hubj:)”}”(hŒñDRM_IOCTL_QAIC_EXECUTE_BO This IOCTL allows userspace to submit a set of sliced BOs to the device. The call is non-blocking. Success only indicates that the BOs have been queued to the device, but does not guarantee they have been executed. ”h]”(j@)”}”(hŒDRM_IOCTL_QAIC_EXECUTE_BO”h]”hŒDRM_IOCTL_QAIC_EXECUTE_BO”…””}”(hjÿh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j?h³hÇh´KhjûubjP)”}”(hhh]”hÞ)”}”(hŒÖThis IOCTL allows userspace to submit a set of sliced BOs to the device. The call is non-blocking. Success only indicates that the BOs have been queued to the device, but does not guarantee they have been executed.”h]”hŒÖThis IOCTL allows userspace to submit a set of sliced BOs to the device. The call is non-blocking. Success only indicates that the BOs have been queued to the device, but does not guarantee they have been executed.”…””}”(hjh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÝh³hÇh´Khj ubah}”(h]”h ]”h"]”h$]”h&]”uh1jOhjûubeh}”(h]”h ]”h"]”h$]”h&]”uh1j9h³hÇh´Khj6h²hubj:)”}”(hX DRM_IOCTL_QAIC_PARTIAL_EXECUTE_BO This IOCTL operates like DRM_IOCTL_QAIC_EXECUTE_BO, but it allows userspace to shrink the BOs sent to the device for this specific call. If a BO typically has N inputs, but only a subset of those is available, this IOCTL allows userspace to indicate that only the first M bytes of the BO should be sent to the device to minimize data transfer overhead. This IOCTL dynamically recomputes the slicing, and therefore has some processing overhead before the BOs can be queued to the device. ”h]”(j@)”}”(hŒ!DRM_IOCTL_QAIC_PARTIAL_EXECUTE_BO”h]”hŒ!DRM_IOCTL_QAIC_PARTIAL_EXECUTE_BO”…””}”(hj.h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j?h³hÇh´KŠhj*ubjP)”}”(hhh]”hÞ)”}”(hXæThis IOCTL operates like DRM_IOCTL_QAIC_EXECUTE_BO, but it allows userspace to shrink the BOs sent to the device for this specific call. If a BO typically has N inputs, but only a subset of those is available, this IOCTL allows userspace to indicate that only the first M bytes of the BO should be sent to the device to minimize data transfer overhead. This IOCTL dynamically recomputes the slicing, and therefore has some processing overhead before the BOs can be queued to the device.”h]”hXæThis IOCTL operates like DRM_IOCTL_QAIC_EXECUTE_BO, but it allows userspace to shrink the BOs sent to the device for this specific call. If a BO typically has N inputs, but only a subset of those is available, this IOCTL allows userspace to indicate that only the first M bytes of the BO should be sent to the device to minimize data transfer overhead. This IOCTL dynamically recomputes the slicing, and therefore has some processing overhead before the BOs can be queued to the device.”…””}”(hj?h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÝh³hÇh´K„hj<ubah}”(h]”h ]”h"]”h$]”h&]”uh1jOhj*ubeh}”(h]”h ]”h"]”h$]”h&]”uh1j9h³hÇh´KŠhj6h²hubj:)”}”(hŒëDRM_IOCTL_QAIC_WAIT_BO This IOCTL allows userspace to determine when a particular BO has been processed by the device. The call will block until either the BO has been processed and can be re-queued to the device, or a timeout occurs. ”h]”(j@)”}”(hŒDRM_IOCTL_QAIC_WAIT_BO”h]”hŒDRM_IOCTL_QAIC_WAIT_BO”…””}”(hj]h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j?h³hÇh´KhjYubjP)”}”(hhh]”hÞ)”}”(hŒÓThis IOCTL allows userspace to determine when a particular BO has been processed by the device. The call will block until either the BO has been processed and can be re-queued to the device, or a timeout occurs.”h]”hŒÓThis IOCTL allows userspace to determine when a particular BO has been processed by the device. The call will block until either the BO has been processed and can be re-queued to the device, or a timeout occurs.”…””}”(hjnh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÝh³hÇh´Khjkubah}”(h]”h ]”h"]”h$]”h&]”uh1jOhjYubeh}”(h]”h ]”h"]”h$]”h&]”uh1j9h³hÇh´Khj6h²hubj:)”}”(hŒìDRM_IOCTL_QAIC_PERF_STATS_BO This IOCTL allows userspace to collect performance statistics on the most recent execution of a BO. This allows userspace to construct an end to end timeline of the BO processing for a performance analysis. ”h]”(j@)”}”(hŒDRM_IOCTL_QAIC_PERF_STATS_BO”h]”hŒDRM_IOCTL_QAIC_PERF_STATS_BO”…””}”(hjŒh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j?h³hÇh´K”hjˆubjP)”}”(hhh]”hÞ)”}”(hŒÎThis IOCTL allows userspace to collect performance statistics on the most recent execution of a BO. This allows userspace to construct an end to end timeline of the BO processing for a performance analysis.”h]”hŒÎThis IOCTL allows userspace to collect performance statistics on the most recent execution of a BO. This allows userspace to construct an end to end timeline of the BO processing for a performance analysis.”…””}”(hjh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÝh³hÇh´K’hjšubah}”(h]”h ]”h"]”h$]”h&]”uh1jOhjˆubeh}”(h]”h ]”h"]”h$]”h&]”uh1j9h³hÇh´K”hj6h²hubj:)”}”(hXwDRM_IOCTL_QAIC_DETACH_SLICE_BO This IOCTL allows userspace to remove the slicing information from a BO that was originally provided by a call to DRM_IOCTL_QAIC_ATTACH_SLICE_BO. This is the inverse of DRM_IOCTL_QAIC_ATTACH_SLICE_BO. The BO must be idle for DRM_IOCTL_QAIC_DETACH_SLICE_BO to be called. After a successful detach slice operation the BO may have new slicing information attached with a new call to DRM_IOCTL_QAIC_ATTACH_SLICE_BO. After detach slice, the BO cannot be executed until after a new attach slice operation. Combining attach slice and detach slice calls allows userspace to use a BO with multiple workloads. ”h]”(j@)”}”(hŒDRM_IOCTL_QAIC_DETACH_SLICE_BO”h]”hŒDRM_IOCTL_QAIC_DETACH_SLICE_BO”…””}”(hj»h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j?h³hÇh´Kžhj·ubjP)”}”(hhh]”hÞ)”}”(hXWThis IOCTL allows userspace to remove the slicing information from a BO that was originally provided by a call to DRM_IOCTL_QAIC_ATTACH_SLICE_BO. This is the inverse of DRM_IOCTL_QAIC_ATTACH_SLICE_BO. The BO must be idle for DRM_IOCTL_QAIC_DETACH_SLICE_BO to be called. After a successful detach slice operation the BO may have new slicing information attached with a new call to DRM_IOCTL_QAIC_ATTACH_SLICE_BO. After detach slice, the BO cannot be executed until after a new attach slice operation. Combining attach slice and detach slice calls allows userspace to use a BO with multiple workloads.”h]”hXWThis IOCTL allows userspace to remove the slicing information from a BO that was originally provided by a call to DRM_IOCTL_QAIC_ATTACH_SLICE_BO. This is the inverse of DRM_IOCTL_QAIC_ATTACH_SLICE_BO. The BO must be idle for DRM_IOCTL_QAIC_DETACH_SLICE_BO to be called. After a successful detach slice operation the BO may have new slicing information attached with a new call to DRM_IOCTL_QAIC_ATTACH_SLICE_BO. After detach slice, the BO cannot be executed until after a new attach slice operation. Combining attach slice and detach slice calls allows userspace to use a BO with multiple workloads.”…””}”(hjÌh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÝh³hÇh´K—hjÉubah}”(h]”h ]”h"]”h$]”h&]”uh1jOhj·ubeh}”(h]”h ]”h"]”h$]”h&]”uh1j9h³hÇh´Kžhj6h²hubeh}”(h]”h ]”h"]”h$]”h&]”uh1j4hjùh²hh³hÇh´Nubeh}”(h]”Œuapi”ah ]”h"]”Œuapi”ah$]”h&]”uh1hÈhhÊh²hh³hÇh´K^ubhÉ)”}”(hhh]”(hÎ)”}”(hŒUserspace Client Isolation”h]”hŒUserspace Client Isolation”…””}”(hj÷h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÍhjôh²hh³hÇh´K¡ubhÞ)”}”(hXAIC100 supports multiple clients. Multiple DBCs can be consumed by a single client, and multiple clients can each consume one or more DBCs. Workloads may contain sensitive information therefore only the client that owns the workload should be allowed to interface with the DBC.”h]”hXAIC100 supports multiple clients. Multiple DBCs can be consumed by a single client, and multiple clients can each consume one or more DBCs. Workloads may contain sensitive information therefore only the client that owns the workload should be allowed to interface with the DBC.”…””}”(hjh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÝh³hÇh´K£hjôh²hubhÞ)”}”(hŒèClients are identified by the instance associated with their open(). A client may only use memory they allocate, and DBCs that are assigned to their workloads. Attempts to access resources assigned to other clients will be rejected.”h]”hŒèClients are identified by the instance associated with their open(). A client may only use memory they allocate, and DBCs that are assigned to their workloads. Attempts to access resources assigned to other clients will be rejected.”…””}”(hjh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÝh³hÇh´K¨hjôh²hubeh}”(h]”Œuserspace-client-isolation”ah ]”h"]”Œuserspace client isolation”ah$]”h&]”uh1hÈhhÊh²hh³hÇh´K¡ubhÉ)”}”(hhh]”(hÎ)”}”(hŒModule parameters”h]”hŒModule parameters”…””}”(hj,h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÍhj)h²hh³hÇh´K®ubhÞ)”}”(hŒ.QAIC supports the following module parameters:”h]”hŒ.QAIC supports the following module parameters:”…””}”(hj:h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÝh³hÇh´K°hj)h²hubhÞ)”}”(hŒ**datapath_polling (bool)**”h]”hŒstrong”“”)”}”(hjJh]”hŒdatapath_polling (bool)”…””}”(hjNh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jLhjHubah}”(h]”h ]”h"]”h$]”h&]”uh1hÝh³hÇh´K²hj)h²hubhÞ)”}”(hŒÒConfigures QAIC to use a polling thread for datapath events instead of relying on the device interrupts. Useful for platforms with broken multiMSI. Must be set at QAIC driver initialization. Default is 0 (off).”h]”hŒÒConfigures QAIC to use a polling thread for datapath events instead of relying on the device interrupts. Useful for platforms with broken multiMSI. Must be set at QAIC driver initialization. Default is 0 (off).”…””}”(hjah²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÝh³hÇh´K´hj)h²hubhÞ)”}”(hŒ!**mhi_timeout_ms (unsigned int)**”h]”jM)”}”(hjqh]”hŒmhi_timeout_ms (unsigned int)”…””}”(hjsh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jLhjoubah}”(h]”h ]”h"]”h$]”h&]”uh1hÝh³hÇh´K¸hj)h²hubhÞ)”}”(hŒ‘Sets the timeout value for MHI operations in milliseconds (ms). Must be set at the time the driver detects a device. Default is 2000 (2 seconds).”h]”hŒ‘Sets the timeout value for MHI operations in milliseconds (ms). Must be set at the time the driver detects a device. Default is 2000 (2 seconds).”…””}”(hj†h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÝh³hÇh´Kºhj)h²hubhÞ)”}”(hŒ)**control_resp_timeout_s (unsigned int)**”h]”jM)”}”(hj–h]”hŒ%control_resp_timeout_s (unsigned int)”…””}”(hj˜h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jLhj”ubah}”(h]”h ]”h"]”h$]”h&]”uh1hÝh³hÇh´K½hj)h²hubhÞ)”}”(hŒ¤Sets the timeout value for QSM responses to NNC messages in seconds (s). Must be set at the time the driver is sending a request to QSM. Default is 60 (one minute).”h]”hŒ¤Sets the timeout value for QSM responses to NNC messages in seconds (s). Must be set at the time the driver is sending a request to QSM. Default is 60 (one minute).”…””}”(hj«h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÝh³hÇh´K¿hj)h²hubhÞ)”}”(hŒ/**wait_exec_default_timeout_ms (unsigned int)**”h]”jM)”}”(hj»h]”hŒ+wait_exec_default_timeout_ms (unsigned int)”…””}”(hj½h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jLhj¹ubah}”(h]”h ]”h"]”h$]”h&]”uh1hÝh³hÇh´KÃhj)h²hubhÞ)”}”(hŒÔSets the default timeout for the wait_exec ioctl in milliseconds (ms). Must be set prior to the waic_exec ioctl call. A value specified in the ioctl call overrides this for that call. Default is 5000 (5 seconds).”h]”hŒÔSets the default timeout for the wait_exec ioctl in milliseconds (ms). Must be set prior to the waic_exec ioctl call. A value specified in the ioctl call overrides this for that call. Default is 5000 (5 seconds).”…””}”(hjÐh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÝh³hÇh´KÅhj)h²hubhÞ)”}”(hŒ,**datapath_poll_interval_us (unsigned int)**”h]”jM)”}”(hjàh]”hŒ(datapath_poll_interval_us (unsigned int)”…””}”(hjâh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jLhjÞubah}”(h]”h ]”h"]”h$]”h&]”uh1hÝh³hÇh´KÉhj)h²hubhÞ)”}”(hŒ“Sets the polling interval in microseconds (us) when datapath polling is active. Takes effect at the next polling interval. Default is 100 (100 us).”h]”hŒ“Sets the polling interval in microseconds (us) when datapath polling is active. Takes effect at the next polling interval. Default is 100 (100 us).”…””}”(hjõh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÝh³hÇh´KËhj)h²hubhÞ)”}”(hŒ$**timesync_delay_ms (unsigned int)**”h]”jM)”}”(hjh]”hŒ timesync_delay_ms (unsigned int)”…””}”(hjh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jLhjubah}”(h]”h ]”h"]”h$]”h&]”uh1hÝh³hÇh´KÎhj)h²hubhÞ)”}”(hŒsSets the time interval in milliseconds (ms) between two consecutive timesync operations. Default is 1000 (1000 ms).”h]”hŒsSets the time interval in milliseconds (ms) between two consecutive timesync operations. Default is 1000 (1000 ms).”…””}”(hjh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÝh³hÇh´KÐhj)h²hubeh}”(h]”Œmodule-parameters”ah ]”h"]”Œmodule parameters”ah$]”h&]”uh1hÈhhÊh²hh³hÇh´K®ubeh}”(h]”Œ qaic-driver”ah ]”h"]”Œ qaic driver”ah$]”h&]”uh1hÈhhh²hh³hÇh´Kubeh}”(h]”h ]”h"]”h$]”h&]”Œsource”hÇuh1hŒcurrent_source”NŒ current_line”NŒsettings”Œdocutils.frontend”ŒValues”“”)”}”(hÍNŒ generator”NŒ datestamp”NŒ source_link”NŒ source_url”NŒ toc_backlinks”Œentry”Œfootnote_backlinks”KŒ sectnum_xform”KŒstrip_comments”NŒstrip_elements_with_classes”NŒ strip_classes”NŒ report_level”KŒ halt_level”KŒexit_status_level”KŒdebug”NŒwarning_stream”NŒ traceback”ˆŒinput_encoding”Œ utf-8-sig”Œinput_encoding_error_handler”Œstrict”Œoutput_encoding”Œutf-8”Œoutput_encoding_error_handler”j[Œerror_encoding”Œutf-8”Œerror_encoding_error_handler”Œbackslashreplace”Œ language_code”Œen”Œrecord_dependencies”NŒconfig”NŒ id_prefix”hŒauto_id_prefix”Œid”Œ dump_settings”NŒdump_internals”NŒdump_transforms”NŒdump_pseudo_xml”NŒexpose_internals”NŒstrict_visitor”NŒ_disable_config”NŒ_source”hÇŒ _destination”NŒ _config_files”]”Œ7/var/lib/git/docbuild/linux/Documentation/docutils.conf”aŒfile_insertion_enabled”ˆŒ raw_enabled”KŒline_length_limit”M'Œpep_references”NŒ pep_base_url”Œhttps://peps.python.org/”Œpep_file_url_template”Œpep-%04d”Œrfc_references”NŒ rfc_base_url”Œ&https://datatracker.ietf.org/doc/html/”Œ tab_width”KŒtrim_footnote_reference_space”‰Œsyntax_highlight”Œlong”Œ smart_quotes”ˆŒsmartquotes_locales”]”Œcharacter_level_inline_markup”‰Œdoctitle_xform”‰Œ docinfo_xform”KŒsectsubtitle_xform”‰Œ image_loading”Œlink”Œembed_stylesheet”‰Œcloak_email_addresses”ˆŒsection_self_link”‰Œenv”NubŒreporter”NŒindirect_targets”]”Œsubstitution_defs”}”Œsubstitution_names”}”Œrefnames”}”Œrefids”}”Œnameids”}”(j5j2j‰j†j>j;jj~jöjójñjîj&j#j-j*uŒ nametypes”}”(j5‰j‰‰j>‰j‰jö‰jñ‰j&‰j-‰uh}”(j2hÊj†híj;hþj~jAjójŒjîjùj#jôj*j)uŒ footnote_refs”}”Œ citation_refs”}”Œ autofootnotes”]”Œautofootnote_refs”]”Œsymbol_footnotes”]”Œsymbol_footnote_refs”]”Œ footnotes”]”Œ citations”]”Œautofootnote_start”KŒsymbol_footnote_start”KŒ id_counter”Œ collections”ŒCounter”“”}”…”R”Œparse_messages”]”Œtransform_messages”]”Œ transformer”NŒ include_log”]”Œ decoration”Nh²hub.