Skip to content

Commit

Permalink
[Media Common] [VP] Add OCL FC Perf Tag and MCP PerfTag
Browse files Browse the repository at this point in the history
add perf tags
  • Loading branch information
peiyigu-intel authored and intel-mediadev committed Nov 22, 2024
1 parent d28c8f0 commit c7f82ff
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
16 changes: 10 additions & 6 deletions media_softlet/agnostic/common/vp/hal/features/vp_ocl_fc_filter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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;
Expand All @@ -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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 &param);
Expand Down

0 comments on commit c7f82ff

Please sign in to comment.