From 58ab522e3548b336e27bc84a2031e05e4a03b7df Mon Sep 17 00:00:00 2001 From: Zeng_Vicky Date: Fri, 8 Sep 2023 16:44:33 +0800 Subject: [PATCH] [VP] Coverity issues clean up part 2 Fix coverity issues. --- .../Xe_M/Xe_XPM_plus/vp/hal/vphal_xe_xpm_plus.h | 2 +- .../shared/mediacopy/media_vebox_copy.cpp | 17 ----------------- .../common/shared/mediacopy/media_vebox_copy.h | 1 - .../gen12_tgllp/vp/hal/vphal_g12_tgllp.h | 2 +- 4 files changed, 2 insertions(+), 20 deletions(-) diff --git a/media_driver/agnostic/Xe_M/Xe_XPM_plus/vp/hal/vphal_xe_xpm_plus.h b/media_driver/agnostic/Xe_M/Xe_XPM_plus/vp/hal/vphal_xe_xpm_plus.h index 4372ebd2099..bc858b59355 100644 --- a/media_driver/agnostic/Xe_M/Xe_XPM_plus/vp/hal/vphal_xe_xpm_plus.h +++ b/media_driver/agnostic/Xe_M/Xe_XPM_plus/vp/hal/vphal_xe_xpm_plus.h @@ -84,7 +84,7 @@ class VphalStateXe_Xpm_Plus : public VphalState } #endif - if (!MEDIA_IS_SKU(m_skuTable, FtrCCSNode)) + if (m_skuTable && !MEDIA_IS_SKU(m_skuTable, FtrCCSNode)) { bComputeContextEnabled = false; } diff --git a/media_driver/agnostic/common/shared/mediacopy/media_vebox_copy.cpp b/media_driver/agnostic/common/shared/mediacopy/media_vebox_copy.cpp index 5ed3261553f..22ea3beecc0 100644 --- a/media_driver/agnostic/common/shared/mediacopy/media_vebox_copy.cpp +++ b/media_driver/agnostic/common/shared/mediacopy/media_vebox_copy.cpp @@ -44,23 +44,6 @@ #define SURFACE_DW_VY_OFFSET(pSurface) \ ((pSurface) != nullptr ? ((pSurface)->VPlaneOffset.iSurfaceOffset - (pSurface)->dwOffset) / (pSurface)->dwPitch + (pSurface)->VPlaneOffset.iYOffset : 0) -VeboxCopyState::VeboxCopyState(PMOS_INTERFACE osInterface) : - m_osInterface(osInterface), - m_mhwInterfaces(nullptr), - m_miInterface(nullptr), - m_veboxInterface(nullptr), - m_cpInterface(nullptr) -{ - MOS_ZeroMemory(¶ms, sizeof(params)); - params.Flags.m_vebox = 1; - m_mhwInterfaces = MhwInterfaces::CreateFactory(params, osInterface); - if (m_mhwInterfaces != nullptr) - { - m_veboxInterface = m_mhwInterfaces->m_veboxInterface; - m_miInterface = m_mhwInterfaces->m_miInterface; - } -} - VeboxCopyState::VeboxCopyState(PMOS_INTERFACE osInterface, MhwInterfaces* mhwInterfaces) : m_osInterface(osInterface), m_mhwInterfaces(nullptr), diff --git a/media_driver/agnostic/common/shared/mediacopy/media_vebox_copy.h b/media_driver/agnostic/common/shared/mediacopy/media_vebox_copy.h index 5aef399a888..eed2153224b 100644 --- a/media_driver/agnostic/common/shared/mediacopy/media_vebox_copy.h +++ b/media_driver/agnostic/common/shared/mediacopy/media_vebox_copy.h @@ -55,7 +55,6 @@ class VeboxCopyState //! \param osInterface //! [in] Pointer to MOS_INTERFACE. //! - VeboxCopyState(PMOS_INTERFACE osInterface); VeboxCopyState(PMOS_INTERFACE osInterface, MhwInterfaces* mhwInterfaces); virtual ~VeboxCopyState(); diff --git a/media_driver/agnostic/gen12_tgllp/vp/hal/vphal_g12_tgllp.h b/media_driver/agnostic/gen12_tgllp/vp/hal/vphal_g12_tgllp.h index 71a13e2272d..d2bcab576f9 100644 --- a/media_driver/agnostic/gen12_tgllp/vp/hal/vphal_g12_tgllp.h +++ b/media_driver/agnostic/gen12_tgllp/vp/hal/vphal_g12_tgllp.h @@ -82,7 +82,7 @@ class VphalStateG12Tgllp : public VphalState bComputeContextEnabled = computeContextEnabled ? true : false; } - if (!MEDIA_IS_SKU(m_skuTable, FtrCCSNode)) + if (m_skuTable && !MEDIA_IS_SKU(m_skuTable, FtrCCSNode)) { bComputeContextEnabled = false; }