linux/drivers/gpu/drm/amd/include/mes_v12_api_def.h

/*
 * Copyright 2023 Advanced Micro Devices, Inc.
 *
 * Permission is hereby granted, free of charge, to any person obtaining a
 * copy of this software and associated documentation files (the "Software"),
 * to deal in the Software without restriction, including without limitation
 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
 * and/or sell copies of the Software, and to permit persons to whom the
 * Software is furnished to do so, subject to the following conditions:
 *
 * The above copyright notice and this permission notice shall be included in
 * all copies or substantial portions of the Software.
 *
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
 * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR
 * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
 * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
 * OTHER DEALINGS IN THE SOFTWARE.
 *
 */

#ifndef __MES_API_DEF_H__
#define __MES_API_DEF_H__

#pragma pack(push, 8)

#define MES_API_VERSION

/* Maximum log buffer size for MES. Needs to be updated if MES expands MES_EVT_INTR_HIST_LOG_12 */
#define AMDGPU_MES_LOG_BUFFER_SIZE

/* Driver submits one API(cmd) as a single Frame and this command size is same for all API
 * to ease the debugging and parsing of ring buffer.
 */
enum {};

/* To avoid command in scheduler context to be overwritten whenenver mutilple interrupts come in,
 * this creates another queue
 */
enum {};

enum MES_API_TYPE {};

enum MES_SCH_API_OPCODE {};

MES_API_HEADER;

enum MES_AMD_PRIORITY_LEVEL {};

enum MES_QUEUE_TYPE {};

struct MES_API_STATUS {};


enum {};
enum {};
enum {};

enum {};
enum {};
enum {};
enum {};


enum {};

enum VM_HUB_TYPE {};

enum {};

enum {};
enum {};

enum SET_DEBUG_VMID_OPERATIONS {};

enum MES_MS_LOG_CONTEXT_STATE {};

enum MES_MS_LOG_OPERATION {};

struct MES_LOG_CONTEXT_STATE_CHANGE {};

struct MES_LOG_QUEUE_NEW_WORK {};

struct MES_LOG_QUEUE_UNWAIT_SYNC_OBJECT {};

struct MES_LOG_QUEUE_NO_MORE_WORK {};

struct MES_LOG_QUEUE_WAIT_SYNC_OBJECT {};

struct MES_LOG_ENTRY_HEADER {};

struct MES_LOG_ENTRY_DATA {};

struct MES_LOG_BUFFER {};

enum MES_SWIP_TO_HWIP_DEF {};

MESAPI_SET_HW_RESOURCES;

MESAPI_SET_HW_RESOURCES_1;

MESAPI__ADD_QUEUE;

MESAPI__REMOVE_QUEUE;

MESAPI__SET_SCHEDULING_CONFIG;

MESAPI__PERFORM_YIELD;

MESAPI__CHANGE_GANG_PRIORITY_LEVEL;

MESAPI__SUSPEND;

MESAPI__RESUME;

MESAPI__RESET;

MESAPI__SET_LOGGING_BUFFER;

enum MES_API_QUERY_MES_OPCODE {};

enum {};

struct MES_API_QUERY_MES__CTX_ARRAY_SIZE {};

struct MES_API_QUERY_MES__HEALTHY_CHECK {};

MESAPI__QUERY_MES_STATUS;

MESAPI__SET_DEBUG_VMID;

enum MESAPI_MISC_OPCODE {};

enum {};

struct WRITE_REG {};

struct READ_REG {};

struct INV_GART {};

struct QUERY_STATUS {};

enum WRM_OPERATION {};

struct WAIT_REG_MEM {};

struct SET_SHADER_DEBUGGER {};

struct SET_GANG_SUBMIT {};

MESAPI__MISC;

MESAPI__UPDATE_ROOT_PAGE_TABLE;

MESAPI_AMD_LOG;

enum MES_SE_MODE {};

MESAPI__SET_SE_MODE;

MESAPI__SET_GANG_SUBMIT;

#pragma pack(pop)

#endif