/* SPDX-License-Identifier: MIT */ /* * 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 __UMSCH_MM_API_DEF_H__ #define __UMSCH_MM_API_DEF_H__ #pragma once #pragma pack(push, 4) #define UMSCH_API_VERSION … /* * 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 whenever multiple interrupts come in, * this creates another queue. */ enum { … }; enum { … }; enum UMSCH_API_TYPE { … }; enum UMSCH_MS_LOG_CONTEXT_STATE { … }; enum UMSCH_MS_LOG_OPERATION { … }; struct UMSCH_INSTANCE_DB_OFFSET { … }; struct UMSCH_LOG_CONTEXT_STATE_CHANGE { … }; struct UMSCH_LOG_QUEUE_NEW_WORK { … }; struct UMSCH_LOG_QUEUE_UNWAIT_SYNC_OBJECT { … }; struct UMSCH_LOG_QUEUE_NO_MORE_WORK { … }; struct UMSCH_LOG_QUEUE_WAIT_SYNC_OBJECT { … }; struct UMSCH_LOG_ENTRY_HEADER { … }; struct UMSCH_LOG_ENTRY_DATA { … }; struct UMSCH_LOG_BUFFER { … }; enum UMSCH_API_OPCODE { … }; UMSCH_API_HEADER; enum UMSCH_AMD_PRIORITY_LEVEL { … }; enum UMSCH_ENGINE_TYPE { … }; #define AFFINITY_DISABLE … #define AFFINITY_ENABLE … #define AFFINITY_MAX … UMSCH_AFFINITY; struct UMSCH_API_STATUS { … }; enum { … }; enum { … }; enum { … }; enum { … }; enum { … }; enum { … }; enum { … }; enum { … }; enum VM_HUB_TYPE { … }; enum { … }; enum { … }; UMSCHAPI__SET_HW_RESOURCES; static_assert(…); UMSCHAPI__SET_SCHEDULING_CONFIG; UMSCHAPI__ADD_QUEUE; UMSCHAPI__REMOVE_QUEUE; UMSCHAPI__PERFORM_YIELD; UMSCHAPI__SUSPEND; enum UMSCH_RESUME_OPTION { … }; UMSCHAPI__RESUME; enum UMSCH_RESET_OPTION { … }; UMSCHAPI__RESET; UMSCHAPI__SET_LOGGING_BUFFER; UMSCHAPI__UPDATE_AFFINITY; UMSCHAPI__CHANGE_CONTEXT_PRIORITY_LEVEL; UMSCHAPI__QUERY_UMSCH_STATUS; #pragma pack(pop) #endif