diff --git a/media_driver/agnostic/common/shared/mediacopy/media_blt_copy.cpp b/media_driver/agnostic/common/shared/mediacopy/media_blt_copy.cpp index 862f7e9ab0..8cac3d0748 100644 --- a/media_driver/agnostic/common/shared/mediacopy/media_blt_copy.cpp +++ b/media_driver/agnostic/common/shared/mediacopy/media_blt_copy.cpp @@ -139,7 +139,6 @@ MOS_STATUS BltState::CopyMainSurface( BLT_CHK_NULL_RETURN(src); BLT_CHK_NULL_RETURN(dst); - MOS_TraceEventExt(EVENT_MEDIA_COPY, EVENT_TYPE_START, nullptr, 0, nullptr, 0); MOS_ZeroMemory(&bltStateParam, sizeof(BLT_STATE_PARAM)); bltStateParam.bCopyMainSurface = true; @@ -148,7 +147,6 @@ MOS_STATUS BltState::CopyMainSurface( BLT_CHK_STATUS_RETURN(SubmitCMD(&bltStateParam)); - MOS_TraceEventExt(EVENT_MEDIA_COPY, EVENT_TYPE_END, nullptr, 0, nullptr, 0); return MOS_STATUS_SUCCESS; } diff --git a/media_driver/media_softlet/agnostic/Xe_M/Xe_HPM/shared/mediacopy/media_blt_copy_xe_hpm.cpp b/media_driver/media_softlet/agnostic/Xe_M/Xe_HPM/shared/mediacopy/media_blt_copy_xe_hpm.cpp index 3d807d2632..2fd0c7d6ea 100644 --- a/media_driver/media_softlet/agnostic/Xe_M/Xe_HPM/shared/mediacopy/media_blt_copy_xe_hpm.cpp +++ b/media_driver/media_softlet/agnostic/Xe_M/Xe_HPM/shared/mediacopy/media_blt_copy_xe_hpm.cpp @@ -896,7 +896,6 @@ MOS_STATUS BltState_Xe_Hpm::CopyMainSurface( BLT_CHK_NULL_RETURN(dst); BLT_CHK_NULL_RETURN(src->pGmmResInfo); BLT_CHK_NULL_RETURN(dst->pGmmResInfo); - MOS_TraceEventExt(EVENT_MEDIA_COPY, EVENT_TYPE_START, nullptr, 0, nullptr, 0); MOS_ZeroMemory(&bltStateParam, sizeof(BLT_STATE_PARAM)); bltStateParam.bCopyMainSurface = true; @@ -918,6 +917,5 @@ MOS_STATUS BltState_Xe_Hpm::CopyMainSurface( BLT_CHK_STATUS_RETURN(SubmitCMD(&bltStateParam)); } - MOS_TraceEventExt(EVENT_MEDIA_COPY, EVENT_TYPE_END, nullptr, 0, nullptr, 0); return MOS_STATUS_SUCCESS; } \ No newline at end of file diff --git a/media_driver/media_softlet/agnostic/Xe_M/Xe_XPM_base/shared/mediacopy/media_blt_copy_xe_xpm_base.cpp b/media_driver/media_softlet/agnostic/Xe_M/Xe_XPM_base/shared/mediacopy/media_blt_copy_xe_xpm_base.cpp index 77a1f80924..bfc87f1b2c 100644 --- a/media_driver/media_softlet/agnostic/Xe_M/Xe_XPM_base/shared/mediacopy/media_blt_copy_xe_xpm_base.cpp +++ b/media_driver/media_softlet/agnostic/Xe_M/Xe_XPM_base/shared/mediacopy/media_blt_copy_xe_xpm_base.cpp @@ -791,7 +791,6 @@ MOS_STATUS BltStateXe_Xpm::CopyMainSurface( BLT_CHK_NULL_RETURN(src); BLT_CHK_NULL_RETURN(dst); - MOS_TraceEventExt(EVENT_MEDIA_COPY, EVENT_TYPE_START, nullptr, 0, nullptr, 0); MOS_ZeroMemory(&bltStateParam, sizeof(BLT_STATE_PARAM)); bltStateParam.bCopyMainSurface = true; @@ -800,6 +799,5 @@ MOS_STATUS BltStateXe_Xpm::CopyMainSurface( BLT_CHK_STATUS_RETURN(SubmitCMD(&bltStateParam)); - MOS_TraceEventExt(EVENT_MEDIA_COPY, EVENT_TYPE_END, nullptr, 0, nullptr, 0); return MOS_STATUS_SUCCESS; } \ No newline at end of file diff --git a/media_driver/media_softlet/agnostic/Xe_M/Xe_XPM_plus/shared/mediacopy/media_blt_copy_xe_xpm_plus.cpp b/media_driver/media_softlet/agnostic/Xe_M/Xe_XPM_plus/shared/mediacopy/media_blt_copy_xe_xpm_plus.cpp index f1b3115dfb..a3c868fe3c 100644 --- a/media_driver/media_softlet/agnostic/Xe_M/Xe_XPM_plus/shared/mediacopy/media_blt_copy_xe_xpm_plus.cpp +++ b/media_driver/media_softlet/agnostic/Xe_M/Xe_XPM_plus/shared/mediacopy/media_blt_copy_xe_xpm_plus.cpp @@ -626,7 +626,6 @@ MOS_STATUS BltStateXe_Xpm_Plus::CopyMainSurface( BLT_CHK_NULL_RETURN(src); BLT_CHK_NULL_RETURN(dst); - MOS_TraceEventExt(EVENT_MEDIA_COPY, EVENT_TYPE_START, nullptr, 0, nullptr, 0); MOS_ZeroMemory(&bltStateParam, sizeof(BLT_STATE_PARAM)); bltStateParam.bCopyMainSurface = true; @@ -635,7 +634,6 @@ MOS_STATUS BltStateXe_Xpm_Plus::CopyMainSurface( BLT_CHK_STATUS_RETURN(SubmitCMD(&bltStateParam)); - MOS_TraceEventExt(EVENT_MEDIA_COPY, EVENT_TYPE_END, nullptr, 0, nullptr, 0); return MOS_STATUS_SUCCESS; } diff --git a/media_softlet/agnostic/common/shared/mediacopy/media_blt_copy_next.cpp b/media_softlet/agnostic/common/shared/mediacopy/media_blt_copy_next.cpp index cf3eec2440..c96291245f 100644 --- a/media_softlet/agnostic/common/shared/mediacopy/media_blt_copy_next.cpp +++ b/media_softlet/agnostic/common/shared/mediacopy/media_blt_copy_next.cpp @@ -646,7 +646,6 @@ MOS_STATUS BltStateNext::CopyMainSurface( BLT_CHK_NULL_RETURN(dst); BLT_CHK_NULL_RETURN(src->pGmmResInfo); BLT_CHK_NULL_RETURN(dst->pGmmResInfo); - MOS_TraceEventExt(EVENT_MEDIA_COPY, EVENT_TYPE_START, nullptr, 0, nullptr, 0); MOS_ZeroMemory(&BltStateNextParam, sizeof(BLT_STATE_PARAM)); BltStateNextParam.bCopyMainSurface = true; @@ -667,7 +666,6 @@ MOS_STATUS BltStateNext::CopyMainSurface( BLT_CHK_STATUS_RETURN(SubmitCMD(&BltStateNextParam)); } - MOS_TraceEventExt(EVENT_MEDIA_COPY, EVENT_TYPE_END, nullptr, 0, nullptr, 0); return MOS_STATUS_SUCCESS; } diff --git a/media_softlet/agnostic/common/shared/mediacopy/media_copy.cpp b/media_softlet/agnostic/common/shared/mediacopy/media_copy.cpp index aefe31b616..2b4d526d72 100644 --- a/media_softlet/agnostic/common/shared/mediacopy/media_copy.cpp +++ b/media_softlet/agnostic/common/shared/mediacopy/media_copy.cpp @@ -387,6 +387,7 @@ MOS_STATUS MediaCopyBaseState::ValidateResource(const MOS_SURFACE &src, const MO //! MOS_STATUS MediaCopyBaseState::SurfaceCopy(PMOS_RESOURCE src, PMOS_RESOURCE dst, MCPY_METHOD preferMethod) { + MOS_TraceEventExt(EVENT_MEDIA_COPY, EVENT_TYPE_START, nullptr, 0, nullptr, 0); MOS_STATUS eStatus = MOS_STATUS_SUCCESS; MOS_SURFACE SrcResDetails, DstResDetails; @@ -449,6 +450,29 @@ MOS_STATUS MediaCopyBaseState::SurfaceCopy(PMOS_RESOURCE src, PMOS_RESOURCE dst, MT_SURF_TILE_TYPE, DstResDetails.TileType, MT_SURF_COMP_MODE, mcpyDst.CompressionMode); +#if (_DEBUG || _RELEASE_INTERNAL) && !defined(LINUX) + TRACEDATA_MEDIACOPY eventData = {0}; + TRACEDATA_MEDIACOPY_INIT( + eventData, + src->AllocationInfo.m_AllocationHandle, + SrcResDetails.dwWidth, + SrcResDetails.dwHeight, + SrcResDetails.Format, + *((int64_t *)&src->pGmmResInfo->GetResFlags().Gpu), + *((int64_t *)&src->pGmmResInfo->GetResFlags().Info), + src->pGmmResInfo->GetSetCpSurfTag(0, 0), + dst->AllocationInfo.m_AllocationHandle, + DstResDetails.dwWidth, + DstResDetails.dwHeight, + DstResDetails.Format, + *((int64_t *)&dst->pGmmResInfo->GetResFlags().Gpu), + *((int64_t *)&dst->pGmmResInfo->GetResFlags().Info), + dst->pGmmResInfo->GetSetCpSurfTag(0, 0) + ); + + MOS_TraceEventExt(EVENT_MEDIA_COPY, EVENT_TYPE_INFO, &eventData, sizeof(eventData), nullptr, 0); +#endif + MCPY_CHK_STATUS_RETURN(PreCheckCpCopy(mcpySrc, mcpyDst, preferMethod)); MCPY_CHK_STATUS_RETURN(CapabilityCheck(SrcResDetails.Format, @@ -461,6 +485,7 @@ MOS_STATUS MediaCopyBaseState::SurfaceCopy(PMOS_RESOURCE src, PMOS_RESOURCE dst, MCPY_CHK_STATUS_RETURN(TaskDispatch(mcpySrc, mcpyDst, mcpyEngine)); + MOS_TraceEventExt(EVENT_MEDIA_COPY, EVENT_TYPE_END, nullptr, 0, nullptr, 0); return eStatus; } diff --git a/media_softlet/agnostic/common/shared/mmc/media_mem_decompression_next.cpp b/media_softlet/agnostic/common/shared/mmc/media_mem_decompression_next.cpp index 3c42ec31f6..5693b0c413 100644 --- a/media_softlet/agnostic/common/shared/mmc/media_mem_decompression_next.cpp +++ b/media_softlet/agnostic/common/shared/mmc/media_mem_decompression_next.cpp @@ -109,6 +109,20 @@ MOS_STATUS MediaMemDeCompNext::MemoryDecompress(PMOS_RESOURCE targetResource) { VPHAL_MEMORY_DECOMP_CHK_NULL_RETURN(m_renderMutex); MosUtilities::MosLockMutex(m_renderMutex); + +#if (_DEBUG || _RELEASE_INTERNAL) && !defined(LINUX) + TRACEDATA_MEDIA_MEM_DECOMP eventData = {0}; + TRACEDATA_MEDIA_MEM_DECOMP_INIT( + eventData, + targetResource->AllocationInfo.m_AllocationHandle, + targetSurface.dwWidth, + targetSurface.dwHeight, + targetSurface.Format, + *((int64_t *)&targetResource->pGmmResInfo->GetResFlags().Gpu), + *((int64_t *)&targetResource->pGmmResInfo->GetResFlags().Info) + ); + MOS_TraceEventExt(EVENT_DDI_MEDIA_MEM_DECOMP_CALLBACK, EVENT_TYPE_INFO, &eventData, sizeof(eventData), nullptr, 0); +#endif eStatus = RenderDecompCMD(&targetSurface); if (eStatus != MOS_STATUS_SUCCESS) { @@ -267,7 +281,30 @@ MOS_STATUS MediaMemDeCompNext::MediaMemoryCopy(PMOS_RESOURCE inputResource, PMOS MOS_GPU_CONTEXT_VEBOX, false); - VPHAL_MEMORY_DECOMP_CHK_STATUS_RETURN(RenderDoubleBufferDecompCMD(&sourceSurface, &targetSurface)); +#if (_DEBUG || _RELEASE_INTERNAL) && !defined(LINUX) + TRACEDATA_MEDIACOPY eventData = {0}; + TRACEDATA_MEDIACOPY_INIT( + eventData, + inputResource->AllocationInfo.m_AllocationHandle, + targetSurface.dwWidth, + targetSurface.dwHeight, + targetSurface.Format, + *((int64_t *)&inputResource->pGmmResInfo->GetResFlags().Gpu), + *((int64_t *)&inputResource->pGmmResInfo->GetResFlags().Info), + inputResource->pGmmResInfo->GetSetCpSurfTag(0, 0), + outputResource->AllocationInfo.m_AllocationHandle, + targetSurface.dwWidth, + targetSurface.dwHeight, + targetSurface.Format, + *((int64_t *)&outputResource->pGmmResInfo->GetResFlags().Gpu), + *((int64_t *)&outputResource->pGmmResInfo->GetResFlags().Info), + outputResource->pGmmResInfo->GetSetCpSurfTag(0, 0) + + ); + MOS_TraceEventExt(EVENT_MEDIA_COPY, EVENT_TYPE_INFO, &eventData, sizeof(eventData), nullptr, 0); +#endif + + VPHAL_MEMORY_DECOMP_CHK_STATUS_RETURN(RenderDoubleBufferDecompCMD(&targetSurface, &targetSurface)); MOS_TraceEventExt(EVENT_MEDIA_COPY, EVENT_TYPE_END, nullptr, 0, nullptr, 0); return eStatus;