1 /*============================================================================== 2 Copyright(c) 2017 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 Name: UmKmDmaPerfTimer.h 24 ** 25 ** Description: 26 ** Contains perftag class and subtype codes used by km dma timer. 27 ** 28 ==============================================================================*/ 29 #pragma once 30 31 #if defined (LHDM) || defined(KM_PERF_CONTROLLER_BUILD) || defined(_PERF_REPORT) 32 #include "UmKmEnum.h" 33 #endif 34 #include <stdint.h> 35 // Set packing alignment 36 #pragma pack(push, 1) 37 38 #ifdef __cplusplus 39 extern "C" { 40 #endif 41 42 43 //=========================================================================== 44 // typedef: 45 // PERF_DATA 46 // 47 // Description: 48 // 49 //--------------------------------------------------------------------------- 50 typedef struct _PERF_DATA 51 { 52 union 53 { 54 struct 55 { 56 uint32_t dmaBufID : 16; 57 uint32_t frameID : 8; 58 uint32_t bufferID : 4; 59 uint32_t batchBufID : 4; 60 }; 61 62 uint32_t PerfTag; 63 }; 64 } PERF_DATA; 65 66 //=========================================================================== 67 // enum: 68 // PERFTAG_CLASS_ENUM 69 // 70 // Description: 71 // PerfTag class cmd buffer classification. 72 // 73 //--------------------------------------------------------------------------- 74 //-------------------------------------------------------------------------------- 75 // IMPORTANT NOTE: Please DONOT change the existing perftag values in below enum. 76 // If adding a new perf tag, assign a new value 77 //-------------------------------------------------------------------------------- 78 typedef enum PERFTAG_CLASS_ENUM 79 { 80 PERFTAG_ALL = 0x0000, // Used for capturing all (perfcontroller) 81 PERFTAG_KMD = 0x1000, 82 PERFTAG_3D = 0x2000, 83 PERFTAG_DECODE = 0x3000, // Media Decoding 84 PERFTAG_DXVA2 = 0x4000, 85 PERFTAG_LIBVA = 0x5000, 86 PERFTAG_ENCODE = 0x6000, // Media Encoding 87 PERFTAG_DXVAHD = 0x7000, 88 PERFTAG_DXVA1 = 0x8000, 89 PERFTAG_VPREP = 0x9000, 90 PERFTAG_CM = 0xA000, // C for media 91 PERFTAG_WIDI = 0xB000, 92 PERFTAG_OCL = 0xC000, // OpenCL 93 PERFTAG_PXP = 0xD000, // PXP 94 PERFTAG_DXVA11 = 0xE000, // DX11 Video 95 PERFTAG_FRAME_CAPTURE = 0xF000, // Gfx Frame Capture 96 PERFTAG_FRAME_CAPTURE_NV12 = 0xF100, // Gfx Frame Capture with NV12 output 97 PERFTAG_FRAME_CAPTURE_RGB8 = 0xF200, // Gfx Frame Capture with RGB8 output 98 PERFTAG_UNKNOWN = 0x0FFF 99 }PERFTAG_CLASS; 100 101 #define PERFTAG_SUBTYPE(PerfTag) ( PerfTag & (ULONG)0x00000FFF ) // Bits[0,11] Usage component specific 102 #define GET_PERFTAG_CLASS(PerfTag) ( PerfTag & (ULONG)0x0000F000 ) // Bits[12,15] 103 #define PERFTAG_CLASS_AND_SUBTYPE(PerfTag) ( PerfTag & (ULONG)0x0000FFFF ) // Bits[0,15] 104 #define PERFTAG_UNKNOWN_BITS(PerfTag) ( PerfTag & (ULONG)0xFFFF0000 ) // Bits[16,31] Usage component specific 105 #define PERFTAG_FRAMEID(PerfTag) ( PerfTag & (ULONG)0x00FF0000 ) // Bits[16,23] Media Specific - frame id 106 #define PERFTAG_BUFFERID(PerfTag) ( PerfTag & (ULONG)0x0F000000 ) // Bits[24,27] Media Specific - buffer id 107 #define PERFTAG_BATCHBUFFERID(PerfTag) ( PerfTag & (ULONG)0xF0000000 ) // Bits[28,31] Media Specific - batch buffer id 108 #define PERFTAG_FRAMEID_SHIFT 16 109 #define PERFTAG_BUFFERID_SHIFT 24 110 #define PERFTAG_BATCHBUFFERID_SHIFT 28 111 112 //=========================================================================== 113 // enum: 114 // VPHAL_PERFTAG 115 // 116 // Description: 117 // Video Postprocessing perftag sub type. 118 // NOTE: 119 // Please follow instructions in below enum when adding new perf tag values. 120 // Sub Tags (bits 11:0). 121 // When adding new perf tag values, please update 122 // Source\miniport\LHDM\KmPerfTools\PerfController\PerfReportGenerator.h 123 // with the string. 124 //--------------------------------------------------------------------------- 125 typedef enum _VPHAL_PERFTAG 126 { 127 // No pri video 128 VPHAL_NONE = 0x0, 129 VPHAL_1LAYER , 130 VPHAL_2LAYERS, 131 VPHAL_3LAYERS, 132 VPHAL_4LAYERS, 133 VPHAL_5LAYERS, 134 VPHAL_6LAYERS, 135 VPHAL_7LAYERS, 136 VPHAL_8LAYERS, 137 // ADD NEW TAGS FOR NO PRI-VIDEO CASE HERE 138 139 // pri video present 140 VPHAL_PRI = 0x10, 141 VPHAL_PRI_1LAYER, 142 VPHAL_PRI_2LAYERS, 143 VPHAL_PRI_3LAYERS, 144 VPHAL_PRI_4LAYERS, 145 VPHAL_PRI_5LAYERS, 146 VPHAL_PRI_6LAYERS, 147 VPHAL_PRI_7LAYERS, 148 VPHAL_PRI_8LAYERS, 149 // ADD NEW TAGS FOR PRI-VIDEO CASE HERE 150 151 // video rotation present 152 VPHAL_ROT = 0x20, 153 VPHAL_ROT_1LAYER, 154 VPHAL_ROT_2LAYERS, 155 VPHAL_ROT_3LAYERS, 156 VPHAL_ROT_4LAYERS, 157 VPHAL_ROT_5LAYERS, 158 VPHAL_ROT_6LAYERS, 159 VPHAL_ROT_7LAYERS, 160 VPHAL_ROT_8LAYERS, 161 162 // PERFTAGs for AdvProc using VEBOX 163 VPHAL_PA_DI_PA = 0x100, 164 VPHAL_PA_DN_PA, 165 VPHAL_PA_DNUV_PA, 166 VPHAL_PA_DNDI_PA, 167 VPHAL_PA_DI_422CP, 168 VPHAL_PA_DN_422CP, 169 VPHAL_PA_DNDI_422CP, 170 VPHAL_PA_422CP, 171 VPHAL_PA_DN_420CP, 172 VPHAL_PA_420CP, 173 VPHAL_PA_DN_RGB32CP, 174 VPHAL_PA_RGB32CP, 175 176 VPHAL_PL_DI_PA, 177 VPHAL_PL_DI_422CP, 178 179 VPHAL_NV12_DN_NV12, 180 VPHAL_NV12_DNUV_NV12, 181 VPHAL_NV12_DNDI_PA, 182 VPHAL_NV12_DN_420CP, 183 VPHAL_NV12_DN_422CP, 184 VPHAL_NV12_DNDI_422CP, 185 VPHAL_NV12_420CP, 186 VPHAL_NV12_422CP, 187 VPHAL_NV12_DN_RGB32CP, 188 VPHAL_NV12_RGB32CP, 189 190 VPHAL_PL3_DN_PL3, 191 VPHAL_PL3_DNUV_PL3, 192 VPHAL_PL3_DNDI_PA, 193 VPHAL_PL3_DN_422CP, 194 VPHAL_PL3_DNDI_422CP, 195 VPHAL_PL3_422CP, 196 197 VPHAL_VEBOX_RESERVED1, 198 VPHAL_VEBOX_UPDATE_DN_STATE, 199 VPHAL_VEBOX_ACE, 200 VPHAL_VEBOX_FMD_VAR, 201 202 VPHAL_VEBOX_P010, 203 VPHAL_VEBOX_P016, 204 VPHAL_VEBOX_P210, 205 VPHAL_VEBOX_P216, 206 VPHAL_VEBOX_Y210, 207 VPHAL_VEBOX_Y216, 208 VPHAL_VEBOX_Y410, 209 VPHAL_VEBOX_Y416, 210 211 // PERFTAGs for AdvProc using Render 212 VPHAL_ISTAB_PH1_PLY_PLY = 0x200, 213 VPHAL_ISTAB_PH1_PA_PLY, 214 VPHAL_ISTAB_PH2_ME_BS_ATOMIC, 215 VPHAL_ISTAB_PH3_GMC_BS_ATOMIC, 216 VPHAL_ISTAB_PH4_NV12_NV12_BS, 217 VPHAL_ISTAB_PH4_PA_PA_BS, 218 219 VPHAL_FRC_COPY, 220 VPHAL_FRC_WIDE_SCREEN_DETECTION, 221 VPHAL_FRC_PYRAMIDAL_SCALING, 222 VPHAL_FRC_MOTION_ESTIMATION_L3, 223 VPHAL_FRC_MV_VOTING_L3, 224 VPHAL_FRC_MOTION_ESTIMATION_L2, 225 VPHAL_FRC_MV_VOTING_L2, 226 VPHAL_FRC_MOTION_ESTIMATION_L1, 227 VPHAL_FRC_MV_VOTING_L1, 228 VPHAL_FRC_GMV, 229 VPHAL_FRC_MV_SANITY_CHECK, 230 VPHAL_FRC_GRADIENT_Y, 231 VPHAL_FRC_GRADIENT_UV, 232 VPHAL_FRC_TEMPORAL_DIFF, 233 VPHAL_FRC_SPD_MAP, 234 VPHAL_FRC_CLEAN_MAP, 235 VPHAL_FRC_MOTION_COMP, 236 237 VPHAL_DRDB_NV12_DERING_NV12, 238 VPHAL_DRDB_NV12_HDEBLOCK_NV12, 239 VPHAL_DRDB_NV12_VDEBLOCK_NV12, 240 241 VPHAL_3P, 242 243 VPHAL_DPROTATION_NV12_NV12, 244 VPHAL_DPROTATION_NV12_AVG, 245 VPHAL_DPROTATION_NV12_REP, 246 247 VPHAL_LACE_HIST_SUM, 248 VPHAL_LACE_STD, 249 VPHAL_LACE_PWLF, 250 VPHAL_LACE_LUT, 251 252 VPHAL_EU3DLUT, 253 254 // Capture pipe present 255 VPHAL_CP = 0x300, 256 VPHAL_CP_BAYER8, 257 VPHAL_CP_BAYER16, 258 VPHAL_CP_LGCA_PH1_CALCPARAMS, 259 VPHAL_CP_LGCA_PH2_GEOCORRECTION, 260 261 // Hdr 262 VPHAL_HDR_GENERIC = 0x400, 263 VPHAL_HDR_1LAYER, 264 VPHAL_HDR_2LAYERS, 265 VPHAL_HDR_3LAYERS, 266 VPHAL_HDR_4LAYERS, 267 VPHAL_HDR_5LAYERS, 268 VPHAL_HDR_6LAYERS, 269 VPHAL_HDR_7LAYERS, 270 VPHAL_HDR_8LAYERS, 271 VPHAL_HDR_AUTO_PER_FRAME_STATE, 272 273 // Fdfb - FD 274 VPHAL_FDFB_FD_DOWNSCALE = 0x500, 275 VPHAL_FDFB_FD_MLBP, 276 VPHAL_FDFB_FD_CASCADE, 277 VPHAL_FDFB_FD_CASCADE1, 278 VPHAL_FDFB_FD_DOWNSCALE_NOT_FULLY_ENQUEUE, 279 VPHAL_FDFB_FD_MLBP_NOT_FULLY_ENQUEUE, 280 VPHAL_FDFB_FD_CASCADE_NOT_FULLY_ENQUEUE, 281 VPHAL_FDFB_FD_CASCADE1_NOT_FULLY_ENQUEUE, 282 VPHAL_FDFB_FD_MERGE, 283 VPHAL_FDFB_FD_MERGE1, 284 285 // Fdfb - FLD 286 VPHAL_FDFB_FLD_CAL_GAUSSIAN_WEIGHT = 0x510, 287 VPHAL_FDFB_FLD_PREPROCESSING, 288 VPHAL_FDFB_FLD_RESIZE, 289 VPHAL_FDFB_FLD_EXTRACT_FEATURE_GET_LANDMARK, 290 VPHAL_FDFB_FLD_POST_PROCESSING, 291 VPHAL_FDFB_FLD_VALIDATOR, 292 VPHAL_FDFB_ELD_PREPROCESSING, 293 VPHAL_FDFB_ELD_GET_LANDMARK, 294 VPHAL_FDFB_ELD_POST_PROCESSING, 295 VPHAL_FDFB_ELD_FILTERING, 296 297 // Fdfb - FB 298 VPHAL_FDFB_FB_VEBOX_SKIN_MAP = 0x520, 299 VPHAL_FDFB_FB_CMK_AVERAGE_FILTER, 300 VPHAL_FDFB_FB_CMK_PROCESSING, 301 VPHAL_FDFB_FB_SMOOTHER, 302 VPHAL_FDFB_FB_SKIN_BLENDER, 303 VPHAL_FDFB_FB_CMK_FOUNDATION, 304 VPHAL_FDFB_FB_CAL_REGIONS, 305 VPHAL_FDFB_FB_CMK_BLUSH_MAP, 306 VPHAL_FDFB_FB_CMK_EYE_CIRCLES, 307 VPHAL_FDFB_FB_SMOOTHER_SKIN_ROI_BLENDER_0, 308 VPHAL_FDFB_FB_SMOOTHER_SKIN_ROI_BLENDER_1, 309 VPHAL_FDFB_FB_RED_LIP_CURVE_1, 310 VPHAL_FDFB_FB_RED_LIP_CURVE_2, 311 VPHAL_FDFB_FB_RED_LIP_CURVE_3, 312 VPHAL_FDFB_FB_RED_LIP_CURVE_4, 313 VPHAL_FDFB_FB_REFINE_LIP_MASK_1, 314 VPHAL_FDFB_FB_REFINE_LIP_MASK_2, 315 VPHAL_FDFB_FB_CMK_COLOR_LIP, 316 VPHAL_FDFB_FB_CMK_BWD_WARP_SCALING, 317 VPHAL_FDFB_FB_CMK_DATA_MOVE, 318 VPHAL_FDFB_FB_CMK_BWD_WARP, 319 VPHAL_FDFB_FB_MDF_SURFACE_COPY, 320 VPHAL_FDFB_FB_RED_LIP, 321 VPHAL_FDFB_FB_STD_GEN, 322 VPHAL_FDFB_FB_CAL_EYECURVE, 323 VPHAL_FDFB_FB_EYE_BRIGHT_PARAM_GEN, 324 VPHAL_FDFB_FB_EYE_BRIGHT, 325 VPHAL_FDFB_FB_EYE_LASH, 326 VPHAL_FDFB_FB_EYE_LINE, 327 VPHAL_FDFB_FB_TEETH_WHITEN, 328 VPHAL_FDFB_FB_EYE_SAHDOW_MASK, 329 VPHAL_FDFB_FB_EYE_SAHDOW, 330 VPHAL_FDFB_FB_EYE_COLOR, 331 332 // SR 333 VPHAL_SR_CONV_1X1_32_5, 334 VPHAL_SR_CONV_1X1_5_32, 335 VPHAL_SR_CONV_3X3, 336 VPHAL_SR_SUBPIXEL_CONV_2X2, 337 VPHAL_SR_CONV_5X5_Y8, 338 339 // ADD TAGS FOR NEW ADVPROC KRNS HERE 340 341 VPHAL_PERFTAG_MAX 342 } VPHAL_PERFTAG, *PVPHAL_PERFTAG; 343 344 345 #ifdef __cplusplus 346 } 347 #endif 348 349 // Reset packing alignment to project default 350 #pragma pack(pop) 351