From 7d929f6e4bf90880d30d67c875841a45acd806df Mon Sep 17 00:00:00 2001 From: Gu_Lihao Date: Fri, 3 Jan 2025 11:51:31 +0800 Subject: [PATCH] [VP] Remove Compute/Render GPU context creation in PipeSM KMD changed some logic in PipeSM Render/Conpute GPU context creation, and media component needs to remove the creation call when there is no GT IP. --- .../common/vp/hal/pipeline/vp_pipeline.cpp | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/media_softlet/agnostic/common/vp/hal/pipeline/vp_pipeline.cpp b/media_softlet/agnostic/common/vp/hal/pipeline/vp_pipeline.cpp index 5c93ad839de..6a763e56a53 100644 --- a/media_softlet/agnostic/common/vp/hal/pipeline/vp_pipeline.cpp +++ b/media_softlet/agnostic/common/vp/hal/pipeline/vp_pipeline.cpp @@ -417,13 +417,15 @@ MOS_STATUS VpPipeline::Init(void *mhwInterface) VP_PUBLIC_CHK_STATUS_RETURN(PacketPipe::SwitchContext(VP_PIPELINE_PACKET_VEBOX, m_scalability, m_mediaContext, MOS_VE_SUPPORTED(m_osInterface), m_numVebox)); } - - bool computeContextEnabled = m_userFeatureControl->IsComputeContextEnabled(); - auto packetId = computeContextEnabled ? VP_PIPELINE_PACKET_COMPUTE : VP_PIPELINE_PACKET_RENDER; - VP_PUBLIC_NORMALMESSAGE("Create GpuContext for Compute/Render (PacketId: %d).", packetId); - VP_PUBLIC_CHK_STATUS_RETURN(PacketPipe::SwitchContext(packetId, m_scalability, - m_mediaContext, MOS_VE_SUPPORTED(m_osInterface), m_numVebox)); - + // If the environment is SA media in which there are no GT IP, we could not create/use Render or Compute GPU context. + if (!(m_skuTable && MEDIA_IS_SKU(m_skuTable, FtrDisableGtIpSubmissions))) + { + bool computeContextEnabled = m_userFeatureControl->IsComputeContextEnabled(); + auto packetId = computeContextEnabled ? VP_PIPELINE_PACKET_COMPUTE : VP_PIPELINE_PACKET_RENDER; + VP_PUBLIC_NORMALMESSAGE("Create GpuContext for Compute/Render (PacketId: %d).", packetId); + VP_PUBLIC_CHK_STATUS_RETURN(PacketPipe::SwitchContext(packetId, m_scalability, + m_mediaContext, MOS_VE_SUPPORTED(m_osInterface), m_numVebox)); + } // create SinglePipe GpuContext for multi Vebox system to avoid first frame long latency issue if (m_numVebox > 1 && !(m_vpSettings && m_vpSettings->clearVideoViewMode)) {