diff --git a/Tools/MediaDriverTools/UMDPerfProfiler/CodecDbgSetting.cfg b/Tools/MediaDriverTools/UMDPerfProfiler/CodecDbgSetting.cfg new file mode 100644 index 000000000..2f9e63258 --- /dev/null +++ b/Tools/MediaDriverTools/UMDPerfProfiler/CodecDbgSetting.cfg @@ -0,0 +1,162 @@ +################################################################### +## CodecDbgSettings.cfg +## - White space should be agnostic. +## - '#' as first non-white space char denotes line as comment +## - '@frame ALL' MUST be present as the first directive, even if +## nothing is dumped for every frame. +################################################################### + +################################################################### +## key words defined under @mode ALL works for both encode & decode +################################################################### + +@mode ALL +@Frame ALL + +PicParams:1 +SlcParams:1 +SubsetsParams:0 +IqParams:0 +Bitstream:1 +DecodeBitstream:1 +#HucRegions:0 +#HucDmem:0 +CmdBufferMfx:1 +#2ndLvlBatchMfx:1 +#HuffmanTbl:0 +#ScanParams:0 +#DriverUltDump:0 +#DumpBufferInBinary:1 +#DumpToThreadFolder:1 +#DumpCmdBufInBinary:1 +StatusReport:1 + +#StreamOut:1 +#StreamIn:1 +##ResidualDifference:0 +##Deblocking:0 +#MvData:1 +#SfcOutputSurface:1 +#ReferenceSurfaces:1 +##EncodeRawInputSurface:0 +##ReconstructedSurface:0 +##PakInput:0 +##PakOutput:0 +##UpsamplingInput:0 +##ResidualSurface:0 +##StCoeff:0 +##CoeffPredCs:0 +##MbRecord:0 +##PakObjStreamOut:0 +##TileBasedStats:0 +##OverwriteCommands:0 +##ForceCmdDumpLvl:0 +##ForceCurbeDumpLvl:0 +##FrameState:0 +##BrcPakStats:0 +##CUStreamout:0 +##ImageState:0 +##SliceSizeStreamout:0 +##PakHwCoeffProbs:0 +##ROIInput:0 +##MD5HasEnable:0 +##MD5FlushInterval:0 +##MD5PicWidth:0 +##MD5PicHeight:0 + +################################################################### +## key words defined under @mode decode works for decode only +################################################################### + +@mode decode +@Frame ALL + +#SegmentParams:1 +#MbParams:1 +#Vc1Bitplane:1 +#CoefProb:1 +#SegId:1 +DecodeOutputSurface:1 +#DumpAuxsurface:1 +#DecodeProcParams:1 +DecodeBitstream:1 +############################################################### +## key words defined under @mode encode works for encode only +############################################################### + +#@mode encode +#@Frame ALL + +#FeiPicParams:0 +#SeqParams:0 +#VuiParams:0 +#DumpEncodePar:0 +#VdencOutput:0 + +############################################################### +## key words defined for kernel +############################################################### +#@Vc1Olp ALL +#@MbEncNorm ALL +#@MbEncPerf ALL +#@MbEncQlty ALL +#@IFrameDist ALL +#@32xScaling ALL +#@16xScaling ALL +#@4xScaling ALL +#@32xMe ALL +#@16xMe ALL +#@4xMe ALL +#@BrcInitReset ALL +#@BrcUpdate ALL +#@MbPakP1 ALL +#@MbPakP2 ALL +#@MbEncChroma ALL +#@MbEncLuma ALL +#@Mpu ALL +#@Tpu ALL +#@MbEncADV ALL +#@2xScaling ALL +#@HEVC_32x32_PU_MD ALL +#@HEVC_16x16_PU_SAD ALL +#@HEVC_16x16_PU_MD ALL +#@HEVC_8x8_PU_MD ALL +#@HEVC_8x8_PU_FMODE ALL +#@HEVC_32x32_B_INTRA_CHECK ALL +#@HEVC_B_MBENC ALL +#@HEVC_B_PAK ALL +#@HEVC_LCU_BRCUpdate ALL +#@MeVDEncStreamIn ALL +#@VP9_I_32x32_MBENC ALL +#@VP9_I_16x16_MBENC ALL +#@VP9_P_MBENC ALL +#@VP9_TX_MBENC ALL +#@VP9_DYS ALL +#@VP9_I_MBPAK_LumaRecon ALL +#@VP9_I_MBPAK_ChromaRecon ALL +#@VP9_I_MBPAK_DeblockMask ALL +#@VP9_I_MBPAK_LumaDeblock ALL +#@VP9_I_MBPAK_ChromaDeblock ALL +#@VP9_P_MbPak_McPred ALL +#@VP9_P_MbPak_LumaRecon ALL +#@VP9_P_MbPak_LumaRecon ALL +#@VP9_P_MbPak_ChromaRecon ALL +#@VP9_Intra_P_MbPak_LumaRecon ALL +#@VP9_Intra_P_MbPak_ChromaRecon ALL +#@PreProc ALL +#@WP ALL +#@HEVC_I_MBENC ALL +#@CSCDsCopy ALL +#@2x_4xScaling ALL +#@HEVC_LCU64_B_MBENC ALL +#@MbBrcUpdate ALL +#@StaticFrameDetection ALL +#@HEVC_ROI ALL +#@InitSWScoreboard ALL + +### Encode plug-in ### +#@force +#ForceCmpDumpLvl:3 +#@OverwriteCurbe +#ForceCurbeDumpLvl:3 + diff --git a/Tools/MediaDriverTools/UMDPerfProfiler/igfx_user_feature.txt b/Tools/MediaDriverTools/UMDPerfProfiler/igfx_user_feature.txt index 0f18bb7cd..81cd9c999 100644 --- a/Tools/MediaDriverTools/UMDPerfProfiler/igfx_user_feature.txt +++ b/Tools/MediaDriverTools/UMDPerfProfiler/igfx_user_feature.txt @@ -1,6 +1,6 @@ [KEY] 0x00000001 - UFKEY_INTERNAL\ + UFKEY_INTERNAL\Report [VALUE] Perf Profiler Enable 4 @@ -13,3 +13,7 @@ Perf Profiler Buffer Size 4 512000000 + [VALUE] + Status Reporting + 4 + 1 diff --git a/Tools/MediaDriverTools/UMDPerfProfiler/igfx_user_feature_next.txt b/Tools/MediaDriverTools/UMDPerfProfiler/igfx_user_feature_next.txt index 6cdf1fa6f..33a185711 100644 --- a/Tools/MediaDriverTools/UMDPerfProfiler/igfx_user_feature_next.txt +++ b/Tools/MediaDriverTools/UMDPerfProfiler/igfx_user_feature_next.txt @@ -7,4 +7,20 @@ Perf Profiler Buffer Size=10000000 Enable HCP Scalability Decode=0 Disable Media Encode Scalability=1 -[report] \ No newline at end of file +Dump Command Buffer Enable=1 +Message HLT Output Directory=/data/local/tmp +CodecHal Debug Output Directory=/data/local/tmp/codechal_dump + +Message Print Enabled=1 +Mos Message Tags=3 +Mhw Message Tags=3 +Codec Message Tags=3 +VP Message Tags=3 +CP Message Tags=3 +DDI Message Tags=3 +CM Message Tags=3 +SCALABILITY Message Tags=3 +MMC Message Tags=3 +MCPY Message Tags=3 + +[report] diff --git a/media_driver/Android.mk b/media_driver/Android.mk index 23da14625..318915dc8 100644 --- a/media_driver/Android.mk +++ b/media_driver/Android.mk @@ -1519,7 +1519,9 @@ LOCAL_CPPFLAGS = \ -D__STDC_CONSTANT_MACROS \ -D__STDC_LIMIT_MACROS \ -D__VPHAL_SFC_SUPPORTED=1 \ - -DiHD_drv_video_EXPORTS + -DiHD_drv_video_EXPORTS \ + -D_RELEASE_INTERNAL \ + -Wno-format-security LOCAL_CONLYFLAGS = -x c++ LOCAL_CFLAGS = $(LOCAL_CPPFLAGS) diff --git a/media_driver/linux/common/vp/ddi/media_libva_vp.c b/media_driver/linux/common/vp/ddi/media_libva_vp.c index dcff2555a..9519d77d0 100644 --- a/media_driver/linux/common/vp/ddi/media_libva_vp.c +++ b/media_driver/linux/common/vp/ddi/media_libva_vp.c @@ -42,7 +42,7 @@ #include "media_libva_vp_tools.h" #if (_DEBUG || _RELEASE_INTERNAL) #if ANDROID -#include "media_libva_vp_tools_android.h" +//#include "media_libva_vp_tools_android.h" #endif #endif // #if (_DEBUG || _RELEASE_INTERNAL) diff --git a/media_softlet/agnostic/common/codec/hal/codechal_debug.cpp b/media_softlet/agnostic/common/codec/hal/codechal_debug.cpp index f3c5dc0dd..d4e3f51f9 100644 --- a/media_softlet/agnostic/common/codec/hal/codechal_debug.cpp +++ b/media_softlet/agnostic/common/codec/hal/codechal_debug.cpp @@ -1942,7 +1942,7 @@ CodechalDebugInterface::CodechalDebugInterface() uint32_t sizeToBeCopied = 0; MOS_GFXRES_TYPE ResType; -#if !defined(LINUX) +#if !defined(LINUX) && !defined(ANDROID) ResType = surface->OsResource.ResType; CODECHAL_DEBUG_CHK_STATUS(ReAllocateSurface( @@ -2590,7 +2590,7 @@ MOS_STATUS CodechalDebugInterface::DumpRgbDataOnYUVSurface( uint32_t sizeToBeCopied = 0; MOS_GFXRES_TYPE ResType; -#if LINUX +#if LINUX || ANDROID // Linux does not have OsResource->ResType ResType = surface->Type; #else @@ -4004,7 +4004,7 @@ MOS_STATUS CodechalDebugInterface::DumpYUVSurfaceToBuffer(PMOS_SURFACE surface, uint32_t sizeToBeCopied = 0; MOS_GFXRES_TYPE ResType; -#if LINUX +#if LINUX || ANDROID // Linux does not have OsResource->ResType ResType = surface->Type; #else @@ -4385,7 +4385,7 @@ MOS_STATUS CodechalDebugInterface::DumpSurfaceInfo( FIELD_TO_OFS(bOverlay, ); FIELD_TO_OFS(bFlipChain, ); -#if !defined(LINUX) +#if !defined(LINUX) && !defined(ANDROID) EMPTY_TO_OFS(); UNION_STRUCT_START_TO_OFS(); UNION_STRUCT_FIELD_TO_OFS(dwFirstArraySlice); diff --git a/media_softlet/agnostic/common/shared/media_debug_interface.cpp b/media_softlet/agnostic/common/shared/media_debug_interface.cpp index 6bf40d2ba..f0e24abd7 100644 --- a/media_softlet/agnostic/common/shared/media_debug_interface.cpp +++ b/media_softlet/agnostic/common/shared/media_debug_interface.cpp @@ -327,7 +327,7 @@ MOS_STATUS MediaDebugInterface::DumpMosSpecificResourceInfoToOfs( PMOS_RESOURCE ptr = pOsResource; ofs << "MOS_RESOURCE:" << std::endl; -#if !defined(LINUX) || defined(WDDM_LINUX) +#if !defined(ANDROID) && (!defined(LINUX) || defined(WDDM_LINUX)) FIELD_TO_OFS(RunTimeHandle, ); #else FIELD_TO_OFS(iWidth, ); @@ -455,7 +455,7 @@ MOS_STATUS MediaDebugInterface::DumpMosSpecificResourceInfoToOfs( FIELD_TO_OFS_8SHIFT(Info.TiledYs); FIELD_TO_OFS_8SHIFT(Info.XAdapter); FIELD_TO_OFS_8SHIFT(Info.__PreallocatedResInfo); -#if !defined(LINUX) +#if !defined(LINUX) && !defined(ANDROID) FIELD_TO_OFS_8SHIFT(Info.LMemBarPreferred); FIELD_TO_OFS_8SHIFT(Info.LMemBarOrNonlocalOnly); FIELD_TO_OFS_8SHIFT(Info.LMemBarIndifferent); diff --git a/media_softlet/linux/common/os/osservice/mos_util_debug_specific.cpp b/media_softlet/linux/common/os/osservice/mos_util_debug_specific.cpp index 3717e0e27..00ea119cb 100644 --- a/media_softlet/linux/common/os/osservice/mos_util_debug_specific.cpp +++ b/media_softlet/linux/common/os/osservice/mos_util_debug_specific.cpp @@ -40,7 +40,10 @@ #include //open #ifdef ANDROID -#include +// #include +#include +#undef printf +#define printf(...) ALOGW(__VA_ARGS__) #else #include #endif // ANDROID