[PATCH 1/2] drm/xe/guc: Add VF_STATE_NOTIFY and VF_CONTROL to ABI

Piotr Piórkowski piotr.piorkowski at intel.com
Thu Mar 28 08:43:47 UTC 2024


Michal Wajdeczko <michal.wajdeczko at intel.com> wrote on wto [2024-mar-26 20:15:17 +0100]:
> In upcoming patches the PF driver will add support to handle the
> GUC2PF_VF_STATE_NOTIFY events and to send PF2GUC_VF_CONTROL request
> messages.  Add necessary definitions to our GuC firmware ABI header.

double space

> 
> Signed-off-by: Michal Wajdeczko <michal.wajdeczko at intel.com>
Reviewed-by: Piotr Piórkowski <piotr.piorkowski at intel.com>
> ---
>  .../gpu/drm/xe/abi/guc_actions_sriov_abi.h    | 94 +++++++++++++++++++
>  1 file changed, 94 insertions(+)
> 
> diff --git a/drivers/gpu/drm/xe/abi/guc_actions_sriov_abi.h b/drivers/gpu/drm/xe/abi/guc_actions_sriov_abi.h
> index 5496a5890847..f4914cf8be08 100644
> --- a/drivers/gpu/drm/xe/abi/guc_actions_sriov_abi.h
> +++ b/drivers/gpu/drm/xe/abi/guc_actions_sriov_abi.h
> @@ -171,4 +171,98 @@
>  #define VF2GUC_RELAY_TO_PF_REQUEST_MSG_n_RELAY_DATAx	GUC_HXG_REQUEST_MSG_n_DATAn
>  #define VF2GUC_RELAY_TO_PF_REQUEST_MSG_NUM_RELAY_DATA	GUC_RELAY_MSG_MAX_LEN
>  
> +/**
> + * DOC: GUC2PF_VF_STATE_NOTIFY
> + *
> + * The GUC2PF_VF_STATE_NOTIFY message is used by the GuC to notify PF about change
> + * of the VF state.
> + *
> + * This G2H message is sent as `CTB HXG Message`_.
> + *
> + *  +---+-------+--------------------------------------------------------------+
> + *  |   | Bits  | Description                                                  |
> + *  +===+=======+==============================================================+
> + *  | 0 |    31 | ORIGIN = GUC_HXG_ORIGIN_GUC_                                 |
> + *  |   +-------+--------------------------------------------------------------+
> + *  |   | 30:28 | TYPE = GUC_HXG_TYPE_EVENT_                                   |
> + *  |   +-------+--------------------------------------------------------------+
> + *  |   | 27:16 | DATA0 = MBZ                                                  |
> + *  |   +-------+--------------------------------------------------------------+
> + *  |   |  15:0 | ACTION = _`GUC_ACTION_GUC2PF_VF_STATE_NOTIFY` = 0x5106       |
> + *  +---+-------+--------------------------------------------------------------+
> + *  | 1 |  31:0 | DATA1 = **VFID** - VF identifier                             |
> + *  +---+-------+--------------------------------------------------------------+
> + *  | 2 |  31:0 | DATA2 = **EVENT** - notification event:                      |
> + *  |   |       |                                                              |
> + *  |   |       |   - _`GUC_PF_NOTIFY_VF_ENABLE` = 1 (only if VFID = 0)        |
> + *  |   |       |   - _`GUC_PF_NOTIFY_VF_FLR` = 1                              |
> + *  |   |       |   - _`GUC_PF_NOTIFY_VF_FLR_DONE` = 2                         |
> + *  |   |       |   - _`GUC_PF_NOTIFY_VF_PAUSE_DONE` = 3                       |
> + *  |   |       |   - _`GUC_PF_NOTIFY_VF_FIXUP_DONE` = 4                       |
> + *  +---+-------+--------------------------------------------------------------+
> + */
> +#define GUC_ACTION_GUC2PF_VF_STATE_NOTIFY		0x5106u
> +
> +#define GUC2PF_VF_STATE_NOTIFY_EVENT_MSG_LEN		(GUC_HXG_EVENT_MSG_MIN_LEN + 2u)
> +#define GUC2PF_VF_STATE_NOTIFY_EVENT_MSG_0_MBZ		GUC_HXG_EVENT_MSG_0_DATA0
> +#define GUC2PF_VF_STATE_NOTIFY_EVENT_MSG_1_VFID		GUC_HXG_EVENT_MSG_n_DATAn
> +#define GUC2PF_VF_STATE_NOTIFY_EVENT_MSG_2_EVENT	GUC_HXG_EVENT_MSG_n_DATAn
> +#define   GUC_PF_NOTIFY_VF_ENABLE			1u
> +#define   GUC_PF_NOTIFY_VF_FLR				1u
> +#define   GUC_PF_NOTIFY_VF_FLR_DONE			2u
> +#define   GUC_PF_NOTIFY_VF_PAUSE_DONE			3u
> +#define   GUC_PF_NOTIFY_VF_FIXUP_DONE			4u
> +
> +/**
> + * DOC: PF2GUC_VF_CONTROL
> + *
> + * The PF2GUC_VF_CONTROL message is used by the PF to trigger VF state change
> + * maintained by the GuC.
> + *
> + * This H2G message must be sent as `CTB HXG Message`_.
> + *
> + *  +---+-------+--------------------------------------------------------------+
> + *  |   | Bits  | Description                                                  |
> + *  +===+=======+==============================================================+
> + *  | 0 |    31 | ORIGIN = GUC_HXG_ORIGIN_HOST_                                |
> + *  |   +-------+--------------------------------------------------------------+
> + *  |   | 30:28 | TYPE = GUC_HXG_TYPE_REQUEST_                                 |
> + *  |   +-------+--------------------------------------------------------------+
> + *  |   | 27:16 | DATA0 = MBZ                                                  |
> + *  |   +-------+--------------------------------------------------------------+
> + *  |   |  15:0 | ACTION = _`GUC_ACTION_PF2GUC_VF_CONTROL_CMD` = 0x5506        |
> + *  +---+-------+--------------------------------------------------------------+
> + *  | 1 |  31:0 | DATA1 = **VFID** - VF identifier                             |
> + *  +---+-------+--------------------------------------------------------------+
> + *  | 2 |  31:0 | DATA2 = **COMMAND** - control command:                       |
> + *  |   |       |                                                              |
> + *  |   |       |   - _`GUC_PF_TRIGGER_VF_PAUSE` = 1                           |
> + *  |   |       |   - _`GUC_PF_TRIGGER_VF_RESUME` = 2                          |
> + *  |   |       |   - _`GUC_PF_TRIGGER_VF_STOP` = 3                            |
> + *  |   |       |   - _`GUC_PF_TRIGGER_VF_FLR_START` = 4                       |
> + *  |   |       |   - _`GUC_PF_TRIGGER_VF_FLR_FINISH` = 5                      |
> + *  +---+-------+--------------------------------------------------------------+
> + *
> + *  +---+-------+--------------------------------------------------------------+
> + *  |   | Bits  | Description                                                  |
> + *  +===+=======+==============================================================+
> + *  | 0 |    31 | ORIGIN = GUC_HXG_ORIGIN_GUC_                                 |
> + *  |   +-------+--------------------------------------------------------------+
> + *  |   | 30:28 | TYPE = GUC_HXG_TYPE_RESPONSE_SUCCESS_                        |
> + *  |   +-------+--------------------------------------------------------------+
> + *  |   |  27:0 | DATA0 = MBZ                                                  |
> + *  +---+-------+--------------------------------------------------------------+
> + */
> +#define GUC_ACTION_PF2GUC_VF_CONTROL			0x5506u
> +
> +#define PF2GUC_VF_CONTROL_REQUEST_MSG_LEN		(GUC_HXG_EVENT_MSG_MIN_LEN + 2u)
> +#define PF2GUC_VF_CONTROL_REQUEST_MSG_0_MBZ		GUC_HXG_EVENT_MSG_0_DATA0
> +#define PF2GUC_VF_CONTROL_REQUEST_MSG_1_VFID		GUC_HXG_EVENT_MSG_n_DATAn
> +#define PF2GUC_VF_CONTROL_REQUEST_MSG_2_COMMAND		GUC_HXG_EVENT_MSG_n_DATAn
> +#define   GUC_PF_TRIGGER_VF_PAUSE			1u
> +#define   GUC_PF_TRIGGER_VF_RESUME			2u
> +#define   GUC_PF_TRIGGER_VF_STOP			3u
> +#define   GUC_PF_TRIGGER_VF_FLR_START			4u
> +#define   GUC_PF_TRIGGER_VF_FLR_FINISH			5u
> +
>  #endif
> -- 
> 2.43.0
> 

-- 


More information about the Intel-xe mailing list