Skip to content

Commit

Permalink
Fixed "[VP] enable Compressible surface Creation"
Browse files Browse the repository at this point in the history
Change-Id: I44833710cead449c2262af4bbb00a91c2964a7b0
  • Loading branch information
Guangyao-Bai authored and intel-mediadev committed Nov 1, 2019
1 parent ca9cd9f commit 6d2c727
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 16 deletions.
2 changes: 1 addition & 1 deletion media_driver/linux/common/ddi/media_libva.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
13 changes: 2 additions & 11 deletions media_driver/linux/common/ddi/media_libva_util.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
8 changes: 4 additions & 4 deletions media_driver/linux/common/vp/ddi/media_libva_vp_tools.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

Expand Down

0 comments on commit 6d2c727

Please sign in to comment.