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 vp_oca_defs.h 24 //! \brief Definition of structures and functions for debugging VPHAL 25 //! \details This file contains the definition of structures and functions for 26 //! surface dumper, hw state dumper, perf counter dumper, and render 27 //! parameter dumper 28 //! 29 #ifndef __VPHAL_DEBUG_DEFS_H__ 30 #define __VPHAL_DEBUG_DEFS_H__ 31 32 struct VPHAL_OCA_LOG_HEADER 33 { 34 uint32_t size; //!< Size of valid data occupied, which is used when filling OCA buffer. 35 uint32_t allocSize; //!< Size of allocation. Only used for buffer reusing. This value in OCA 36 //!< buffer is invalid. 37 }; 38 39 struct VPHAL_OCA_SURFACE_INFO 40 { 41 MOS_FORMAT Format; //!< Surface format 42 VPHAL_SURFACE_TYPE SurfType; //!< Surface type (context) 43 VPHAL_SAMPLE_TYPE SampleType; //!< Interlaced/Progressive sample type 44 VPHAL_CSPACE ColorSpace; //!< Color Space 45 VPHAL_SCALING_MODE ScalingMode; //!< Scaling Mode 46 MOS_TILE_TYPE TileType; //!< Tile Type 47 uint32_t dwWidth; //!< Surface width 48 uint32_t dwHeight; //!< Surface height 49 uint32_t dwPitch; //!< Surface pitch 50 RECT rcSrc; //!< Source rectangle 51 RECT rcDst; //!< Destination rectangle 52 }; 53 54 struct VPHAL_OCA_TARGET_INFO 55 { 56 VPHAL_OCA_SURFACE_INFO surfInfo; 57 58 struct 59 { 60 bool bValid; 61 VPHAL_HDR_PARAMS params; 62 } HDRParams; 63 }; 64 65 struct VPHAL_OCA_SOURCE_INFO 66 { 67 VPHAL_OCA_SURFACE_INFO surfInfo; 68 VPHAL_ROTATION Rotation; //!< 0: 0 degree, 1: 90 degree, 2: 180 degree, 3: 270 degree 69 int32_t iPalette; //!< Palette Allocation 70 VPHAL_PALETTE PaletteParams; 71 72 struct 73 { 74 bool bValid; 75 VPHAL_BLENDING_PARAMS params; 76 } BlendingParams; 77 78 struct 79 { 80 bool bValid; 81 VPHAL_LUMAKEY_PARAMS params; 82 } LumaKeyParams; 83 84 struct 85 { 86 bool bValid; 87 VPHAL_PROCAMP_PARAMS params; 88 } ProcampParams; 89 90 struct 91 { 92 bool bValid; 93 float fIEFFactor; 94 VPHAL_IEF_PARAMS params; 95 } IEFParams; 96 97 struct 98 { 99 bool bValid; 100 VPHAL_DI_PARAMS params; 101 } DIParams; 102 103 struct 104 { 105 bool bValid; 106 VPHAL_DENOISE_PARAMS params; 107 } DNParams; 108 109 struct 110 { 111 bool bValid; 112 VPHAL_COLORPIPE_PARAMS params; 113 } ColorPipeParams; 114 115 struct 116 { 117 bool bValid; 118 uint32_t uBwdRefCount; 119 } BwdRefInfo; 120 121 struct 122 { 123 bool bValid; 124 uint32_t uFwdRefCount; 125 } FwdRefInfo; 126 127 struct 128 { 129 bool bValid; 130 VPHAL_HDR_PARAMS params; 131 } HDRParams; 132 }; 133 134 struct VPHAL_OCA_RENDER_PARAM 135 { 136 VPHAL_OCA_LOG_HEADER Header; 137 MOS_COMPONENT Component; //!< DDI component 138 int32_t FrameID; 139 int32_t Pid; 140 struct 141 { 142 bool bValid; 143 VPHAL_COLORFILL_PARAMS params; 144 } ColorFillParams; 145 146 uint32_t uSrcCount; //!< Number of sources 147 uint32_t uSrcCountDumped; //!< Number of source info to be dumped into OCA buffer. 148 //!< This value is used to avoid OCA buffer log section overflow. 149 uint32_t uDstCount; //!< Number of targets 150 uint32_t uDstCountDumped; //!< Number of target info to be dumped into OCA buffer. 151 //!< This value is used to avoid OCA buffer log section overflow. 152 // Followed by VPHAL_OCA_SOURCE_INFO list and VPHAL_OCA_TARGET_INFO list. 153 }; 154 #endif // #ifndef __VPHAL_DEBUG_DEFS_H__