1 /* 2 * Copyright (c) 2016-2022, Intel Corporation 3 * 4 * Permission is hereby granted, free of charge, to any person obtaining a 5 * copy of this software and associated documentation files (the "Software"), 6 * to deal in the Software without restriction, including without limitation 7 * the rights to use, copy, modify, merge, publish, distribute, sublicense, 8 * and/or sell copies of the Software, and to permit persons to whom the 9 * Software is furnished to do so, subject to the following conditions: 10 * 11 * The above copyright notice and this permission notice shall be included 12 * in all copies or substantial portions of the Software. 13 * 14 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 15 * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 17 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR 18 * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, 19 * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 20 * OTHER DEALINGS IN THE SOFTWARE. 21 */ 22 //! 23 //! \file mos_os_virtualengine_specific.h 24 //! \brief Defines MOS Virtual engine Inteface for Linux. 25 //! \details Defines all types, macros, and functions required by MOS Virtual Engine Interface for Linux. 26 //! 27 28 #ifndef __MOS_OS_VIRTUALENGINE_SPECIFIC_H__ 29 #define __MOS_OS_VIRTUALENGINE_SPECIFIC_H__ 30 #include <cstdint> 31 32 typedef struct _MOS_SPECIFIC_VE_HINT_PARAMS MOS_VIRTUALENGINE_HINT_PARAMS, *PMOS_VIRTUALENGINE_HINT_PARAMS; 33 34 struct _MOS_SPECIFIC_VE_HINT_PARAMS 35 { 36 union 37 { 38 struct 39 { 40 uint32_t UsingSFC : 1; // Use SFC or not 41 uint32_t UsingFrameSplit : 1; // Frame split 42 uint32_t NeedSyncWithPrevious : 1; // Need to wait until previous submission from the same context is done 43 uint32_t NoReRunAllowed : 1; // Can't tolerate rerun 44 uint32_t SameEngineAsLastSubmission : 1; // Submit on the same engine as previous, hint only, not hard requirement 45 uint32_t HWRestrictedEngine : 1; // HW restriction to specific engine 46 uint32_t FrontEndBackEndPresent : 1; // Frame split decode 47 #if (_DEBUG || _RELEASE_INTERNAL) 48 uint32_t Reserved : 24; 49 uint32_t DebugOverride : 1; // Debug & validation usage 50 #else 51 uint32_t Reserved : 25; 52 #endif 53 }; 54 55 uint32_t Flags; 56 }; 57 58 // Number of batch buffers in frame split case (flag UsingFrameSplit is set), not used in all other cases 59 uint32_t BatchBufferCount; 60 61 // Batch buffer addresses in frame split case (flag UsingFrameSplit is set), not used in all other cases 62 MOS_RESOURCE resScalableBatchBufs[MOS_MAX_ENGINE_INSTANCE_PER_CLASS]; 63 64 // Logical engine instances to submit workload on; valid only if flag DebugOverride is set. 65 uint8_t EngineInstance[MOS_MAX_ENGINE_INSTANCE_PER_CLASS]; 66 }; 67 68 typedef struct _MOS_TEE_INPUT_OUTPUT_BUFFER_PARAMS 69 { 70 uint32_t inputlength; // input buffer length 71 uint32_t outputlength; // output buffer length 72 uint64_t inputaddress; // input buffer address 73 uint64_t outputaddress; // output buffer address 74 uint8_t MEclient; // fixed ME client 75 }MOS_TEE_INPUT_OUTPUT_BUFFER_PARAMS; 76 77 struct _MOS_CMD_BUF_ATTRI_VE 78 { 79 int32_t bUseVirtualEngineHint; 80 MOS_VIRTUALENGINE_HINT_PARAMS VEngineHintParams; 81 int32_t bTEEparamspresent; 82 MOS_TEE_INPUT_OUTPUT_BUFFER_PARAMS TEEInputOutPutParams; 83 }; 84 85 #endif //__MOS_OS_VIRTUALENGINE_SPECIFIC_H__ 86 87