Skip to content

Commit

Permalink
[Media Common] add cmd buffer dump into linux trace
Browse files Browse the repository at this point in the history
Linux trace do not have cmd buffer dump yet, add them for debug.
only enabled in release internal driver
  • Loading branch information
lindongw authored and intel-mediadev committed Aug 28, 2023
1 parent 23bb40c commit 4aa4621
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 1 deletion.
2 changes: 2 additions & 0 deletions media_driver/linux/common/os/mos_gpucontext_specific.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1097,6 +1097,8 @@ MOS_STATUS GpuContextSpecific::SubmitCommandBuffer(
return MOS_STATUS_UNKNOWN;
}
}
// dump before cmd buffer unmap
MOS_TraceDumpExt("CmdBuffer", m_gpuContext, cmdBuffer->pCmdBase, cmdBuffer->iOffset);

// Now, we can unmap the video command buffer, since we don't need CPU access anymore.
MOS_OS_CHK_NULL_RETURN(cmdBuffer->OsResource.pGfxResource);
Expand Down
5 changes: 4 additions & 1 deletion media_softlet/agnostic/common/os/mos_utilities.h
Original file line number Diff line number Diff line change
Expand Up @@ -3308,7 +3308,10 @@ inline void MOS_TraceDataDump(
const void *pBuf,
uint32_t dwSize)
{
MosUtilities::MosTraceDataDump(pcName, flags, pBuf, dwSize);
if (MosUtilities::TraceKeyEnabled(TR_KEY_DATA_DUMP))
{
MosUtilities::MosTraceDataDump(pcName, flags, pBuf, dwSize);
}
}

inline void MOS_TraceDataDump(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1445,6 +1445,8 @@ MOS_STATUS GpuContextSpecificNext::SubmitCommandBuffer(
return MOS_STATUS_UNKNOWN;
}
}
// dump before cmd buffer unmap
MOS_TraceDumpExt("CmdBuffer", m_gpuContext, cmdBuffer->pCmdBase, cmdBuffer->iOffset);

// Now, we can unmap the video command buffer, since we don't need CPU access anymore.
MOS_OS_CHK_NULL_RETURN(cmdBuffer->OsResource.pGfxResourceNext);
Expand Down

0 comments on commit 4aa4621

Please sign in to comment.