Skip to content

Commit

Permalink
[Media Common] [VP] fix coverity issue 3
Browse files Browse the repository at this point in the history
fix coverity issue3
  • Loading branch information
Dylan-debug authored and intel-mediadev committed Sep 7, 2023
1 parent 72c08f7 commit 2331388
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 17 deletions.
2 changes: 1 addition & 1 deletion media_softlet/agnostic/common/hw/mhw_render_impl.h
Original file line number Diff line number Diff line change
Expand Up @@ -277,7 +277,7 @@ class Impl : public Itf, public mhw::Impl
par = {};
par.dwRegister = m_preemptionCntlRegisterOffset;
par.dwData = m_preemptionCntlRegisterValue;
miItf->MHW_ADDCMD_F(MI_LOAD_REGISTER_IMM)(cmdBuffer);
MHW_MI_CHK_STATUS(miItf->MHW_ADDCMD_F(MI_LOAD_REGISTER_IMM)(cmdBuffer));
}

return eStatus;
Expand Down
4 changes: 2 additions & 2 deletions media_softlet/agnostic/common/hw/mhw_utilities_next.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -508,15 +508,15 @@ MOS_STATUS Mhw_SendGenericPrologCmdNext(
auto& par = miItf->MHW_GETPAR_F(PIPE_CONTROL)();
par = {};
par.dwFlushMode = MHW_FLUSH_WRITE_CACHE;
miItf->MHW_ADDCMD_F(PIPE_CONTROL)(pCmdBuffer);
MHW_CHK_STATUS_RETURN(miItf->MHW_ADDCMD_F(PIPE_CONTROL)(pCmdBuffer));

auto& par1 = miItf->MHW_GETPAR_F(PIPE_CONTROL)();
par1 = {};
par1.dwFlushMode = MHW_FLUSH_READ_CACHE;
par1.presDest = pParams->presStoreData;
par1.dwResourceOffset = pParams->dwStoreDataOffset;
par1.dwPostSyncOp = MHW_FLUSH_WRITE_IMMEDIATE_DATA;
miItf->MHW_ADDCMD_F(PIPE_CONTROL)(pCmdBuffer);
MHW_CHK_STATUS_RETURN(miItf->MHW_ADDCMD_F(PIPE_CONTROL)(pCmdBuffer));

if(pCmdBuffer->Attributes.bUmdSSEUEnable)
{
Expand Down
11 changes: 0 additions & 11 deletions media_softlet/agnostic/common/os/mos_os.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -914,12 +914,6 @@ MOS_STATUS Mos_CheckVirtualEngineSupported(
MediaUserSetting::Group::Device);
osInterface->bSupportVirtualEngine = value ? true : false;
#endif
// force bSupportVirtualEngine to false when virtual engine not enabled by default
if ((!veDefaultEnable || !osInterface->veDefaultEnable) &&
(eStatus == MOS_STATUS_USER_FEATURE_KEY_OPEN_FAILED))
{
osInterface->bSupportVirtualEngine = false;
}

auto skuTable = osInterface->pfnGetSkuTable(osInterface);
MOS_OS_CHK_NULL_RETURN(skuTable);
Expand Down Expand Up @@ -960,11 +954,6 @@ MOS_STATUS Mos_CheckVirtualEngineSupported(
MediaUserSetting::Group::Device);
osInterface->bSupportVirtualEngine = value ? true : false;
#endif
// force bSupportVirtualEngine to false when virtual engine not enabled by default
if (!osInterface->veDefaultEnable && (eStatus == MOS_STATUS_USER_FEATURE_KEY_READ_FAILED || eStatus == MOS_STATUS_USER_FEATURE_KEY_OPEN_FAILED))
{
osInterface->bSupportVirtualEngine = false;
}

auto skuTable = osInterface->pfnGetSkuTable(osInterface);
MOS_OS_CHK_NULL_RETURN(skuTable);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,13 @@ MediaScalability *MediaScalabilityFactory<T>::CreateDecodeScalability(T params,
if (option != nullptr)
{
auto scalabPars = reinterpret_cast<ScalabilityPars *>(params);
option->SetScalabilityOption(scalabPars);
MOS_STATUS status = option->SetScalabilityOption(scalabPars);
if (status != MOS_STATUS_SUCCESS)
{
SCALABILITY_ASSERTMESSAGE("option->SetScalabilityOption failed w/ status == %d!", status);
MOS_Delete(option);
return nullptr;
}
}
}
else
Expand Down
4 changes: 2 additions & 2 deletions media_softlet/agnostic/common/vp/hal/pipeline/vp_pipeline.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -203,11 +203,11 @@ MOS_STATUS VpPipeline::UserFeatureReport()
}
#endif
}
}

m_reporting->GetFeatures().VPApogeios = m_currentFrameAPGEnabled;
}
MediaPipeline::UserFeatureReport();

m_reporting->GetFeatures().VPApogeios = m_currentFrameAPGEnabled;

#if (_DEBUG || _RELEASE_INTERNAL)
//INTER_FRAME_MEMORY_NINJA_START_COUNTER will be reported in ReportIFNCC(true) function which runs in VpPipeline::Prepare()
Expand Down

0 comments on commit 2331388

Please sign in to comment.