Skip to content

Commit

Permalink
[CP] Fix MMC issue
Browse files Browse the repository at this point in the history
1. ExportSurfaceHandle call MediaLibvaUtilNext::GetSurfaceModifier to determine modifier to export, from xe2 need check gmmFlags.Info.NotCompressed to determine MMC.

2. Remove CpTag limitation in CreateShadowResource for HWSwizzling.
  • Loading branch information
lixin5x authored and intel-mediadev committed Jan 10, 2025
1 parent aa5ca48 commit 30a39af
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions media_softlet/linux/common/ddi/media_libva_util_next.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1537,10 +1537,6 @@ VAStatus MediaLibvaUtilNext::CreateShadowResource(DDI_MEDIA_SURFACE *surface)
DDI_FUNC_ENTER;
DDI_CHK_NULL(surface, "nullptr surface", VA_STATUS_ERROR_INVALID_SURFACE);
DDI_CHK_NULL(surface->pGmmResourceInfo, "nullptr surface->pGmmResourceInfo", VA_STATUS_ERROR_INVALID_SURFACE);
if (surface->pGmmResourceInfo->GetSetCpSurfTag(0, 0) != 0)
{
return VA_STATUS_ERROR_INVALID_SURFACE;
}

if (surface->iWidth < 64 || surface->iRealHeight < 64 || (surface->iPitch % 64 != 0) || surface->format == Media_Format_P016)
{
Expand Down Expand Up @@ -2260,7 +2256,7 @@ VAStatus MediaLibvaUtilNext::GetSurfaceModifier(
switch(gmmTileType)
{
case GMM_TILED_4:
modifier = gmmFlags.Info.MediaCompressed ? compressedModifier : I915_FORMAT_MOD_4_TILED;
modifier = gmmFlags.Info.NotCompressed ? I915_FORMAT_MOD_4_TILED : compressedModifier;
break;
case GMM_TILED_Y:
modifier = I915_FORMAT_MOD_Y_TILED;
Expand All @@ -2275,7 +2271,7 @@ VAStatus MediaLibvaUtilNext::GetSurfaceModifier(
//handle other possible tile format
if(TILING_Y == mediaSurface->TileType)
{
modifier = gmmFlags.Info.MediaCompressed ? compressedModifier : I915_FORMAT_MOD_4_TILED;
modifier = gmmFlags.Info.NotCompressed ? I915_FORMAT_MOD_4_TILED : compressedModifier;
}
else
{
Expand Down

0 comments on commit 30a39af

Please sign in to comment.