Skip to content

Commit

Permalink
[Decode] Disable Media Reset on Linux ADL platform and also non-Xe pl…
Browse files Browse the repository at this point in the history
…atforms

Media Reset is not supported on non-Xe platforms from linux kmd side, so removing watch dog timer instruction from umd side.
  • Loading branch information
chenhao5-Intel authored and intel-mediadev committed Sep 7, 2023
1 parent f34b7d0 commit d8e2f9d
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 6 deletions.
17 changes: 12 additions & 5 deletions media_driver/linux/common/os/mos_os_specific.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2009-2022, Intel Corporation
* Copyright (c) 2009-2023, Intel Corporation
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
Expand Down Expand Up @@ -7336,6 +7336,17 @@ MOS_STATUS Mos_Specific_InitInterface(
}
}

// Check SKU table to detect if simulation environment (HAS) is enabled
pSkuTable = pOsInterface->pfnGetSkuTable(pOsInterface);
MOS_OS_CHK_NULL(pSkuTable);

// disable Media Reset for non-xe platform who has no media reset support on Linux
if(!MEDIA_IS_SKU(pSkuTable, FtrSWMediaReset))
{
pOsInterface->bMediaReset = false;
pOsInterface->umdMediaResetEnable = false;
}

// initialize MOS_CP interface
pOsInterface->osCpInterface = Create_MosCpInterface(pOsInterface);
if (pOsInterface->osCpInterface == nullptr)
Expand All @@ -7344,10 +7355,6 @@ MOS_STATUS Mos_Specific_InitInterface(
return MOS_STATUS_UNKNOWN;
}

// Check SKU table to detect if simulation environment (HAS) is enabled
pSkuTable = pOsInterface->pfnGetSkuTable(pOsInterface);
MOS_OS_CHK_NULL(pSkuTable);

#if (_DEBUG || _RELEASE_INTERNAL)
// read the "Force VDBOX" user feature key
// 0: not force
Expand Down
2 changes: 1 addition & 1 deletion media_driver/linux/gen12/ddi/media_sku_wa_g12.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -531,7 +531,6 @@ static bool InitAdlsMediaSku(struct GfxDeviceInfo *devInfo,
MEDIA_WR_SKU(skuTable, FtrDecodeHEVC422VTScalaDisable, 1);
MEDIA_WR_SKU(skuTable, FtrE2ECompression, 1);


//RPL-S
if (drvInfo->devId == 0xA780 ||
drvInfo->devId == 0xA781 ||
Expand Down Expand Up @@ -615,6 +614,7 @@ static bool InitAdlpMediaWa(struct GfxDeviceInfo *devInfo,
//ADL-P not need this
MEDIA_WR_WA(waTable, Wa_1409820462, 0);
MEDIA_WR_WA(waTable, WaDisableClearCCS, 1);

return true;
}

Expand Down
9 changes: 9 additions & 0 deletions media_softlet/linux/common/os/private/mos_os_specific.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3639,6 +3639,15 @@ MOS_STATUS Mos_Specific_InitInterface(
osInterface->trinityPath = TRINITY_DISABLED;
osInterface->umdMediaResetEnable = true;

// disable Media Reset for non-xe platform who has no media reset support on Linux
auto skuTable = osInterface->pfnGetSkuTable(osInterface);
MOS_OS_CHK_NULL_RETURN(skuTable);
if(!MEDIA_IS_SKU(skuTable, FtrSWMediaReset))
{
osInterface->bMediaReset = false;
osInterface->umdMediaResetEnable = false;
}

pMediaWatchdog = getenv("INTEL_MEDIA_RESET_WATCHDOG");
if (pMediaWatchdog != nullptr)
{
Expand Down

0 comments on commit d8e2f9d

Please sign in to comment.