Skip to content

Commit 6d2c727

Browse files
Guangyao-Baiintel-mediadev
authored andcommitted
Fixed "[VP] enable Compressible surface Creation"
Change-Id: I44833710cead449c2262af4bbb00a91c2964a7b0
1 parent ca9cd9f commit 6d2c727

3 files changed

Lines changed: 7 additions & 16 deletions

File tree

media_driver/linux/common/ddi/media_libva.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1019,7 +1019,7 @@ VAStatus DdiMedia_MediaMemoryDecompress(PDDI_MEDIA_CONTEXT mediaCtx, DDI_MEDIA_S
10191019

10201020
if (((GmmFlags.Gpu.MMC ||
10211021
GmmFlags.Gpu.CCS) &&
1022-
GmmFlags.Info.MediaCompressed) ||
1022+
GmmFlags.Gpu.UnifiedAuxSurface) ||
10231023
mediaSurface->pGmmResourceInfo->IsMediaMemoryCompressed(0))
10241024
{
10251025
#ifdef _MMC_SUPPORTED

media_driver/linux/common/ddi/media_libva_util.cpp

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -381,22 +381,13 @@ VAStatus DdiMediaUtil_AllocateSurface(
381381
case I915_TILING_Y:
382382
// Disable MMC for application required surfaces, because some cases' output streams have corruption.
383383
gmmParams.Flags.Gpu.MMC = false;
384-
385-
if (MEDIA_IS_SKU(&mediaDrvCtx->SkuTable, FtrE2ECompression))
384+
if ( mediaDrvCtx->m_auxTableMgr )
386385
{
387386
gmmParams.Flags.Gpu.MMC = true;
388387
gmmParams.Flags.Info.MediaCompressed = 1;
389388
gmmParams.Flags.Gpu.CCS = 1;
389+
gmmParams.Flags.Gpu.UnifiedAuxSurface = 1;
390390
gmmParams.Flags.Gpu.RenderTarget = 1;
391-
392-
if (mediaDrvCtx->m_auxTableMgr)
393-
{
394-
gmmParams.Flags.Gpu.UnifiedAuxSurface = 1;
395-
}
396-
else
397-
{
398-
gmmParams.Flags.Gpu.UnifiedAuxSurface = 0;
399-
}
400391
}
401392
break;
402393
case I915_TILING_X:

media_driver/linux/common/vp/ddi/media_libva_vp_tools.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -468,13 +468,13 @@ void VpFeatureReport(
468468
//VP MMC In Use
469469
WriteUserFeature(__VPHAL_ENABLE_MMC_IN_USE_ID, pConfig->dwVPMMCInUse);
470470
//VP Primary Surface Compress Mode Report
471-
WriteUserFeature(__VPHAL_PRIMARY_SURFACE_COMPRESS_MODE_ID, pConfig->dwPrimaryCompressMode);
471+
WriteUserFeature(__VPHAL_PRIMARY_SURFACE_COMPRESS_MODE_ID, pConfig->dwPrimaryCompressModeReported);
472472
//VP Primary Surface Compressible
473-
WriteUserFeature(__VPHAL_PRIMARY_SURFACE_COMPRESSIBLE_ID, pConfig->dwPrimaryCompressible);
473+
WriteUserFeature(__VPHAL_PRIMARY_SURFACE_COMPRESSIBLE_ID, pConfig->dwPrimaryCompressibleReported);
474474
//VP RT Compress Mode
475-
WriteUserFeature(__VPHAL_RT_COMPRESS_MODE_ID, pConfig->dwRTCompressMode);
475+
WriteUserFeature(__VPHAL_RT_COMPRESS_MODE_ID, pConfig->dwRTCompressModeReported);
476476
//VP RT Compressible
477-
WriteUserFeature(__VPHAL_RT_COMPRESSIBLE_ID, pConfig->dwRTCompressible);
477+
WriteUserFeature(__VPHAL_RT_COMPRESSIBLE_ID, pConfig->dwRTCompressibleReported);
478478
#endif
479479
}
480480

0 commit comments

Comments
 (0)