Skip to content

Commit

Permalink
[VP] update feature graph surface info RTlog
Browse files Browse the repository at this point in the history
update feature graph surface info RTlog.
  • Loading branch information
Alex1Zhang authored and intel-mediadev committed Jul 2, 2023
1 parent 37483dd commit 9830c10
Show file tree
Hide file tree
Showing 5 changed files with 48 additions and 44 deletions.
1 change: 1 addition & 0 deletions media_common/agnostic/common/os/mos_os_trace_event.h
Original file line number Diff line number Diff line change
Expand Up @@ -744,6 +744,7 @@ typedef enum _MT_LOG_ID
MT_VP_FEATURE_GRAPH_INPUT_SURFACE_INFO,
MT_VP_FEATURE_GRAPH_INTERMEIDATE_SURFACE_INFO,
MT_VP_FEATURE_GRAPH_OUTPUT_SURFACE_INFO,
MT_VP_FEATURE_GRAPH_SURFACE_ALLOCATIONHANDLE,
MT_VP_HAL_ID_BASE = 0x02000400,
MT_VP_HAL_PIPELINE_ADAPTER,
MT_VP_HAL_PIPELINE_ADAPTER_EXT_ENTRY,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1146,15 +1146,6 @@ MOS_STATUS VpResourceManager::AssignExecuteResource(std::vector<FeatureType> &fe
VP_PUBLIC_CHK_STATUS_RETURN(AssignIntermediaSurface(caps, executedFilters));
outputSurface = GetCopyInstOfExtSurface(executedFilters.GetSurface(false, 0));
VP_PUBLIC_CHK_NULL_RETURN(outputSurface);
// RTLog for intermediate surface
MT_LOG7(MT_VP_FEATURE_GRAPH_INTERMEIDATE_SURFACE_INFO, MT_NORMAL, MT_VP_FEATURE_GRAPH_SURFACE_WIDTH, outputSurface->osSurface->dwWidth, MT_VP_FEATURE_GRAPH_SURFACE_HEIGHT, outputSurface->osSurface->dwHeight, MT_VP_FEATURE_GRAPH_SURFACE_PITCH, outputSurface->osSurface->dwPitch, MT_VP_FEATURE_GRAPH_SURFACE_RCSRC_LEFT, outputSurface->rcSrc.left, MT_VP_FEATURE_GRAPH_SURFACE_RCSRC_TOP, outputSurface->rcSrc.top, MT_VP_FEATURE_GRAPH_SURFACE_RCSRC_RIGHT, outputSurface->rcSrc.right, MT_VP_FEATURE_GRAPH_SURFACE_RCSRC_BOTTOM, outputSurface->rcSrc.bottom);
MT_LOG6(MT_VP_FEATURE_GRAPH_INTERMEIDATE_SURFACE_INFO, MT_NORMAL, MT_VP_FEATURE_GRAPH_SURFACE_COLORSPACE, outputSurface->ColorSpace, MT_VP_FEATURE_GRAPH_SURFACE_FORMAT, outputSurface->osSurface->Format, MT_VP_FEATURE_GRAPH_SURFACE_RCDST_LEFT, outputSurface->rcDst.left, MT_VP_FEATURE_GRAPH_SURFACE_RCDST_TOP, outputSurface->rcDst.top, MT_VP_FEATURE_GRAPH_SURFACE_RCDST_RIGHT, outputSurface->rcDst.right, MT_VP_FEATURE_GRAPH_SURFACE_RCDST_BOTTOM, outputSurface->rcDst.bottom);
VP_PUBLIC_NORMALMESSAGE("Feature Graph: Intermediate Surface: dwWidth %d, dwHeight %d, ColorSpace %d, \
rcSrc.left %d, rcSrc.top %d, rcSrc.right %d, rcSrc.bottom %d, \
rcDst.left %d, rcDst.top %d, rcDst.right %d, rcDst.bottom %d",
outputSurface->osSurface->dwWidth, outputSurface->osSurface->dwHeight, outputSurface->osSurface->dwPitch, outputSurface->ColorSpace, outputSurface->osSurface->Format,
outputSurface->rcSrc.left, outputSurface->rcSrc.top, outputSurface->rcSrc.right, outputSurface->rcSrc.bottom,
outputSurface->rcDst.left, outputSurface->rcDst.top, outputSurface->rcDst.right, outputSurface->rcDst.bottom);
}

