drivers/gpu/drm/xe/abi/guc_relay_actions_abi.h

Source file repositories/reference/linux-study-clean/drivers/gpu/drm/xe/abi/guc_relay_actions_abi.h

File Facts

System
Linux kernel
Corpus path
drivers/gpu/drm/xe/abi/guc_relay_actions_abi.h
Extension
.h
Size
13594 bytes
Lines
248
Domain
Driver Families
Bucket
drivers/gpu
Inferred role
Driver Families: implementation source
Status
source implementation candidate

Why This File Exists

Repeatable hardware-adapter layer. Deep compatibility for every driver is out of scope; this atlas records patterns, probe lifecycles, bus glue, IRQ/DMA usage, and links back to core abstractions.

Dependency Surface

Detected Declarations

Annotated Snippet

#ifndef _ABI_GUC_RELAY_ACTIONS_ABI_H_
#define _ABI_GUC_RELAY_ACTIONS_ABI_H_

#include "abi/guc_relay_communication_abi.h"

/**
 * DOC: GuC Relay VF/PF ABI Version
 *
 * The _`GUC_RELAY_VERSION_BASE` defines minimum VF/PF ABI version that
 * drivers must support. Currently this is version 1.0.
 *
 * The _`GUC_RELAY_VERSION_LATEST` defines latest VF/PF ABI version that
 * drivers may use. Currently this is version 1.0.
 *
 * Some platforms may require different base VF/PF ABI version.
 * No supported VF/PF ABI version can be 0.0.
 */

#define GUC_RELAY_VERSION_BASE_MAJOR			1
#define GUC_RELAY_VERSION_BASE_MINOR			0

#define GUC_RELAY_VERSION_LATEST_MAJOR			1
#define GUC_RELAY_VERSION_LATEST_MINOR			0

/**
 * DOC: GuC Relay Actions
 *
 * The following actions are supported from VF/PF ABI version 1.0:
 *
 *  * `VF2PF_HANDSHAKE`_
 *  * `VF2PF_QUERY_RUNTIME`_
 */

/**
 * DOC: VF2PF_HANDSHAKE
 *
 * This `Relay Message`_ is used by the VF to establish ABI version with the PF.
 *
 * Prior to exchanging any other messages, both VF driver and PF driver must
 * negotiate the VF/PF ABI version that will be used in their communication.
 *
 * The VF driver shall use @MAJOR and @MINOR fields to pass requested ABI version.
 * The VF driver may use special version 0.0 (both @MAJOR and @MINOR set to 0)
 * to request latest (or any) ABI version that is supported by the PF driver.
 *
 * This message definition shall be supported by all future ABI versions.
 * This message definition shall not be changed by future ABI versions.
 *
 *  +---+-------+--------------------------------------------------------------+
 *  |   | Bits  | Description                                                  |
 *  +===+=======+==============================================================+
 *  | 0 |    31 | ORIGIN = GUC_HXG_ORIGIN_HOST_                                |
 *  |   +-------+--------------------------------------------------------------+
 *  |   | 30:28 | TYPE = GUC_HXG_TYPE_REQUEST_                                 |
 *  |   +-------+--------------------------------------------------------------+
 *  |   | 27:16 | DATA0 = MBZ                                                  |
 *  |   +-------+--------------------------------------------------------------+
 *  |   |  15:0 | ACTION = _`GUC_RELAY_ACTION_VF2PF_HANDSHAKE` = 0x0001        |
 *  +---+-------+--------------------------------------------------------------+
 *  | 1 | 31:16 | **MAJOR** - requested major version of the VFPF interface    |
 *  |   |       | (use MAJOR_ANY to request latest version supported by PF)    |
 *  |   +-------+--------------------------------------------------------------+
 *  |   |  15:0 | **MINOR** - requested minor version of the VFPF interface    |
 *  |   |       | (use MINOR_ANY to request latest version supported by PF)    |
 *  +---+-------+--------------------------------------------------------------+
 *
 *  +---+-------+--------------------------------------------------------------+
 *  |   | Bits  | Description                                                  |
 *  +===+=======+==============================================================+
 *  | 0 |    31 | ORIGIN = GUC_HXG_ORIGIN_HOST_                                |
 *  |   +-------+--------------------------------------------------------------+
 *  |   | 30:28 | TYPE = GUC_HXG_TYPE_RESPONSE_SUCCESS_                        |
 *  |   +-------+--------------------------------------------------------------+
 *  |   |  27:0 | DATA0 = MBZ                                                  |
 *  +---+-------+--------------------------------------------------------------+
 *  | 1 | 31:16 | **MAJOR** - agreed major version of the VFPF interface       |
 *  |   +-------+--------------------------------------------------------------+
 *  |   |  15:0 | **MINOR** - agreed minor version of the VFPF interface       |
 *  +---+-------+--------------------------------------------------------------+
 */
#define GUC_RELAY_ACTION_VF2PF_HANDSHAKE		0x0001u

#define VF2PF_HANDSHAKE_REQUEST_MSG_LEN			2u
#define VF2PF_HANDSHAKE_REQUEST_MSG_0_MBZ		GUC_HXG_REQUEST_MSG_0_DATA0
#define VF2PF_HANDSHAKE_REQUEST_MSG_1_MAJOR		(0xffffu << 16)
#define   VF2PF_HANDSHAKE_MAJOR_ANY			0
#define VF2PF_HANDSHAKE_REQUEST_MSG_1_MINOR		(0xffffu << 0)
#define   VF2PF_HANDSHAKE_MINOR_ANY			0

#define VF2PF_HANDSHAKE_RESPONSE_MSG_LEN		2u

Annotation

Implementation Notes