From f682ac6120cc80e279586049cba23af782405c2b Mon Sep 17 00:00:00 2001 From: luleilei1 Date: Fri, 13 Sep 2024 12:52:20 +0800 Subject: [PATCH] Revert "[Media Common] [VP] Add etw trace for media copy info" This reverts commit intel-innersource/drivers.gpu.unified#f31a2124b --- .../shared/mediacopy/media_blt_copy.cpp | 2 + .../mediacopy/media_blt_copy_xe_hpm.cpp | 2 + .../mediacopy/media_blt_copy_xe_xpm_base.cpp | 2 + .../mediacopy/media_blt_copy_xe_xpm_plus.cpp | 2 + .../shared/mediacopy/media_blt_copy_next.cpp | 2 + .../common/shared/mediacopy/media_copy.cpp | 25 ------------ .../mmc/media_mem_decompression_next.cpp | 39 +------------------ 7 files changed, 11 insertions(+), 63 deletions(-) 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 8cac3d07485..862f7e9ab01 100644 --- a/media_driver/agnostic/common/shared/mediacopy/media_blt_copy.cpp +++ b/media_driver/agnostic/common/shared/mediacopy/media_blt_copy.cpp @@ -139,6 +139,7 @@ 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; @@ -147,6 +148,7 @@ 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 2fd0c7d6ea1..3d807d26329 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,6 +896,7 @@ 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; @@ -917,5 +918,6 @@ 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 bfc87f1b2c7..77a1f80924c 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,6 +791,7 @@ 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; @@ -799,5 +800,6 @@ 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 a3c868fe3cd..f1b3115dfbf 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,6 +626,7 @@ 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; @@ -634,6 +635,7 @@ 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 c96291245f1..cf3eec24405 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,6 +646,7 @@ 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; @@ -666,6 +667,7 @@ 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 2b4d526d727..aefe31b6169 100644 --- a/media_softlet/agnostic/common/shared/mediacopy/media_copy.cpp +++ b/media_softlet/agnostic/common/shared/mediacopy/media_copy.cpp @@ -387,7 +387,6 @@ 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; @@ -450,29 +449,6 @@ 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, @@ -485,7 +461,6 @@ 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 5693b0c4135..3c42ec31f68 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,20 +109,6 @@ 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) { @@ -281,30 +267,7 @@ MOS_STATUS MediaMemDeCompNext::MediaMemoryCopy(PMOS_RESOURCE inputResource, PMOS MOS_GPU_CONTEXT_VEBOX, false); -#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)); + VPHAL_MEMORY_DECOMP_CHK_STATUS_RETURN(RenderDoubleBufferDecompCMD(&sourceSurface, &targetSurface)); MOS_TraceEventExt(EVENT_MEDIA_COPY, EVENT_TYPE_END, nullptr, 0, nullptr, 0); return eStatus;