From 7e3e75a057e4f85fb5035292da4e29b8d4b37e58 Mon Sep 17 00:00:00 2001 From: Cai_Jianxing Date: Tue, 5 Sep 2023 17:30:14 +0800 Subject: [PATCH] [Media Common] [VP] fix kw issue fix kw mhw issue --- .../common/vp/hal/vphal_render_composite.cpp | 19 +++++-------------- .../agnostic/gen12/hw/mhw_state_heap_g12.c | 6 +++--- .../heap_manager/memory_block_manager.cpp | 1 + .../agnostic/common/os/mos_gpucontext_next.h | 2 +- 4 files changed, 10 insertions(+), 18 deletions(-) diff --git a/media_driver/agnostic/common/vp/hal/vphal_render_composite.cpp b/media_driver/agnostic/common/vp/hal/vphal_render_composite.cpp index 27288f71c10..e1dd8260da8 100644 --- a/media_driver/agnostic/common/vp/hal/vphal_render_composite.cpp +++ b/media_driver/agnostic/common/vp/hal/vphal_render_composite.cpp @@ -5867,20 +5867,11 @@ bool CompositeState::RenderBufferMediaWalker( else { // Horizontal and Vertical base on non-rotated in case of dual output - if (pRenderingData->bCmFcEnable && pRenderingData->iLayers > 0) - { - pWalkerStatic->DW69.DestHorizontalBlockOrigin = - (uint16_t)pRenderingData->pTarget[1]->rcDst.left; - pWalkerStatic->DW69.DestVerticalBlockOrigin = - (uint16_t)pRenderingData->pTarget[1]->rcDst.top; - } - else - { - pWalkerStatic->DW69.DestHorizontalBlockOrigin = - (uint16_t)pRenderingData->pTarget[1]->rcDst.left; - pWalkerStatic->DW69.DestVerticalBlockOrigin = - (uint16_t)pRenderingData->pTarget[1]->rcDst.top; - } + pWalkerStatic->DW69.DestHorizontalBlockOrigin = + (uint16_t)pRenderingData->pTarget[1]->rcDst.left; + pWalkerStatic->DW69.DestVerticalBlockOrigin = + (uint16_t)pRenderingData->pTarget[1]->rcDst.top; + AlignedRect = pRenderingData->pTarget[1]->rcDst; } diff --git a/media_driver/agnostic/gen12/hw/mhw_state_heap_g12.c b/media_driver/agnostic/gen12/hw/mhw_state_heap_g12.c index fce24bd17aa..64a5372bb2b 100644 --- a/media_driver/agnostic/gen12/hw/mhw_state_heap_g12.c +++ b/media_driver/agnostic/gen12/hw/mhw_state_heap_g12.c @@ -151,11 +151,11 @@ MOS_STATUS MHW_STATE_HEAP_INTERFACE_G12_X::AddInterfaceDescriptorData( // need to subtract memory block's offset in current state heap for AddData API offset -= pParams->memoryBlock->GetOffset(); - MHW_MI_CHK_STATUS(pParams->memoryBlock->AddData(pInterfaceDescriptor, offset, - sizeof(mhw_state_heap_g12_X::INTERFACE_DESCRIPTOR_DATA_CMD))); + eStatus = pParams->memoryBlock->AddData(pInterfaceDescriptor, offset, + sizeof(mhw_state_heap_g12_X::INTERFACE_DESCRIPTOR_DATA_CMD)); MOS_SafeFreeMemory(pInterfaceDescriptor); - + MHW_MI_CHK_STATUS(eStatus); return eStatus; } MOS_STATUS MHW_STATE_HEAP_INTERFACE_G12_X::SetSurfaceStateEntry( diff --git a/media_softlet/agnostic/common/heap_manager/memory_block_manager.cpp b/media_softlet/agnostic/common/heap_manager/memory_block_manager.cpp index 5ec48f4fcad..9327d419ce7 100644 --- a/media_softlet/agnostic/common/heap_manager/memory_block_manager.cpp +++ b/media_softlet/agnostic/common/heap_manager/memory_block_manager.cpp @@ -269,6 +269,7 @@ MOS_STATUS MemoryBlockManager::RegisterHeap(uint32_t heapId, uint32_t size , boo if (block == nullptr) { MOS_Delete(adjacencyListBegin); + HEAP_ASSERTMESSAGE("block be null"); return MOS_STATUS_NULL_POINTER; } diff --git a/media_softlet/agnostic/common/os/mos_gpucontext_next.h b/media_softlet/agnostic/common/os/mos_gpucontext_next.h index e0ba950d671..3e892c734f1 100644 --- a/media_softlet/agnostic/common/os/mos_gpucontext_next.h +++ b/media_softlet/agnostic/common/os/mos_gpucontext_next.h @@ -251,7 +251,7 @@ class GpuContextNext MOS_RESOURCE_HANDLE m_statusBufferResource = nullptr; //! \brief Track the GPU Context Client Info - MOS_GPU_CONTEXT m_gpuContext; + MOS_GPU_CONTEXT m_gpuContext = MOS_GPU_CONTEXT_INVALID_HANDLE; //! \brief VE attribute buffer MOS_CMD_BUF_ATTRI_VE m_bufAttriVe = {};