Skip to content

Commit

Permalink
[Media Common] [VP] [HWS] clean up three hws native fence sync by cmd…
Browse files Browse the repository at this point in the history
… issues

1. lnl+ platform mos do not need mhw_cp
2. synchronizeWithFence code clerical error
3. for stage 2 only os api wait can be used for app fence. for stage 3 need to switch to cmd sync for app fence.
  • Loading branch information
Dylan-debug authored and intel-mediadev committed Feb 11, 2025
1 parent c59b584 commit 223d039
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -168,18 +168,24 @@ MOS_STATUS MhwInterfacesBmg_Next::Initialize(
return MOS_STATUS_INVALID_PARAMETER;
}

if ((params.m_isCp == false) && (params.Flags.m_value == 0))
if ((params.m_isCp == false) && (params.Flags.m_value == 0) && (params.m_isMos == 0))
{
MHW_ASSERTMESSAGE("No MHW interfaces were requested for creation.");
return MOS_STATUS_INVALID_PARAMETER;
}
//MHW_MI must always be created
auto ptr = std::make_shared<mhw::mi::xe_lpm_plus_base_next::Impl>(osInterface);
m_miItf = std::static_pointer_cast<mhw::mi::Itf>(ptr);
//For mos, need miInterface only
if (params.m_isMos)
{
return MOS_STATUS_SUCCESS;
}

// MHW_CP and MHW_MI must always be created
// MHW_CP must always be created
MOS_STATUS status;
m_cpInterface = osInterface->pfnCreateMhwCpInterface(osInterface);
MHW_MI_CHK_NULL(m_cpInterface);
auto ptr = std::make_shared<mhw::mi::xe_lpm_plus_base_next::Impl>(osInterface);
m_miItf = std::static_pointer_cast<mhw::mi::Itf>(ptr);
ptr->SetCpInterface(m_cpInterface, m_miItf);

if (params.Flags.m_render)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -188,18 +188,24 @@ MOS_STATUS MhwInterfacesLnl_Next::Initialize(
return MOS_STATUS_INVALID_PARAMETER;
}

if ((params.m_isCp == false) && (params.Flags.m_value == 0))
if ((params.m_isCp == false) && (params.Flags.m_value == 0) && (params.m_isMos == 0))
{
MHW_ASSERTMESSAGE("No MHW interfaces were requested for creation.");
return MOS_STATUS_INVALID_PARAMETER;
}
//MHW_MI must always be created
auto ptr = std::make_shared<mhw::mi::xe2_lpm_base_next::Impl>(osInterface);
m_miItf = std::static_pointer_cast<mhw::mi::Itf>(ptr);
//For mos, need miInterface only
if (params.m_isMos)
{
return MOS_STATUS_SUCCESS;
}

// MHW_CP and MHW_MI must always be created
// MHW_CP must always be created
MOS_STATUS status;
m_cpInterface = osInterface->pfnCreateMhwCpInterface(osInterface);
MHW_MI_CHK_NULL(m_cpInterface);
auto ptr = std::make_shared<mhw::mi::xe2_lpm_base_next::Impl>(osInterface);
m_miItf = std::static_pointer_cast<mhw::mi::Itf>(ptr);
ptr->SetCpInterface(m_cpInterface, m_miItf);

if (params.Flags.m_render)
Expand Down

0 comments on commit 223d039

Please sign in to comment.