From c7f82fffeb5b2c004631bd6e9f9fe6a5f05fc50e Mon Sep 17 00:00:00 2001 From: Gu_Peiyi Date: Fri, 22 Nov 2024 12:04:57 +0800 Subject: [PATCH] [Media Common] [VP] Add OCL FC Perf Tag and MCP PerfTag add perf tags --- .../common/shared/mediacopy/media_copy_common.h | 6 +++--- .../common/vp/hal/features/vp_ocl_fc_filter.cpp | 16 ++++++++++------ .../common/vp/hal/features/vp_ocl_fc_filter.h | 2 +- 3 files changed, 14 insertions(+), 10 deletions(-) diff --git a/media_softlet/agnostic/common/shared/mediacopy/media_copy_common.h b/media_softlet/agnostic/common/shared/mediacopy/media_copy_common.h index 723dc60564f..42c63f604d9 100644 --- a/media_softlet/agnostic/common/shared/mediacopy/media_copy_common.h +++ b/media_softlet/agnostic/common/shared/mediacopy/media_copy_common.h @@ -46,9 +46,9 @@ #define BLT_ASSERTMESSAGE(_message, ...) MOS_ASSERTMESSAGE(MOS_COMPONENT_MCPY, MOS_MCPY_SUBCOMP_BLT, _message, ##__VA_ARGS__) #define BLT_BITS_PER_BYTE 8 -#define VEBOX_COPY 0x700 -#define RENDER_COPY 0x701 -#define BLT_COPY 0x702 +#define VEBOX_COPY ((uint32_t)(VPHAL_MCP_VEBOX_COPY)) +#define RENDER_COPY ((uint32_t)(VPHAL_MCP_RENDER_COPY)) +#define BLT_COPY ((uint32_t)(VPHAL_MCP_BLT_COPY)) #define SINGLE_PLANE 0x1 #define TWO_PLANES 0x2 diff --git a/media_softlet/agnostic/common/vp/hal/features/vp_ocl_fc_filter.cpp b/media_softlet/agnostic/common/vp/hal/features/vp_ocl_fc_filter.cpp index 4ad6f57c1a1..cbdf73e4527 100644 --- a/media_softlet/agnostic/common/vp/hal/features/vp_ocl_fc_filter.cpp +++ b/media_softlet/agnostic/common/vp/hal/features/vp_ocl_fc_filter.cpp @@ -243,7 +243,7 @@ MOS_STATUS VpOclFcFilter::InitKrnParams(OCL_FC_KERNEL_PARAMS &krnParams, SwFilte VP_RENDER_CHK_STATUS_RETURN(GenerateFcCommonKrnParam(compParam, param)); } //Set Perf Tag should be called after Generate Krn Param - VP_PUBLIC_CHK_STATUS_RETURN(SetPerfTag(compParam, param.kernelConfig.perfTag)); + VP_PUBLIC_CHK_STATUS_RETURN(SetPerfTag(compParam, isFastExpressSupported, param.kernelConfig.perfTag)); krnParams.push_back(param); // convert from PL3 output surface to intermedia surface @@ -3178,7 +3178,7 @@ void VpOclFcFilter::PrintFastExpressKrnParam(OCL_FC_FP_KRN_IMAGE_PARAM &imagePar #endif } -MOS_STATUS VpOclFcFilter::SetPerfTag(OCL_FC_COMP_PARAM &compParam, VPHAL_PERFTAG &perfTag) +MOS_STATUS VpOclFcFilter::SetPerfTag(OCL_FC_COMP_PARAM &compParam, bool isFastExpress, VPHAL_PERFTAG &perfTag) { bool rotation = false; bool primary = false; @@ -3195,17 +3195,21 @@ MOS_STATUS VpOclFcFilter::SetPerfTag(OCL_FC_COMP_PARAM &compParam, VPHAL_PERFTAG rotation = true; } } - if (rotation) + if (isFastExpress) { - perfTag = VPHAL_PERFTAG(VPHAL_ROT + compParam.layerNumber - 1); + perfTag = rotation ? VPHAL_PERFTAG(VPHAL_OCL_FC_FP_ROT) : VPHAL_PERFTAG(VPHAL_OCL_FC_FP); + } + else if (rotation) + { + perfTag = VPHAL_PERFTAG(VPHAL_OCL_FC_ROT_1LAYER + compParam.layerNumber - 1); } else if (primary) { - perfTag = VPHAL_PERFTAG(VPHAL_PRI + compParam.layerNumber - 1); + perfTag = VPHAL_PERFTAG(VPHAL_OCL_FC_PRI_1LAYER + compParam.layerNumber - 1); } else { - perfTag = VPHAL_PERFTAG(VPHAL_NONE + compParam.layerNumber); + perfTag = VPHAL_PERFTAG(VPHAL_OCL_FC_0LAYER + compParam.layerNumber); } return MOS_STATUS_SUCCESS; diff --git a/media_softlet/agnostic/common/vp/hal/features/vp_ocl_fc_filter.h b/media_softlet/agnostic/common/vp/hal/features/vp_ocl_fc_filter.h index 4698b360bd7..c61942ecca2 100644 --- a/media_softlet/agnostic/common/vp/hal/features/vp_ocl_fc_filter.h +++ b/media_softlet/agnostic/common/vp/hal/features/vp_ocl_fc_filter.h @@ -223,7 +223,7 @@ class VpOclFcFilter : public VpFilter MOS_STATUS InitKrnParams(OCL_FC_KERNEL_PARAMS &krnParam, SwFilterPipe &executingPipe); MOS_STATUS InitLayer(SwFilterPipe &executingPipe, bool isInputPipe, int index, VPHAL_SCALING_MODE defaultScalingMode, OCL_FC_LAYER_PARAM &layer); MOS_STATUS InitCompParam(SwFilterPipe &executingPipe, OCL_FC_COMP_PARAM &compParam); - MOS_STATUS SetPerfTag(OCL_FC_COMP_PARAM &compParam, VPHAL_PERFTAG &perfTag); + MOS_STATUS SetPerfTag(OCL_FC_COMP_PARAM &compParam, bool isFastExpress, VPHAL_PERFTAG &perfTag); //OCL FC common kernel MOS_STATUS GenerateFcCommonKrnParam(OCL_FC_COMP_PARAM &compParam, OCL_FC_KERNEL_PARAM ¶m);