Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -353,6 +353,12 @@ MOS_STATUS McpyDeviceXe_Hpm::Initialize(
MhwInterfaces* mhwInterfaces = nullptr;

auto deleterOnFailure = [&](bool deleteOsInterface, bool deleteMhwInterface){
if (deleteMhwInterface && mhwInterfaces != nullptr)
{
mhwInterfaces->Destroy();
MOS_Delete(mhwInterfaces);
}

if (deleteOsInterface && osInterface != nullptr)
{
if (osInterface->pfnDestroy)
Expand All @@ -362,12 +368,6 @@ MOS_STATUS McpyDeviceXe_Hpm::Initialize(
MOS_FreeMemory(osInterface);
}

if (deleteMhwInterface && mhwInterfaces != nullptr)
{
mhwInterfaces->Destroy();
MOS_Delete(mhwInterfaces);
}

MOS_Delete(device);
};

Expand Down Expand Up @@ -1113,4 +1113,4 @@ MOS_STATUS CodechalInterfacesXe_Hpm::CreateCodecHalInterface(MhwInterfaces *mhwI
}
#endif // USE_CODECHAL_DEBUG_TOOL
return MOS_STATUS_SUCCESS;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -415,6 +415,12 @@ MOS_STATUS McpyDeviceG12Tgllp::Initialize(
MhwInterfaces* mhwInterfaces = nullptr;

auto deleterOnFailure = [&](bool deleteOsInterface, bool deleteMhwInterface){
if (deleteMhwInterface && mhwInterfaces != nullptr)
{
mhwInterfaces->Destroy();
MOS_Delete(mhwInterfaces);
}

if (deleteOsInterface && osInterface != nullptr)
{
if (osInterface->pfnDestroy)
Expand All @@ -424,12 +430,6 @@ MOS_STATUS McpyDeviceG12Tgllp::Initialize(
MOS_FreeMemory(osInterface);
}

if (deleteMhwInterface && mhwInterfaces != nullptr)
{
mhwInterfaces->Destroy();
MOS_Delete(mhwInterfaces);
}

MOS_Delete(device);
};

Expand Down Expand Up @@ -1012,4 +1012,4 @@ MOS_STATUS MediaInterfacesHwInfoDeviceG12Tgllp::Initialize(PLATFORM platform)
{
m_hwInfo.SetDeviceInfo(IP_VERSION_M12_0, platform.usRevId);
return MOS_STATUS_SUCCESS;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -333,6 +333,12 @@ MOS_STATUS McpyDeviceXe_Xpm_Plus::Initialize(
MhwInterfaces* mhwInterfaces = nullptr;

auto deleterOnFailure = [&](bool deleteOsInterface, bool deleteMhwInterface){
if (deleteMhwInterface && mhwInterfaces != nullptr)
{
mhwInterfaces->Destroy();
MOS_Delete(mhwInterfaces);
}

if (deleteOsInterface && osInterface != nullptr)
{
if (osInterface->pfnDestroy)
Expand All @@ -342,12 +348,6 @@ MOS_STATUS McpyDeviceXe_Xpm_Plus::Initialize(
MOS_FreeMemory(osInterface);
}

if (deleteMhwInterface && mhwInterfaces != nullptr)
{
mhwInterfaces->Destroy();
MOS_Delete(mhwInterfaces);
}

MOS_Delete(device);
};

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -311,6 +311,12 @@ MOS_STATUS McpyDeviceXe_Xpm::Initialize(
MhwInterfaces* mhwInterfaces = nullptr;

auto deleterOnFailure = [&](bool deleteOsInterface, bool deleteMhwInterface){
if (deleteMhwInterface && mhwInterfaces != nullptr)
{
mhwInterfaces->Destroy();
MOS_Delete(mhwInterfaces);
}

if (deleteOsInterface && osInterface != nullptr)
{
if (osInterface->pfnDestroy)
Expand All @@ -320,12 +326,6 @@ MOS_STATUS McpyDeviceXe_Xpm::Initialize(
MOS_FreeMemory(osInterface);
}

if (deleteMhwInterface && mhwInterfaces != nullptr)
{
mhwInterfaces->Destroy();
MOS_Delete(mhwInterfaces);
}

MOS_Delete(device);
};

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,12 @@ class McpyDeviceNext_T : public McpyDeviceNext
Mhw *mhwInterfaces = nullptr;

auto deleterOnFailure = [&](bool deleteOsInterface, bool deleteMhwInterface) {
if (deleteMhwInterface && mhwInterfaces != nullptr)
{
mhwInterfaces->Destroy();
MOS_Delete(mhwInterfaces);
}

if (deleteOsInterface && osInterface != nullptr)
{
if (osInterface->pfnDestroy)
Expand All @@ -99,12 +105,6 @@ class McpyDeviceNext_T : public McpyDeviceNext
MOS_FreeMemory(osInterface);
}

if (deleteMhwInterface && mhwInterfaces != nullptr)
{
mhwInterfaces->Destroy();
MOS_Delete(mhwInterfaces);
}

MOS_Delete(device);
};

Expand Down
Loading