| 1 |
/* |
| 2 |
* Copyright (c) 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_oca_rtlog_mgr_defs.h |
| 24 |
//! \brief Linux specific OCA struct |
| 25 |
//! |
| 26 |
|
| 27 |
#ifndef __MOS_OCA_RTLOG_MGR_DEFS_H__ |
| 28 |
#define __MOS_OCA_RTLOG_MGR_DEFS_H__ |
| 29 |
|
| 30 |
#include <cstdint> |
| 31 |
|
| 32 |
enum MOS_OCA_RTLOG_COMPONENT_TPYE |
| 33 |
{ |
| 34 |
MOS_OCA_RTLOG_COMPONENT_DECODE = 0, |
| 35 |
MOS_OCA_RTLOG_COMPONENT_VP, |
| 36 |
MOS_OCA_RTLOG_COMPONENT_ENCODE, |
| 37 |
MOS_OCA_RTLOG_COMPONENT_COMMON, |
| 38 |
MOS_OCA_RTLOG_COMPONENT_MAX |
| 39 |
}; |
| 40 |
|
| 41 |
#define MOS_OCA_RTLOG_MAGIC_NUM 0x494D5445 |
| 42 |
#define MAX_OCA_RT_SUB_SIZE 0x100 |
| 43 |
#define MAX_OCA_RT_COMMON_SUB_SIZE 0x3D00 |
| 44 |
#define MAX_OCA_RT_SIZE (MAX_OCA_RT_SUB_SIZE * (MOS_OCA_RTLOG_COMPONENT_MAX-1) + MAX_OCA_RT_COMMON_SUB_SIZE) |
| 45 |
#define MAX_OCA_RT_POOL_SIZE (MAX_OCA_RT_SIZE + MOS_PAGE_SIZE) |
| 46 |
#define MOS_OCA_RTLOG_MAX_PARAM_COUNT 1 |
| 47 |
// sizeof(int32_t)+sizeof(int64_t) is the size of MT_PARAM |
| 48 |
#define MOS_OCA_RTLOG_ENTRY_SIZE (MOS_OCA_RTLOG_MAX_PARAM_COUNT*(sizeof(int32_t)+sizeof(int64_t))+sizeof(MOS_OCA_RTLOG_HEADER)) |
| 49 |
|
| 50 |
|
| 51 |
struct MOS_OCA_RTLOG_HEAP |
| 52 |
{ |
| 53 |
void *ocaHeapCpuVa = nullptr; |
| 54 |
uint64_t ocaHeapGpuVa = 0; |
| 55 |
uint32_t offset = 0; |
| 56 |
uint32_t size = 0; |
| 57 |
}; |
| 58 |
|
| 59 |
struct MOS_OCA_RTLOG_HEADER |
| 60 |
{ |
| 61 |
uint64_t globalId = 0; |
| 62 |
uint32_t id = 0; |
| 63 |
uint32_t paramCount = 0; |
| 64 |
}; |
| 65 |
|
| 66 |
struct MOS_OCA_RTLOG_SECTION_HEADER |
| 67 |
{ |
| 68 |
uint32_t magicNum = 0; |
| 69 |
MOS_OCA_RTLOG_COMPONENT_TPYE componentType = MOS_OCA_RTLOG_COMPONENT_MAX; |
| 70 |
uint64_t freq = 0; |
| 71 |
}; |
| 72 |
|
| 73 |
#endif // #ifndef __MOS_OCA_RTLOG_MGR_DEFS_H__ |