Skip to content

Commit

Permalink
[VP] Fix KW issue
Browse files Browse the repository at this point in the history
Fix un-initialized issue

Change-Id: I64ab045047fd317b8a82dbae57dca7e1d44ff425
  • Loading branch information
Jister authored and Sherry-Lin committed Jul 25, 2019
1 parent 09420af commit 7b6de80
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 4 deletions.
8 changes: 5 additions & 3 deletions media_driver/agnostic/common/hw/mhw_sfc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,11 @@ MhwSfcInterface::MhwSfcInterface(PMOS_INTERFACE pOsInterface)
{
MHW_FUNCTION_ENTER;

MOS_ZeroMemory(&m_outputSurfCtrl, sizeof(m_outputSurfCtrl));
MOS_ZeroMemory(&m_avsLineBufferCtrl, sizeof(m_avsLineBufferCtrl));
MOS_ZeroMemory(&m_iefLineBufferCtrl, sizeof(m_iefLineBufferCtrl));
pfnAddResourceToCmd = nullptr;

if (pOsInterface == nullptr)
{
MHW_ASSERTMESSAGE("Invalid input pointers provided");
Expand All @@ -44,9 +49,6 @@ MhwSfcInterface::MhwSfcInterface(PMOS_INTERFACE pOsInterface)
}

m_osInterface = pOsInterface;
memset(&m_outputSurfCtrl, 0, sizeof(m_outputSurfCtrl));
memset(&m_avsLineBufferCtrl, 0, sizeof(m_avsLineBufferCtrl));
memset(&m_iefLineBufferCtrl, 0, sizeof(m_iefLineBufferCtrl));

if (m_osInterface->bUsesGfxAddress)
{
Expand Down
4 changes: 3 additions & 1 deletion media_driver/agnostic/common/hw/mhw_vebox.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -365,13 +365,15 @@ MhwVeboxInterface::MhwVeboxInterface(PMOS_INTERFACE pOsInterface)
{
MHW_FUNCTION_ENTER;

MOS_ZeroMemory(&m_veboxSettings, sizeof(m_veboxSettings));
pfnAddResourceToCmd = nullptr;

if (pOsInterface == nullptr)
{
MHW_ASSERTMESSAGE("Invalid input pointers provided");
return;
}
m_osInterface = pOsInterface;
memset(&m_veboxSettings, 0, sizeof(m_veboxSettings));

if (m_osInterface->bUsesGfxAddress)
{
Expand Down
2 changes: 2 additions & 0 deletions media_driver/agnostic/common/vp/hal/vphal_debug.h
Original file line number Diff line number Diff line change
Expand Up @@ -624,6 +624,8 @@ class VphalHwStateDumper
//!
VphalHwStateDumper(PRENDERHAL_INTERFACE pRenderHal)
: m_renderHal(pRenderHal),
iDebugStage(0),
iPhase(0),
m_osInterface(pRenderHal->pOsInterface),
m_hwSizes(pRenderHal->pHwSizes),
m_stateHeap(pRenderHal->pStateHeap),
Expand Down

0 comments on commit 7b6de80

Please sign in to comment.