/* 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. *
*/
/* * 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 { API_FRAME_SIZE_IN_DWORDS = 64 };
/* * To avoid command in scheduler context to be overwritten whenever multiple interrupts come in, * this creates another queue.
*/ enum { API_NUMBER_OF_COMMAND_MAX = 32 };
uint32_t max_dwords_in_api[API_FRAME_SIZE_IN_DWORDS];
};
static_assert(sizeof(union UMSCHAPI__SET_HW_RESOURCES) <= API_FRAME_SIZE_IN_DWORDS * sizeof(uint32_t), "size of UMSCHAPI__SET_HW_RESOURCES must be less than 256 bytes");
union UMSCHAPI__SET_SCHEDULING_CONFIG { struct { union UMSCH_API_HEADER header; /* * Grace period when preempting another priority band for this priority band. * The value for idle priority band is ignored, as it never preempts other bands.
*/
uint64_t grace_period_other_levels[AMD_PRIORITY_NUM_LEVELS];
/* Default quantum for scheduling across processes within a priority band. */
uint64_t process_quantum_for_level[AMD_PRIORITY_NUM_LEVELS];
/* Default grace period for processes that preempt each other within a priority band. */
uint64_t process_grace_period_same_level[AMD_PRIORITY_NUM_LEVELS];
/* * For normal level this field specifies the target GPU percentage in situations * when it's starved by the high level. Valid values are between 0 and 50, * with the default being 10.
*/
uint32_t normal_yield_percent;
union UMSCHAPI__SET_LOGGING_BUFFER { struct { union UMSCH_API_HEADER header; /* There are separate log buffers for each queue type */ enum UMSCH_ENGINE_TYPE log_type; /* Log buffer GPU Address */
uint64_t logging_buffer_addr; /* Number of entries in the log buffer */
uint32_t number_of_entries; /* Entry index at which CPU interrupt needs to be signalled */
uint32_t interrupt_entry;
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.