From 7b6de80d860eff0df095aa114a19412fc8360156 Mon Sep 17 00:00:00 2001 From: Chen_JasonK Date: Mon, 22 Jul 2019 14:50:02 +0800 Subject: [PATCH] [VP] Fix KW issue Fix un-initialized issue Change-Id: I64ab045047fd317b8a82dbae57dca7e1d44ff425 --- media_driver/agnostic/common/hw/mhw_sfc.cpp | 8 +++++--- media_driver/agnostic/common/hw/mhw_vebox.cpp | 4 +++- media_driver/agnostic/common/vp/hal/vphal_debug.h | 2 ++ 3 files changed, 10 insertions(+), 4 deletions(-) diff --git a/media_driver/agnostic/common/hw/mhw_sfc.cpp b/media_driver/agnostic/common/hw/mhw_sfc.cpp index 5cc0ea71d84..9304e4a2bec 100644 --- a/media_driver/agnostic/common/hw/mhw_sfc.cpp +++ b/media_driver/agnostic/common/hw/mhw_sfc.cpp @@ -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"); @@ -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) { diff --git a/media_driver/agnostic/common/hw/mhw_vebox.cpp b/media_driver/agnostic/common/hw/mhw_vebox.cpp index e2dc1710643..2b396a09c8d 100644 --- a/media_driver/agnostic/common/hw/mhw_vebox.cpp +++ b/media_driver/agnostic/common/hw/mhw_vebox.cpp @@ -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) { diff --git a/media_driver/agnostic/common/vp/hal/vphal_debug.h b/media_driver/agnostic/common/vp/hal/vphal_debug.h index 0bff37637f9..b06cf4fc71d 100644 --- a/media_driver/agnostic/common/vp/hal/vphal_debug.h +++ b/media_driver/agnostic/common/vp/hal/vphal_debug.h @@ -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),