drivers/gpu/drm/i915/gt/uc/abi/guc_messages_abi.h

Source file repositories/reference/linux-study-clean/drivers/gpu/drm/i915/gt/uc/abi/guc_messages_abi.h

File Facts

System
Linux kernel
Corpus path
drivers/gpu/drm/i915/gt/uc/abi/guc_messages_abi.h
Extension
.h
Size
13963 bytes
Lines
265
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_MESSAGES_ABI_H
#define _ABI_GUC_MESSAGES_ABI_H

/**
 * DOC: HXG Message
 *
 * All messages exchanged with GuC are defined using 32 bit dwords.
 * First dword is treated as a message header. Remaining dwords are optional.
 *
 *  +---+-------+--------------------------------------------------------------+
 *  |   | Bits  | Description                                                  |
 *  +===+=======+==============================================================+
 *  |   |       |                                                              |
 *  | 0 |    31 | **ORIGIN** - originator of the message                       |
 *  |   |       |   - _`GUC_HXG_ORIGIN_HOST` = 0                               |
 *  |   |       |   - _`GUC_HXG_ORIGIN_GUC` = 1                                |
 *  |   |       |                                                              |
 *  |   +-------+--------------------------------------------------------------+
 *  |   | 30:28 | **TYPE** - message type                                      |
 *  |   |       |   - _`GUC_HXG_TYPE_REQUEST` = 0                              |
 *  |   |       |   - _`GUC_HXG_TYPE_EVENT` = 1                                |
 *  |   |       |   - _`GUC_HXG_TYPE_FAST_REQUEST` = 2                         |
 *  |   |       |   - _`GUC_HXG_TYPE_NO_RESPONSE_BUSY` = 3                     |
 *  |   |       |   - _`GUC_HXG_TYPE_NO_RESPONSE_RETRY` = 5                    |
 *  |   |       |   - _`GUC_HXG_TYPE_RESPONSE_FAILURE` = 6                     |
 *  |   |       |   - _`GUC_HXG_TYPE_RESPONSE_SUCCESS` = 7                     |
 *  |   +-------+--------------------------------------------------------------+
 *  |   |  27:0 | **AUX** - auxiliary data (depends on TYPE)                   |
 *  +---+-------+--------------------------------------------------------------+
 *  | 1 |  31:0 |                                                              |
 *  +---+-------+                                                              |
 *  |...|       | **PAYLOAD** - optional payload (depends on TYPE)             |
 *  +---+-------+                                                              |
 *  | n |  31:0 |                                                              |
 *  +---+-------+--------------------------------------------------------------+
 */

#define GUC_HXG_MSG_MIN_LEN			1u
#define GUC_HXG_MSG_0_ORIGIN			(0x1U << 31)
#define   GUC_HXG_ORIGIN_HOST			0u
#define   GUC_HXG_ORIGIN_GUC			1u
#define GUC_HXG_MSG_0_TYPE			(0x7 << 28)
#define   GUC_HXG_TYPE_REQUEST			0u
#define   GUC_HXG_TYPE_EVENT			1u
#define   GUC_HXG_TYPE_FAST_REQUEST		2u
#define   GUC_HXG_TYPE_NO_RESPONSE_BUSY		3u
#define   GUC_HXG_TYPE_NO_RESPONSE_RETRY	5u
#define   GUC_HXG_TYPE_RESPONSE_FAILURE		6u
#define   GUC_HXG_TYPE_RESPONSE_SUCCESS		7u
#define GUC_HXG_MSG_0_AUX			(0xfffffff << 0)
#define GUC_HXG_MSG_n_PAYLOAD			(0xffffffff << 0)

/**
 * DOC: HXG Request
 *
 * The `HXG Request`_ message should be used to initiate synchronous activity
 * for which confirmation or return data is expected.
 *
 * The recipient of this message shall use `HXG Response`_, `HXG Failure`_
 * or `HXG Retry`_ message as a definite reply, and may use `HXG Busy`_
 * message as a intermediate reply.
 *
 * Format of @DATA0 and all @DATAn fields depends on the @ACTION code.
 *
 *  +---+-------+--------------------------------------------------------------+
 *  |   | Bits  | Description                                                  |
 *  +===+=======+==============================================================+
 *  | 0 |    31 | ORIGIN                                                       |
 *  |   +-------+--------------------------------------------------------------+
 *  |   | 30:28 | TYPE = GUC_HXG_TYPE_REQUEST_                                 |
 *  |   +-------+--------------------------------------------------------------+
 *  |   | 27:16 | **DATA0** - request data (depends on ACTION)                 |
 *  |   +-------+--------------------------------------------------------------+
 *  |   |  15:0 | **ACTION** - requested action code                           |
 *  +---+-------+--------------------------------------------------------------+
 *  | 1 |  31:0 |                                                              |
 *  +---+-------+                                                              |
 *  |...|       | **DATAn** - optional data (depends on ACTION)                |
 *  +---+-------+                                                              |
 *  | n |  31:0 |                                                              |
 *  +---+-------+--------------------------------------------------------------+
 */

#define GUC_HXG_REQUEST_MSG_MIN_LEN		GUC_HXG_MSG_MIN_LEN
#define GUC_HXG_REQUEST_MSG_0_DATA0		(0xfff << 16)
#define GUC_HXG_REQUEST_MSG_0_ACTION		(0xffff << 0)
#define GUC_HXG_REQUEST_MSG_n_DATAn		GUC_HXG_MSG_n_PAYLOAD

/**
 * DOC: HXG Fast Request

Annotation

Implementation Notes