Skip to content

Commit 9a686a2

Browse files
jiafengy1intel-mediadev
authored andcommittedMar 6, 2025
[VP] WA for HW bug Tile64
OCL FC Fast Pass Issue Due to HW Bug WA Tile64
1 parent f601ee6 commit 9a686a2

File tree

2 files changed

+20
-7
lines changed

2 files changed

+20
-7
lines changed
 

‎media_softlet/agnostic/common/vp/hal/features/vp_ocl_fc_filter.cpp

+18-5
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@ enum class OclFcDiffReportShift
5252
FormatRGB565Write = 8, //legacy FC will drop (16 - 5/6/5) of LSB
5353
BT2020ColorFill = 9, //legacy didn't support color fill w/ BT2020 as target color space. It will use black or green as background in legacy
5454
ChromaSitingOnPL3 = 10, //legacy didn't support 3 plane chromasiting CDS. So legacy FC will only do left top for PL3 output
55+
FallBackTile64 = 11, //Fall back to common path as fast express not support tile64 output
5556
FastExpress = 16, //walked into fastexpress path
5657
OclFcEnabled = 31 //actually walked into Ocl FC. Always set to 1 when Ocl FC Filter take effect. "OCL FC Enabled" may be 1 but not walked into OCL FC, cause it may fall back in wrapper class
5758
};
@@ -191,13 +192,13 @@ MOS_STATUS VpOclFcFilter::InitKrnParams(OCL_FC_KERNEL_PARAMS &krnParams, SwFilte
191192
VP_FUNC_CALL();
192193

193194
krnParams.clear();
194-
195+
bool isFallbackForTile64 = false;
195196
OCL_FC_COMP_PARAM compParam = {};
196197
VP_RENDER_CHK_STATUS_RETURN(InitCompParam(executingPipe, compParam));
197-
bool isFastExpressSupported = FastExpressConditionMeet(compParam);
198+
bool isFastExpressSupported = FastExpressConditionMeet(compParam, isFallbackForTile64);
198199
PrintCompParam(compParam);
199200
ReportFeatureLog(compParam);
200-
ReportDiffLog(compParam, isFastExpressSupported);
201+
ReportDiffLog(compParam, isFastExpressSupported, isFallbackForTile64);
201202

202203
OCL_FC_KERNEL_PARAM param = {};
203204
// convert from PL3 input surface to intermedia surface
@@ -2760,7 +2761,7 @@ MOS_STATUS VpOclFcFilter::ConvertColorFillToKrnParam(bool enableColorFill, VPHAL
27602761

27612762
return MOS_STATUS_SUCCESS;
27622763
}
2763-
bool VpOclFcFilter::FastExpressConditionMeet(const OCL_FC_COMP_PARAM &compParam)
2764+
bool VpOclFcFilter::FastExpressConditionMeet(const OCL_FC_COMP_PARAM &compParam, bool &isFallbackForTile64)
27642765
{
27652766
#if (_DEBUG || _RELEASE_INTERNAL)
27662767
if (m_pvpMhwInterface &&
@@ -2833,6 +2834,13 @@ bool VpOclFcFilter::FastExpressConditionMeet(const OCL_FC_COMP_PARAM &compParam)
28332834
return false;
28342835
}
28352836

2837+
if (outputSurf->osSurface->TileModeGMM == MOS_TILE_64_GMM)
2838+
{
2839+
isFallbackForTile64 = true;
2840+
VP_PUBLIC_NORMALMESSAGE("Ouput Tile64, fallback common pass");
2841+
return false;
2842+
}
2843+
28362844
return true;
28372845
}
28382846

@@ -3375,7 +3383,7 @@ void VpOclFcFilter::PrintKrnTargetParam(OCL_FC_KRN_TARGET_PARAM &targetParam)
33753383
#endif
33763384
}
33773385

3378-
void VpOclFcFilter::ReportDiffLog(const OCL_FC_COMP_PARAM &compParam, bool isFastExpressSupported)
3386+
void VpOclFcFilter::ReportDiffLog(const OCL_FC_COMP_PARAM &compParam, bool isFastExpressSupported, bool isFallbackForTile64)
33793387
{
33803388
VP_FUNC_CALL();
33813389
#if (_DEBUG || _RELEASE_INTERNAL)
@@ -3492,6 +3500,11 @@ void VpOclFcFilter::ReportDiffLog(const OCL_FC_COMP_PARAM &compParam, bool isFas
34923500
reportLog |= (1llu << int(OclFcDiffReportShift::FastExpress));
34933501
}
34943502

3503+
if (isFallbackForTile64)
3504+
{
3505+
reportLog |= (1llu << int(OclFcDiffReportShift::FallBackTile64));
3506+
}
3507+
34953508
//actually walked into OCL FC. Always set to 1 when OCL FC Filter take effect. "OCL FC Enabled" may be 1 but not walked into OCL FC, cause it may fall back in wrapper class
34963509
reportLog |= (1llu << int(OclFcDiffReportShift::OclFcEnabled));
34973510

‎media_softlet/agnostic/common/vp/hal/features/vp_ocl_fc_filter.h

+2-2
Original file line numberDiff line numberDiff line change
@@ -284,11 +284,11 @@ class VpOclFcFilter : public VpFilter
284284
void PrintKrnParam(std::vector<OCL_FC_KRN_IMAGE_PARAM> &imageParams, OCL_FC_KRN_TARGET_PARAM &targetParam);
285285
void PrintKrnImageParam(uint32_t index, OCL_FC_KRN_IMAGE_PARAM &imageParam);
286286
void PrintKrnTargetParam(OCL_FC_KRN_TARGET_PARAM &targetParam);
287-
void ReportDiffLog(const OCL_FC_COMP_PARAM &compParam, bool isFastExpressSupported);
287+
void ReportDiffLog(const OCL_FC_COMP_PARAM &compParam, bool isFastExpressSupported, bool isFallbackForTile64);
288288
void ReportFeatureLog(const OCL_FC_COMP_PARAM &compParam);
289289

290290
//OCL FC FastExpress
291-
bool FastExpressConditionMeet(const OCL_FC_COMP_PARAM &compParam);
291+
bool FastExpressConditionMeet(const OCL_FC_COMP_PARAM &compParam, bool &isFallbackForTile64);
292292
MOS_STATUS GenerateFcFastExpressKrnParam(OCL_FC_COMP_PARAM &compParam, OCL_FC_KERNEL_PARAM &param);
293293
MOS_STATUS GenerateFastExpressInputOutputParam(OCL_FC_COMP_PARAM &compParam, OCL_FC_FP_KRN_IMAGE_PARAM &imageParam, OCL_FC_FP_KRN_TARGET_PARAM &targetParam);
294294
MOS_STATUS SetupSingleFcFastExpressKrnArg(uint32_t layerNum, OCL_FC_FP_KRN_IMAGE_PARAM &imageParams, OCL_FC_FP_KRN_TARGET_PARAM &targetParam, uint32_t localSize[3], uint32_t globalSize[3], KRN_ARG &krnArg, bool &bInit);

0 commit comments

Comments
 (0)