Skip to content

Commit

Permalink
[CP] Enable CP OCA dump on Gen12 codec
Browse files Browse the repository at this point in the history
Add cp param dump in existing codec OCA dump on Gen12 platform

Change-Id: Ie5323f71e571abd0b0b29978068439736594c96d
  • Loading branch information
bo-b-wang authored and intel-mediadev committed Feb 28, 2020
1 parent 2baead9 commit ab126a6
Show file tree
Hide file tree
Showing 7 changed files with 40 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -412,6 +412,11 @@ MOS_STATUS CodechalDecodeAvcG12::DecodePrimitiveLevel()
CodecHalDecodeSinglePipeVE_PopulateHintParams(m_veState, &cmdBuffer, true);
}

if (m_osInterface->osCpInterface->IsHMEnabled())
{
HalOcaInterface::DumpCpParam(cmdBuffer, *m_osInterface->pOsContext, m_osInterface->osCpInterface->GetOcaDumper());
}

HalOcaInterface::On1stLevelBBEnd(cmdBuffer, *m_osInterface->pOsContext);

CODECHAL_DECODE_CHK_STATUS_RETURN(m_osInterface->pfnSubmitCommandBuffer(m_osInterface, &cmdBuffer, m_videoContextUsesNullHw));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2072,6 +2072,11 @@ MOS_STATUS CodechalDecodeHevcG12::DecodePrimitiveLevel()
submitCommand = CodecHalDecodeScalabilityIsToSubmitCmdBuffer_G12(m_scalabilityState);
}

if (m_osInterface->osCpInterface->IsHMEnabled())
{
HalOcaInterface::DumpCpParam(primCmdBuffer, *m_osInterface->pOsContext, m_osInterface->osCpInterface->GetOcaDumper());
}

HalOcaInterface::On1stLevelBBEnd(primCmdBuffer, *m_osInterface->pOsContext);

if (submitCommand || m_osInterface->phasedSubmission)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -524,6 +524,11 @@ MOS_STATUS CodechalDecodeJpegG12::DecodePrimitiveLevel()
CodecHalDecodeSinglePipeVE_PopulateHintParams(m_veState, &cmdBuffer, false);
}

if (m_osInterface->osCpInterface->IsHMEnabled())
{
HalOcaInterface::DumpCpParam(cmdBuffer, *m_osInterface->pOsContext, m_osInterface->osCpInterface->GetOcaDumper());
}

HalOcaInterface::On1stLevelBBEnd(cmdBuffer, *m_osInterface->pOsContext);

CODECHAL_DECODE_CHK_STATUS_RETURN(m_osInterface->pfnSubmitCommandBuffer(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -586,6 +586,11 @@ MOS_STATUS CodechalDecodeMpeg2G12::SliceLevel()
CodecHalDecodeSinglePipeVE_PopulateHintParams(m_veState, &cmdBuffer, false);
}

if (m_osInterface->osCpInterface->IsHMEnabled())
{
HalOcaInterface::DumpCpParam(cmdBuffer, *m_osInterface->pOsContext, m_osInterface->osCpInterface->GetOcaDumper());
}

HalOcaInterface::On1stLevelBBEnd(cmdBuffer, *m_osInterface->pOsContext);

CODECHAL_DECODE_CHK_STATUS_RETURN(m_osInterface->pfnSubmitCommandBuffer(
Expand Down
10 changes: 10 additions & 0 deletions media_driver/agnostic/gen12/codec/hal/codechal_decode_vc1_g12.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -785,6 +785,11 @@ MOS_STATUS CodechalDecodeVc1G12::DecodePrimitiveLevelVLD()
m_huCCopyInUse = false;
}

if (m_osInterface->osCpInterface->IsHMEnabled())
{
HalOcaInterface::DumpCpParam(cmdBuffer, *m_osInterface->pOsContext, m_osInterface->osCpInterface->GetOcaDumper());
}

HalOcaInterface::On1stLevelBBEnd(cmdBuffer, *m_osInterface->pOsContext);

CODECHAL_DECODE_CHK_STATUS_RETURN(m_osInterface->pfnSubmitCommandBuffer(m_osInterface, &cmdBuffer, m_videoContextUsesNullHw));
Expand Down Expand Up @@ -1108,6 +1113,11 @@ MOS_STATUS CodechalDecodeVc1G12::DecodePrimitiveLevelIT()
m_huCCopyInUse = false;
}

if (m_osInterface->osCpInterface->IsHMEnabled())
{
HalOcaInterface::DumpCpParam(cmdBuffer, *m_osInterface->pOsContext, m_osInterface->osCpInterface->GetOcaDumper());
}

HalOcaInterface::On1stLevelBBEnd(cmdBuffer, *m_osInterface->pOsContext);

CODECHAL_DECODE_CHK_STATUS_RETURN(m_osInterface->pfnSubmitCommandBuffer(m_osInterface, &cmdBuffer, m_videoContextUsesNullHw));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -326,6 +326,11 @@ MOS_STATUS CodechalDecodeVp8G12::DecodePrimitiveLevel()
m_huCCopyInUse = false;
}

if (m_osInterface->osCpInterface->IsHMEnabled())
{
HalOcaInterface::DumpCpParam(cmdBuffer, *m_osInterface->pOsContext, m_osInterface->osCpInterface->GetOcaDumper());
}

HalOcaInterface::On1stLevelBBEnd(cmdBuffer, *m_osInterface->pOsContext);

CODECHAL_DECODE_CHK_STATUS_RETURN(m_osInterface->pfnSubmitCommandBuffer(m_osInterface, &cmdBuffer, m_videoContextUsesNullHw));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7238,6 +7238,11 @@ MOS_STATUS CodechalVdencHevcStateG12::SubmitCommandBuffer(

if (IsLastPass())
{
if (m_osInterface->osCpInterface->IsHMEnabled())
{
HalOcaInterface::DumpCpParam(*cmdBuffer, *m_osInterface->pOsContext, m_osInterface->osCpInterface->GetOcaDumper());
}

HalOcaInterface::On1stLevelBBEnd(*cmdBuffer, *m_osInterface->pOsContext);
}

Expand Down

0 comments on commit ab126a6

Please sign in to comment.