Skip to content

Commit 460b14b

Browse files
committed
Tile4 for dGPU codec.
TileY for iGPU codec detect dGPU dynamically Signed-off-by: Shaofeng Tang <shaofeng.tang@intel.com>
1 parent 1043fe5 commit 460b14b

2 files changed

Lines changed: 14 additions & 2 deletions

File tree

media_driver/linux/common/ddi/media_libva_util.cpp

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -471,10 +471,16 @@ VAStatus DdiMediaUtil_AllocateSurface(
471471
gmmCustomParams.BaseAlignment = 4096;
472472
gmmCustomParams.NoOfPlanes = mediaSurface->pSurfDesc->uiPlanes;
473473
gmmCustomParams.CpTag = cpTag;
474+
475+
int32_t deviceId = mediaDrvCtx->iDeviceId;
476+
474477
switch (tileformat)
475478
{
476479
case I915_TILING_Y:
477-
gmmCustomParams.Flags.Info.TiledY = true;
480+
if (deviceId > 0x5600 && deviceId < 0x56B3)
481+
gmmCustomParams.Flags.Info.Tile4 = true;
482+
else
483+
gmmCustomParams.Flags.Info.TiledY = true;
478484
gmmCustomParams.Flags.Gpu.MMC = false;
479485
if (MEDIA_IS_SKU(&mediaDrvCtx->SkuTable, FtrE2ECompression) &&
480486
(!MEDIA_IS_WA(&mediaDrvCtx->WaTable, WaDisableVPMmc) &&

media_softlet/linux/common/ddi/media_libva_util_next.cpp

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -326,10 +326,16 @@ VAStatus MediaLibvaUtilNext::GenerateGmmParamsForNoneCompressionExternalSurface(
326326
gmmCustomParams.BaseAlignment = 4096;
327327
gmmCustomParams.NoOfPlanes = mediaSurface->pSurfDesc->uiPlanes;
328328
gmmCustomParams.CpTag = params.cpTag;
329+
330+
PDDI_MEDIA_CONTEXT mediaDrvCtx = mediaSurface->pMediaCtx;
331+
int32_t deviceId = mediaDrvCtx->iDeviceId;
329332
switch (params.tileFormat)
330333
{
331334
case I915_TILING_Y:
332-
gmmCustomParams.Flags.Info.TiledY = true;
335+
if (deviceId > 0x5600 && deviceId < 0x56B3)
336+
gmmCustomParams.Flags.Info.Tile4 = true;
337+
else
338+
gmmCustomParams.Flags.Info.TiledY = true;
333339
break;
334340
case I915_TILING_X:
335341
gmmCustomParams.Flags.Info.TiledX = true;

0 commit comments

Comments
 (0)