From 6d2c727cae0e86ce861475825b0b0565bde67558 Mon Sep 17 00:00:00 2001 From: Bai_Guangyao Date: Fri, 1 Nov 2019 17:54:54 +0800 Subject: [PATCH] Fixed "[VP] enable Compressible surface Creation" Change-Id: I44833710cead449c2262af4bbb00a91c2964a7b0 --- media_driver/linux/common/ddi/media_libva.cpp | 2 +- media_driver/linux/common/ddi/media_libva_util.cpp | 13 ++----------- .../linux/common/vp/ddi/media_libva_vp_tools.c | 8 ++++---- 3 files changed, 7 insertions(+), 16 deletions(-) diff --git a/media_driver/linux/common/ddi/media_libva.cpp b/media_driver/linux/common/ddi/media_libva.cpp index 8015f821d11..e7312f24ef4 100755 --- a/media_driver/linux/common/ddi/media_libva.cpp +++ b/media_driver/linux/common/ddi/media_libva.cpp @@ -1019,7 +1019,7 @@ VAStatus DdiMedia_MediaMemoryDecompress(PDDI_MEDIA_CONTEXT mediaCtx, DDI_MEDIA_S if (((GmmFlags.Gpu.MMC || GmmFlags.Gpu.CCS) && - GmmFlags.Info.MediaCompressed) || + GmmFlags.Gpu.UnifiedAuxSurface) || mediaSurface->pGmmResourceInfo->IsMediaMemoryCompressed(0)) { #ifdef _MMC_SUPPORTED diff --git a/media_driver/linux/common/ddi/media_libva_util.cpp b/media_driver/linux/common/ddi/media_libva_util.cpp index 70f6287eb7d..05a10d061c4 100644 --- a/media_driver/linux/common/ddi/media_libva_util.cpp +++ b/media_driver/linux/common/ddi/media_libva_util.cpp @@ -381,22 +381,13 @@ VAStatus DdiMediaUtil_AllocateSurface( case I915_TILING_Y: // Disable MMC for application required surfaces, because some cases' output streams have corruption. gmmParams.Flags.Gpu.MMC = false; - - if (MEDIA_IS_SKU(&mediaDrvCtx->SkuTable, FtrE2ECompression)) + if ( mediaDrvCtx->m_auxTableMgr ) { gmmParams.Flags.Gpu.MMC = true; gmmParams.Flags.Info.MediaCompressed = 1; gmmParams.Flags.Gpu.CCS = 1; + gmmParams.Flags.Gpu.UnifiedAuxSurface = 1; gmmParams.Flags.Gpu.RenderTarget = 1; - - if (mediaDrvCtx->m_auxTableMgr) - { - gmmParams.Flags.Gpu.UnifiedAuxSurface = 1; - } - else - { - gmmParams.Flags.Gpu.UnifiedAuxSurface = 0; - } } break; case I915_TILING_X: diff --git a/media_driver/linux/common/vp/ddi/media_libva_vp_tools.c b/media_driver/linux/common/vp/ddi/media_libva_vp_tools.c index 5cd46f2651c..ede47f8df9d 100644 --- a/media_driver/linux/common/vp/ddi/media_libva_vp_tools.c +++ b/media_driver/linux/common/vp/ddi/media_libva_vp_tools.c @@ -468,13 +468,13 @@ void VpFeatureReport( //VP MMC In Use WriteUserFeature(__VPHAL_ENABLE_MMC_IN_USE_ID, pConfig->dwVPMMCInUse); //VP Primary Surface Compress Mode Report - WriteUserFeature(__VPHAL_PRIMARY_SURFACE_COMPRESS_MODE_ID, pConfig->dwPrimaryCompressMode); + WriteUserFeature(__VPHAL_PRIMARY_SURFACE_COMPRESS_MODE_ID, pConfig->dwPrimaryCompressModeReported); //VP Primary Surface Compressible - WriteUserFeature(__VPHAL_PRIMARY_SURFACE_COMPRESSIBLE_ID, pConfig->dwPrimaryCompressible); + WriteUserFeature(__VPHAL_PRIMARY_SURFACE_COMPRESSIBLE_ID, pConfig->dwPrimaryCompressibleReported); //VP RT Compress Mode - WriteUserFeature(__VPHAL_RT_COMPRESS_MODE_ID, pConfig->dwRTCompressMode); + WriteUserFeature(__VPHAL_RT_COMPRESS_MODE_ID, pConfig->dwRTCompressModeReported); //VP RT Compressible - WriteUserFeature(__VPHAL_RT_COMPRESSIBLE_ID, pConfig->dwRTCompressible); + WriteUserFeature(__VPHAL_RT_COMPRESSIBLE_ID, pConfig->dwRTCompressibleReported); #endif }