Skip to content

Commit

Permalink
[VP] Enable 3dLut PerfTag
Browse files Browse the repository at this point in the history
Enable 3DLut PerfTag for ocl and cm kernel
  • Loading branch information
kchen1024 authored and intel-mediadev committed Nov 22, 2024
1 parent 699dcd8 commit d28c8f0
Show file tree
Hide file tree
Showing 5 changed files with 39 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -229,6 +229,7 @@ MOS_STATUS VpRenderCmdPacket::Prepare()
VP_RENDER_CHK_NULL_RETURN(m_kernel);

m_kernel->SetCacheCntl(m_surfMemCacheCtl);
m_kernel->SetPerfTag();
VP_RENDER_CHK_STATUS_RETURN(SetEuThreadSchedulingMode(m_kernel->GetEuThreadSchedulingMode()));

// reset render Data for current kernel
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -427,6 +427,18 @@ MOS_STATUS VpRenderHdr3DLutKernel::InitCoefSurface(const uint32_t maxDLL, const
return MOS_STATUS_SUCCESS;
}

MOS_STATUS VpRenderHdr3DLutKernel::SetPerfTag()
{
VP_FUNC_CALL();
VP_RENDER_CHK_NULL_RETURN(m_hwInterface);
auto osInterface = m_hwInterface->m_osInterface;
VP_RENDER_CHK_NULL_RETURN(osInterface);
VP_RENDER_CHK_NULL_RETURN(osInterface->pfnSetPerfTag);

osInterface->pfnSetPerfTag(osInterface, VPHAL_EU3DLUT);
return MOS_STATUS_SUCCESS;
}

VpRenderHdr3DLutKernelCM::VpRenderHdr3DLutKernelCM(PVP_MHWINTERFACE hwInterface, VpKernelID kernelID, uint32_t kernelIndex, PVpAllocator allocator) :
VpRenderHdr3DLutKernel(hwInterface, kernelID, kernelIndex, VP_HDR_KERNEL_NAME, allocator)
{
Expand Down Expand Up @@ -636,3 +648,15 @@ MOS_STATUS VpRenderHdr3DLutKernelCM::SetKernelConfigs(KERNEL_CONFIGS& kernelConf

return MOS_STATUS_SUCCESS;
}

MOS_STATUS VpRenderHdr3DLutKernelCM::SetPerfTag()
{
VP_FUNC_CALL();
VP_RENDER_CHK_NULL_RETURN(m_hwInterface);
auto osInterface = m_hwInterface->m_osInterface;
VP_RENDER_CHK_NULL_RETURN(osInterface);
VP_RENDER_CHK_NULL_RETURN(osInterface->pfnSetPerfTag);

osInterface->pfnSetPerfTag(osInterface, VPHAL_EU3DLUT);
return MOS_STATUS_SUCCESS;
}
Original file line number Diff line number Diff line change
Expand Up @@ -198,6 +198,7 @@ class VpRenderHdr3DLutKernel : public VpRenderKernelObj
}
virtual MOS_STATUS GetWalkerSetting(KERNEL_WALKER_PARAMS &walkerParam, KERNEL_PACKET_RENDER_DATA &renderData) override;
virtual MOS_STATUS InitCoefSurface(const uint32_t maxDLL, const uint32_t maxCLL, const VPHAL_HDR_MODE hdrMode);
virtual MOS_STATUS SetPerfTag() override;

protected:
virtual MOS_STATUS SetupSurfaceState() override;
Expand Down Expand Up @@ -245,6 +246,8 @@ class VpRenderHdr3DLutKernelCM : public VpRenderHdr3DLutKernel

virtual MOS_STATUS GetWalkerSetting(KERNEL_WALKER_PARAMS &walkerParam, KERNEL_PACKET_RENDER_DATA &renderData) override;

virtual MOS_STATUS SetPerfTag() override;

protected:
virtual MOS_STATUS SetupSurfaceState() override;
virtual MOS_STATUS CpPrepareResources() override;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -524,7 +524,17 @@ MOS_STATUS VpRenderHdr3DLutOclKernel::SetKernelConfigs(KERNEL_CONFIGS &kernelCon
return MOS_STATUS_SUCCESS;
}

MOS_STATUS VpRenderHdr3DLutOclKernel::SetPerfTag()
{
VP_FUNC_CALL();
VP_RENDER_CHK_NULL_RETURN(m_hwInterface);
auto osInterface = m_hwInterface->m_osInterface;
VP_RENDER_CHK_NULL_RETURN(osInterface);
VP_RENDER_CHK_NULL_RETURN(osInterface->pfnSetPerfTag);

osInterface->pfnSetPerfTag(osInterface, VPHAL_OCL_3DLUT);
return MOS_STATUS_SUCCESS;
}

MOS_STATUS VpRenderHdr3DLutOclKernel::SetKernelArgs(KERNEL_ARGS &kernelArgs, VP_PACKET_SHARED_CONTEXT *sharedContext)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ class VpRenderHdr3DLutOclKernel : public VpRenderKernelObj
}
virtual MOS_STATUS GetWalkerSetting(KERNEL_WALKER_PARAMS &walkerParam, KERNEL_PACKET_RENDER_DATA &renderData) override;
virtual MOS_STATUS InitCoefSurface(const uint32_t maxDLL, const uint32_t maxCLL, const VPHAL_HDR_MODE hdrMode);
virtual MOS_STATUS SetPerfTag() override;

protected:
virtual MOS_STATUS SetupSurfaceState() override;
Expand Down

0 comments on commit d28c8f0

Please sign in to comment.