diff --git a/media_softlet/agnostic/common/vp/hal/feature_manager/policy.cpp b/media_softlet/agnostic/common/vp/hal/feature_manager/policy.cpp index 1fb585efe4..5c3a19ecd4 100644 --- a/media_softlet/agnostic/common/vp/hal/feature_manager/policy.cpp +++ b/media_softlet/agnostic/common/vp/hal/feature_manager/policy.cpp @@ -1246,6 +1246,9 @@ MOS_STATUS Policy::GetScalingExecutionCaps(SwFilter *feature, bool isHdrEnabled, scalingParams->output.dwPitch != 128 && scalingParams->output.dwPitch != 256 && (scalingParams->output.dwPitch % 1024) !=0 && + !(scalingParams->formatOutput == Format_RGBP || + scalingParams->formatOutput == Format_BGRP || + scalingParams->formatOutput == Format_R8G8B8) && scalingParams->output.tileMode == MOS_TILE_LINEAR_GMM) { scalingEngine->enableSFCLinearOutputByTileConvert = true; diff --git a/media_softlet/agnostic/common/vp/hal/packet/vp_vebox_cmd_packet.cpp b/media_softlet/agnostic/common/vp/hal/packet/vp_vebox_cmd_packet.cpp index eccfa08017..324a7ffaca 100644 --- a/media_softlet/agnostic/common/vp/hal/packet/vp_vebox_cmd_packet.cpp +++ b/media_softlet/agnostic/common/vp/hal/packet/vp_vebox_cmd_packet.cpp @@ -2136,9 +2136,33 @@ MOS_STATUS VpVeboxCmdPacket::RenderVeboxCmd( return eStatus; } +// Meida copy has the same logic, when Format_R10G10B10A2/Format_B10G10R10A2, the output is AYUV, and in this WA there is corruption for these two format. +MOS_FORMAT VpVeboxCmdPacket::AdjustFormatForTileConvert(MOS_FORMAT format) +{ + if (format == Format_R10G10B10A2 || + format == Format_B10G10R10A2 || + format == Format_Y410 || + format == Format_Y210) + { + // RGB10 not supported without IECP. Re-map RGB10/RGB10 as AYUV + // Y410/Y210 has HW issue. Remap to AYUV. + return Format_AYUV; + } + else if (format == Format_A8) + { + return Format_P8; + } + else + { + return format; + } +} MOS_STATUS VpVeboxCmdPacket::AddTileConvertStates(MOS_COMMAND_BUFFER *CmdBuffer, MHW_VEBOX_SURFACE_STATE_CMD_PARAMS &MhwVeboxSurfaceStateCmdParams) { + auto &flushDwParams = m_miItf->MHW_GETPAR_F(MI_FLUSH_DW)(); + flushDwParams = {}; + VP_RENDER_CHK_STATUS_RETURN(m_miItf->MHW_ADDCMD_F(MI_FLUSH_DW)(CmdBuffer)); // Prepare Vebox_Surface_State, surface input/and output are the same but the compressed status. VP_RENDER_CHK_STATUS_RETURN(InitVeboxSurfaceStateCmdParamsForTileConvert(&MhwVeboxSurfaceStateCmdParams, m_renderTarget->osSurface, m_originalOutput->osSurface)); @@ -2155,9 +2179,7 @@ MOS_STATUS VpVeboxCmdPacket::AddTileConvertStates(MOS_COMMAND_BUFFER *CmdBuffer, // Send CMD: Vebox_Tiling_Convert //--------------------------------- VP_RENDER_CHK_STATUS_RETURN(m_veboxItf->AddVeboxTilingConvert(CmdBuffer, &MhwVeboxSurfaceStateCmdParams.SurfInput, &MhwVeboxSurfaceStateCmdParams.SurfOutput)); - - auto &flushDwParams = m_miItf->MHW_GETPAR_F(MI_FLUSH_DW)(); - flushDwParams = {}; + flushDwParams = {}; VP_RENDER_CHK_STATUS_RETURN(m_miItf->MHW_ADDCMD_F(MI_FLUSH_DW)(CmdBuffer)); return MOS_STATUS_SUCCESS; } @@ -2186,7 +2208,7 @@ MOS_STATUS VpVeboxCmdPacket::InitVeboxSurfaceStateCmdParamsForTileConvert( MOS_MIN(inputSurface->dwHeight, ((outputSurface != nullptr) ? outputSurface->dwHeight : inputSurface->dwHeight)); mhwVeboxSurfaceStateCmdParams->SurfInput.dwWidth = mhwVeboxSurfaceStateCmdParams->SurfOutput.dwWidth = MOS_MIN(inputSurface->dwWidth, ((outputSurface != nullptr) ? outputSurface->dwWidth : inputSurface->dwWidth)); - mhwVeboxSurfaceStateCmdParams->SurfInput.Format = mhwVeboxSurfaceStateCmdParams->SurfOutput.Format = inputSurface->Format; + mhwVeboxSurfaceStateCmdParams->SurfInput.Format = mhwVeboxSurfaceStateCmdParams->SurfOutput.Format = AdjustFormatForTileConvert(inputSurface->Format); MOS_SURFACE inputDetails, outputDetails; MOS_ZeroMemory(&inputDetails, sizeof(inputDetails)); diff --git a/media_softlet/agnostic/common/vp/hal/packet/vp_vebox_cmd_packet.h b/media_softlet/agnostic/common/vp/hal/packet/vp_vebox_cmd_packet.h index b89e30389b..5137f12616 100644 --- a/media_softlet/agnostic/common/vp/hal/packet/vp_vebox_cmd_packet.h +++ b/media_softlet/agnostic/common/vp/hal/packet/vp_vebox_cmd_packet.h @@ -931,6 +931,7 @@ class VpVeboxCmdPacket : virtual public VpVeboxCmdPacketBase MOS_COMMAND_BUFFER *CmdBuffer, MHW_VEBOX_SURFACE_STATE_CMD_PARAMS &MhwVeboxSurfaceStateCmdParams); + MOS_FORMAT AdjustFormatForTileConvert(MOS_FORMAT format); // TGNE uint32_t dwGlobalNoiseLevel_Temporal = 0; //!< Global Temporal Noise Level for Y uint32_t dwGlobalNoiseLevelU_Temporal = 0; //!< Global Temporal Noise Level for U diff --git a/media_softlet/agnostic/common/vp/hal/pipeline/vp_feature_report.cpp b/media_softlet/agnostic/common/vp/hal/pipeline/vp_feature_report.cpp index ddf34cd696..cb716f305f 100644 --- a/media_softlet/agnostic/common/vp/hal/pipeline/vp_feature_report.cpp +++ b/media_softlet/agnostic/common/vp/hal/pipeline/vp_feature_report.cpp @@ -152,7 +152,7 @@ void VpFeatureReport::SetConfigValues( PrimaryCompressible %d, \ PrimaryCompressMode %d, \ CompositionMode %d, \ - sfcLinearOutputByTileConvert", + sfcLinearOutputByTileConvert %d", m_features.outputPipeMode, m_features.hdrMode, m_features.veFeatureInUse, diff --git a/media_softlet/agnostic/common/vp/hal/utils/vp_user_feature_control.cpp b/media_softlet/agnostic/common/vp/hal/utils/vp_user_feature_control.cpp index b7719bca4a..4592b141eb 100644 --- a/media_softlet/agnostic/common/vp/hal/utils/vp_user_feature_control.cpp +++ b/media_softlet/agnostic/common/vp/hal/utils/vp_user_feature_control.cpp @@ -472,8 +472,9 @@ MOS_STATUS VpUserFeatureControl::CreateUserSettingForDebug() else #endif { + auto *waTable = m_osInterface->pfnGetWaTable(m_osInterface); // Default value - m_ctrlValDefault.enableSFCLinearOutputByTileConvert = false; + m_ctrlValDefault.enableSFCLinearOutputByTileConvert = MEDIA_IS_WA(waTable, Wa_15016458807); } VP_PUBLIC_NORMALMESSAGE("enableSFCLinearOutputByTileConvert value is set as %d.", m_ctrlValDefault.enableSFCLinearOutputByTileConvert); diff --git a/media_softlet/linux/common/os/mos_interface.cpp b/media_softlet/linux/common/os/mos_interface.cpp index 16b87f9e06..113c601c28 100644 --- a/media_softlet/linux/common/os/mos_interface.cpp +++ b/media_softlet/linux/common/os/mos_interface.cpp @@ -3820,6 +3820,7 @@ MOS_FORMAT MosInterface::GmmFmtToMosFmt( {GMM_FORMAT_R16G16B16A16_UNORM_TYPE, Format_A16B16G16R16}, {GMM_FORMAT_R16G16B16A16_FLOAT_TYPE, Format_A16B16G16R16F}, {GMM_FORMAT_R10G10B10A2_UNORM_TYPE, Format_R10G10B10A2}, + {GMM_FORMAT_B10G10R10A2_UNORM_TYPE, Format_B10G10R10A2}, {GMM_FORMAT_MFX_JPEG_YUV422H_TYPE, Format_422H}, {GMM_FORMAT_MFX_JPEG_YUV411_TYPE, Format_411P}, {GMM_FORMAT_MFX_JPEG_YUV422V_TYPE, Format_422V}, @@ -3902,6 +3903,7 @@ GMM_RESOURCE_FORMAT MosInterface::MosFmtToGmmFmt(MOS_FORMAT format) {Format_Y210, GMM_FORMAT_Y210_TYPE}, {Format_Y410, GMM_FORMAT_Y410_TYPE}, {Format_R10G10B10A2, GMM_FORMAT_R10G10B10A2_UNORM_TYPE}, + {Format_B10G10R10A2, GMM_FORMAT_B10G10R10A2_UNORM_TYPE}, {Format_A16B16G16R16F, GMM_FORMAT_R16G16B16A16_FLOAT}, {Format_R32G32B32A32F, GMM_FORMAT_R32G32B32A32_FLOAT} }; diff --git a/media_softlet/linux/xe2_hpm/ddi/media_sku_wa_bmg.cpp b/media_softlet/linux/xe2_hpm/ddi/media_sku_wa_bmg.cpp index 51ba2299b0..e33f678477 100644 --- a/media_softlet/linux/xe2_hpm/ddi/media_sku_wa_bmg.cpp +++ b/media_softlet/linux/xe2_hpm/ddi/media_sku_wa_bmg.cpp @@ -297,6 +297,8 @@ static bool InitBmgMediaWaExt(struct GfxDeviceInfo *devInfo, MEDIA_WR_WA(waTable, Wa_15013906446, 1); + MEDIA_WR_WA(waTable, Wa_15016458807, 1); + return true; }