VP_PUBLIC_CHK_STATUS_RETURN(AssignExecuteResource(caps, inputSurfaces, outputSurface,
Expand Down
16 changes: 7 additions & 9 deletions media_softlet/agnostic/common/vp/hal/feature_manager/policy.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2860,15 +2860,20 @@ MOS_STATUS Policy::BuildExecuteFilter(SwFilterPipe& featurePipe, std::vector<int
params.Type = EngineTypeInvalid;
// params.vpExecuteCaps will be assigned in Policy::BuildExecuteHwFilter.
params.vpExecuteCaps.value = 0;

MT_LOG1(MT_VP_FEATURE_GRAPH_SETUPEXECUTESWFILTER_START, MT_NORMAL, MT_VP_FEATURE_GRAPH_FILTER_LAYERINDEXES_COUNT, (int64_t)layerIndexes.size());
VP_PUBLIC_CHK_STATUS_RETURN(SetupExecuteFilter(featurePipe, layerIndexes, caps, params));

// Build Execute surface needed
VP_PUBLIC_CHK_STATUS_RETURN(SetupFilterResource(featurePipe, layerIndexes, caps, params));

VP_PUBLIC_CHK_STATUS_RETURN(featurePipe.Update());
VP_PUBLIC_CHK_STATUS_RETURN(params.executedFilters->Update());

if (params.executedFilters)
{
params.executedFilters->AddRTLog();
}
MT_LOG1(MT_VP_FEATURE_GRAPH_SETUPEXECUTESWFILTER_END, MT_NORMAL, MT_VP_FEATURE_GRAPH_FILTER_LAYERINDEXES_COUNT, (int64_t)layerIndexes.size());
featurePipe.AddRTLog();
if (featurePipe.IsEmpty())
{
caps.lastSubmission = true;
Expand Down Expand Up @@ -3148,7 +3153,6 @@ MOS_STATUS Policy::SetupExecuteFilter(SwFilterPipe& featurePipe, std::vector<int

VP_PUBLIC_CHK_NULL_RETURN(params.executedFilters);

MT_LOG1(MT_VP_FEATURE_GRAPH_SETUPEXECUTESWFILTER_START, MT_NORMAL, MT_VP_FEATURE_GRAPH_FILTER_LAYERINDEXES_COUNT, (int64_t)layerIndexes.size());
for (uint32_t i = 0; i < layerIndexes.size(); ++i)
{
VP_PUBLIC_CHK_STATUS_RETURN(AddInputSurfaceForSingleLayer(featurePipe, layerIndexes[i], *params.executedFilters, i, caps));
Expand All @@ -3160,12 +3164,6 @@ MOS_STATUS Policy::SetupExecuteFilter(SwFilterPipe& featurePipe, std::vector<int

VP_PUBLIC_CHK_STATUS_RETURN(UpdateFeatureOutputPipe(layerIndexes, featurePipe, *params.executedFilters, caps));

if (params.executedFilters)
{
params.executedFilters->AddRTLog();
}
MT_LOG1(MT_VP_FEATURE_GRAPH_SETUPEXECUTESWFILTER_END, MT_NORMAL, MT_VP_FEATURE_GRAPH_FILTER_LAYERINDEXES_COUNT, (int64_t)layerIndexes.size());
featurePipe.AddRTLog();
return MOS_STATUS_SUCCESS;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1182,10 +1182,50 @@ MOS_STATUS SwFilterPipe::AddFeatureGraphRTLog(bool isInputPipe, uint32_t pipeInd
// Input surface/pipe may be empty for some feature.
if (isInputPipe)
{
MT_LOG7(MT_VP_FEATURE_GRAPH_INPUT_SURFACE_INFO, MT_NORMAL, MT_VP_FEATURE_GRAPH_SURFACE_WIDTH, m_InputSurfaces[pipeIndex]->osSurface->dwWidth, MT_VP_FEATURE_GRAPH_SURFACE_HEIGHT, m_InputSurfaces[pipeIndex]->osSurface->dwHeight, MT_VP_FEATURE_GRAPH_SURFACE_PITCH, m_InputSurfaces[pipeIndex]->osSurface->dwPitch, MT_VP_FEATURE_GRAPH_SURFACE_RCSRC_LEFT, m_InputSurfaces[pipeIndex]->rcSrc.left, MT_VP_FEATURE_GRAPH_SURFACE_RCSRC_TOP, m_InputSurfaces[pipeIndex]->rcSrc.top, MT_VP_FEATURE_GRAPH_SURFACE_RCSRC_RIGHT, m_InputSurfaces[pipeIndex]->rcSrc.right, MT_VP_FEATURE_GRAPH_SURFACE_RCSRC_BOTTOM, m_InputSurfaces[pipeIndex]->rcSrc.bottom);
MT_LOG7(MT_VP_FEATURE_GRAPH_INPUT_SURFACE_INFO, MT_NORMAL, MT_VP_FEATURE_GRAPH_SURFACE_COLORSPACE, m_InputSurfaces[pipeIndex]->ColorSpace, MT_VP_FEATURE_GRAPH_SURFACE_FORMAT, m_InputSurfaces[pipeIndex]->osSurface->Format, MT_VP_FEATURE_GRAPH_SURFACE_RCDST_LEFT, m_InputSurfaces[pipeIndex]->rcDst.left, MT_VP_FEATURE_GRAPH_SURFACE_RCDST_TOP, m_InputSurfaces[pipeIndex]->rcDst.top, MT_VP_FEATURE_GRAPH_SURFACE_RCDST_RIGHT, m_InputSurfaces[pipeIndex]->rcDst.right, MT_VP_FEATURE_GRAPH_SURFACE_RCDST_BOTTOM, m_InputSurfaces[pipeIndex]->rcDst.bottom, MT_VP_FEATURE_GRAPH_SURFACE_ALLOCATIONHANDLE, static_cast<int64_t>(m_InputSurfaces[pipeIndex]->GetAllocationHandle(m_vpInterface.GetHwInterface()->m_osInterface)));
VP_PUBLIC_NORMALMESSAGE(
"Feature Graph: Input Surface: dwWidth %d, dwHeight %d, dwPitch %d, ColorSpace %d, Format %d, \
rcSrc.left %d, rcSrc.top %d, rcSrc.right %d, rcSrc.bottom %d, \
rcDst.left %d, rcDst.top %d, rcDst.right %d, rcDst.bottom %d, surface allocationhandle %d",
m_InputSurfaces[pipeIndex]->osSurface->dwWidth,
m_InputSurfaces[pipeIndex]->osSurface->dwHeight,
m_InputSurfaces[pipeIndex]->osSurface->dwPitch,
m_InputSurfaces[pipeIndex]->ColorSpace,
m_InputSurfaces[pipeIndex]->osSurface->Format,
m_InputSurfaces[pipeIndex]->rcSrc.left,
m_InputSurfaces[pipeIndex]->rcSrc.top,
m_InputSurfaces[pipeIndex]->rcSrc.right,
m_InputSurfaces[pipeIndex]->rcSrc.bottom,
m_InputSurfaces[pipeIndex]->rcDst.left,
m_InputSurfaces[pipeIndex]->rcDst.top,
m_InputSurfaces[pipeIndex]->rcDst.right,
m_InputSurfaces[pipeIndex]->rcDst.bottom,
m_InputSurfaces[pipeIndex]->GetAllocationHandle(m_vpInterface.GetHwInterface()->m_osInterface));
VP_PUBLIC_CHK_STATUS_RETURN(inputPipe->AddFeatureGraphRTLog());
}
else
{
MT_LOG7(MT_VP_FEATURE_GRAPH_OUTPUT_SURFACE_INFO, MT_NORMAL, MT_VP_FEATURE_GRAPH_SURFACE_WIDTH, m_OutputSurfaces[pipeIndex]->osSurface->dwWidth, MT_VP_FEATURE_GRAPH_SURFACE_HEIGHT, m_OutputSurfaces[pipeIndex]->osSurface->dwHeight, MT_VP_FEATURE_GRAPH_SURFACE_PITCH, m_OutputSurfaces[pipeIndex]->osSurface->dwPitch, MT_VP_FEATURE_GRAPH_SURFACE_RCSRC_LEFT, m_OutputSurfaces[pipeIndex]->rcSrc.left, MT_VP_FEATURE_GRAPH_SURFACE_RCSRC_TOP, m_OutputSurfaces[pipeIndex]->rcSrc.top, MT_VP_FEATURE_GRAPH_SURFACE_RCSRC_RIGHT, m_OutputSurfaces[pipeIndex]->rcSrc.right, MT_VP_FEATURE_GRAPH_SURFACE_RCSRC_BOTTOM, m_OutputSurfaces[pipeIndex]->rcSrc.bottom);
MT_LOG7(MT_VP_FEATURE_GRAPH_OUTPUT_SURFACE_INFO, MT_NORMAL, MT_VP_FEATURE_GRAPH_SURFACE_COLORSPACE, m_OutputSurfaces[pipeIndex]->ColorSpace, MT_VP_FEATURE_GRAPH_SURFACE_FORMAT, m_OutputSurfaces[pipeIndex]->osSurface->Format, MT_VP_FEATURE_GRAPH_SURFACE_RCDST_LEFT, m_OutputSurfaces[pipeIndex]->rcDst.left, MT_VP_FEATURE_GRAPH_SURFACE_RCDST_TOP, m_OutputSurfaces[pipeIndex]->rcDst.top, MT_VP_FEATURE_GRAPH_SURFACE_RCDST_RIGHT, m_OutputSurfaces[pipeIndex]->rcDst.right, MT_VP_FEATURE_GRAPH_SURFACE_RCDST_BOTTOM, m_OutputSurfaces[pipeIndex]->rcDst.bottom, MT_VP_FEATURE_GRAPH_SURFACE_ALLOCATIONHANDLE, static_cast<int64_t>(m_OutputSurfaces[pipeIndex]->GetAllocationHandle(m_vpInterface.GetHwInterface()->m_osInterface)));
VP_PUBLIC_NORMALMESSAGE(
"Feature Graph: Output Surface: dwWidth %d, dwHeight %d, dwPitch %d, ColorSpace %d, Format %d, \
rcSrc.left %d, rcSrc.top %d, rcSrc.right %d, rcSrc.bottom %d, \
rcDst.left %d, rcDst.top %d, rcDst.right %d, rcDst.bottom %d, surface allocationhandle %d",
m_OutputSurfaces[pipeIndex]->osSurface->dwWidth,
m_OutputSurfaces[pipeIndex]->osSurface->dwHeight,
m_OutputSurfaces[pipeIndex]->osSurface->dwPitch,
m_OutputSurfaces[pipeIndex]->ColorSpace,
m_OutputSurfaces[pipeIndex]->osSurface->Format,
m_OutputSurfaces[pipeIndex]->rcSrc.left,
m_OutputSurfaces[pipeIndex]->rcSrc.top,
m_OutputSurfaces[pipeIndex]->rcSrc.right,
m_OutputSurfaces[pipeIndex]->rcSrc.bottom,
m_OutputSurfaces[pipeIndex]->rcDst.left,
m_OutputSurfaces[pipeIndex]->rcDst.top,
m_OutputSurfaces[pipeIndex]->rcDst.right,
m_OutputSurfaces[pipeIndex]->rcDst.bottom,
m_OutputSurfaces[pipeIndex]->GetAllocationHandle(m_vpInterface.GetHwInterface()->m_osInterface));
VP_PUBLIC_CHK_STATUS_RETURN(outputPipe->AddFeatureGraphRTLog());
}

Expand Down
26 changes: 0 additions & 26 deletions media_softlet/agnostic/common/vp/hal/pipeline/vp_pipeline.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -436,32 +436,6 @@ MOS_STATUS VpPipeline::ExecuteVpPipeline()

MT_LOG1(MT_VP_FEATURE_GRAPH_CREATESWFILTERPIPE_START, MT_NORMAL, MT_VP_FEATURE_GRAPH_FILTER_SWFILTERPIPE_COUNT, (int64_t)swFilterPipes.size());

if (params)
{
// RTLog for input surface
for (uint32_t i = 0; i < params->uSrcCount; i++)
{
MT_LOG7(MT_VP_FEATURE_GRAPH_INPUT_SURFACE_INFO, MT_NORMAL, MT_VP_FEATURE_GRAPH_SURFACE_WIDTH, params->pSrc[i]->dwWidth, MT_VP_FEATURE_GRAPH_SURFACE_HEIGHT, params->pSrc[i]->dwHeight, MT_VP_FEATURE_GRAPH_SURFACE_PITCH, params->pSrc[i]->dwPitch, MT_VP_FEATURE_GRAPH_SURFACE_RCSRC_LEFT, params->pSrc[i]->rcSrc.left, MT_VP_FEATURE_GRAPH_SURFACE_RCSRC_TOP, params->pSrc[i]->rcSrc.top, MT_VP_FEATURE_GRAPH_SURFACE_RCSRC_RIGHT, params->pSrc[i]->rcSrc.right, MT_VP_FEATURE_GRAPH_SURFACE_RCSRC_BOTTOM, params->pSrc[i]->rcSrc.bottom);
MT_LOG6(MT_VP_FEATURE_GRAPH_INPUT_SURFACE_INFO, MT_NORMAL, MT_VP_FEATURE_GRAPH_SURFACE_COLORSPACE, params->pSrc[i]->ColorSpace, MT_VP_FEATURE_GRAPH_SURFACE_FORMAT, params->pSrc[i]->Format, MT_VP_FEATURE_GRAPH_SURFACE_RCDST_LEFT, params->pSrc[i]->rcDst.left, MT_VP_FEATURE_GRAPH_SURFACE_RCDST_TOP, params->pSrc[i]->rcDst.top, MT_VP_FEATURE_GRAPH_SURFACE_RCDST_RIGHT, params->pSrc[i]->rcDst.right, MT_VP_FEATURE_GRAPH_SURFACE_RCDST_BOTTOM, params->pSrc[i]->rcDst.bottom);
VP_PUBLIC_NORMALMESSAGE("Feature Graph: Input Surface: dwWidth %d, dwHeight %d, dwPitch %d, ColorSpace %d, Format %d, \
rcSrc.left %d, rcSrc.top %d, rcSrc.right %d, rcSrc.bottom %d, \
rcDst.left %d, rcDst.top %d, rcDst.right %d, rcDst.bottom %d",
params->pSrc[i]->dwWidth, params->pSrc[i]->dwHeight, params->pSrc[i]->dwPitch, params->pSrc[i]->ColorSpace, params->pSrc[i]->Format,
params->pSrc[i]->rcSrc.left, params->pSrc[i]->rcSrc.top, params->pSrc[i]->rcSrc.right, params->pSrc[i]->rcSrc.bottom,
params->pSrc[i]->rcDst.left, params->pSrc[i]->rcDst.top, params->pSrc[i]->rcDst.right, params->pSrc[i]->rcDst.bottom);
}

// RTLog for output surface
MT_LOG7(MT_VP_FEATURE_GRAPH_OUTPUT_SURFACE_INFO, MT_NORMAL, MT_VP_FEATURE_GRAPH_SURFACE_WIDTH, params->pTarget[0]->dwWidth, MT_VP_FEATURE_GRAPH_SURFACE_HEIGHT, params->pTarget[0]->dwHeight, MT_VP_FEATURE_GRAPH_SURFACE_PITCH, params->pTarget[0]->dwPitch, MT_VP_FEATURE_GRAPH_SURFACE_RCSRC_LEFT, params->pTarget[0]->rcSrc.left, MT_VP_FEATURE_GRAPH_SURFACE_RCSRC_TOP, params->pTarget[0]->rcSrc.top, MT_VP_FEATURE_GRAPH_SURFACE_RCSRC_RIGHT, params->pTarget[0]->rcSrc.right, MT_VP_FEATURE_GRAPH_SURFACE_RCSRC_BOTTOM, params->pTarget[0]->rcSrc.bottom);
MT_LOG6(MT_VP_FEATURE_GRAPH_OUTPUT_SURFACE_INFO, MT_NORMAL, MT_VP_FEATURE_GRAPH_SURFACE_COLORSPACE, params->pTarget[0]->ColorSpace, MT_VP_FEATURE_GRAPH_SURFACE_FORMAT, params->pTarget[0]->Format, MT_VP_FEATURE_GRAPH_SURFACE_RCDST_LEFT, params->pTarget[0]->rcDst.left, MT_VP_FEATURE_GRAPH_SURFACE_RCDST_TOP, params->pTarget[0]->rcDst.top, MT_VP_FEATURE_GRAPH_SURFACE_RCDST_RIGHT, params->pTarget[0]->rcDst.right, MT_VP_FEATURE_GRAPH_SURFACE_RCDST_BOTTOM, params->pTarget[0]->rcDst.bottom);
VP_PUBLIC_NORMALMESSAGE("Feature Graph: Output Surface: dwWidth %d, dwHeight %d, dwPitch %d, ColorSpace %d, Format %d, \
rcSrc.left %d, rcSrc.top %d, rcSrc.right %d, rcSrc.bottom %d, \
rcDst.left %d, rcDst.top %d, rcDst.right %d, rcDst.bottom %d",
params->pTarget[0]->dwWidth, params->pTarget[0]->dwHeight, params->pTarget[0]->dwPitch, params->pTarget[0]->ColorSpace, params->pTarget[0]->Format,
params->pTarget[0]->rcSrc.left, params->pTarget[0]->rcSrc.top, params->pTarget[0]->rcSrc.right, params->pTarget[0]->rcSrc.bottom,
params->pTarget[0]->rcDst.left, params->pTarget[0]->rcDst.top, params->pTarget[0]->rcDst.right, params->pTarget[0]->rcDst.bottom);
}

for (uint32_t pipeIdx = 0; pipeIdx < swFilterPipes.size(); pipeIdx++)
{
auto &pipe = swFilterPipes[pipeIdx];
Expand Down

0 comments on commit 9830c10

Please sign in to comment.