Skip to content

Commit

Permalink
Introduce PTL Support (#225)
Browse files Browse the repository at this point in the history
  • Loading branch information
johnmach authored Dec 19, 2024
1 parent 6ea2f1d commit 9104c20
Show file tree
Hide file tree
Showing 7 changed files with 38 additions and 8 deletions.
2 changes: 2 additions & 0 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,8 @@ Xe_LPG (MTL: Meteor Lake, ARL: Arrow Lake)

Xe2_HPG (BMG: Battlemage, LNL: Lunar Lake)

Xe3_LPG (Panther Lake)

Release Tags
============

Expand Down
4 changes: 2 additions & 2 deletions Source/GmmLib/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -25,14 +25,14 @@ project(igfx_gmmumd)

# GmmLib Api Version used for so naming
set(GMMLIB_API_MAJOR_VERSION 12)
set(GMMLIB_API_MINOR_VERSION 5)
set(GMMLIB_API_MINOR_VERSION 6)

if(NOT DEFINED MAJOR_VERSION)
set(MAJOR_VERSION 12)
endif()

if(NOT DEFINED MINOR_VERSION)
set(MINOR_VERSION 5)
set(MINOR_VERSION 6)
endif()

if(NOT DEFINED PATCH_VERSION)
Expand Down
8 changes: 4 additions & 4 deletions Source/GmmLib/CachePolicy/GmmXe2_LPGCachePolicy.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -400,10 +400,10 @@ uint32_t GMM_STDCALL GmmLib::GmmXe2_LPGCachePolicy::CachePolicyGetPATIndex(GMM_R
// requested compressed and coherent
if (CompressionEnable && IsCpuCacheable)
{
// return coherent uncompressed
ReturnPATIndex = CoherentPATIndex;
CompressionEnable = false;
GMM_ASSERTDPF(false, "Coherent Compressed is not supported on Xe2. However, respecting the coherency and returning CoherentPATIndex");
// return coherent uncompressed
ReturnPATIndex = CoherentPATIndex;
CompressionEnable = false;
GMM_ASSERTDPF(false, "Coherent Compressed is not supported on Xe2. However, respecting the coherency and returning CoherentPATIndex");
}
// requested compressed only
else if (CompressionEnable)
Expand Down
4 changes: 2 additions & 2 deletions Source/GmmLib/CachePolicy/GmmXe2_LPGCachePolicy.h
Original file line number Diff line number Diff line change
Expand Up @@ -80,11 +80,11 @@ DEFINE_CACHE_ELEMENT(GMM_RESOURCE_USAGE_CURSOR
DEFINE_CACHE_ELEMENT(GMM_RESOURCE_USAGE_DISPLAY_STATIC_IMG_FOR_SMOOTH_ROTATION_BUFFER , 3, 0, 0, 0 , 0 , 0 , 0, NoP);
DEFINE_CACHE_ELEMENT(GMM_RESOURCE_USAGE_DUMMY_PAGE , 0, 0, 0, 0 , 0 , 0 , 1, NoP);
DEFINE_CACHE_ELEMENT(GMM_RESOURCE_USAGE_GDI_SURFACE , 1, 0, 0, 0 , 0 , 0 , 1, NoP);
DEFINE_CACHE_ELEMENT(GMM_RESOURCE_USAGE_GENERIC_KMD_RESOURCE , 1, 0, 0, 0 , 0 , _WA_2W, 1, NoP);
DEFINE_CACHE_ELEMENT(GMM_RESOURCE_USAGE_GENERIC_KMD_RESOURCE , _L3_P, 0, 0, 0 , 0 , _WA_2W, 1, NoP);
// GMM_RESOURCE_USAGE_GFX_RING is only used if WaEnableRingHostMapping is enabled .
DEFINE_CACHE_ELEMENT(GMM_RESOURCE_USAGE_GFX_RING , 0, 0, 0, 0 , 0 , 0 , 1, NoP);
DEFINE_CACHE_ELEMENT(GMM_RESOURCE_USAGE_GTT_TRANSFER_REGION , 0, 0, 0, 0 , 0 , 0 , 1, NoP);
DEFINE_CACHE_ELEMENT(GMM_RESOURCE_USAGE_HW_CONTEXT , 1, 0, 0, 0 , 0 , _WA_2W, 1, NoP);
DEFINE_CACHE_ELEMENT(GMM_RESOURCE_USAGE_HW_CONTEXT , _L3_P, 0, 0, 0 , 0 , _WA_2W, 1, NoP);
DEFINE_CACHE_ELEMENT(GMM_RESOURCE_USAGE_STATE_MANAGER_KERNEL_STATE , 0, 0, 0, 0 , 0 , 0 , 1, NoP);
DEFINE_CACHE_ELEMENT(GMM_RESOURCE_USAGE_KMD_STAGING_SURFACE , 1, 0, 0, 0 , 0 , 0 , 1, NoP);
DEFINE_CACHE_ELEMENT(GMM_RESOURCE_USAGE_MBM_BUFFER , 0, 0, 0, 0 , 0 , 0 , 1, NoP);
Expand Down
3 changes: 3 additions & 0 deletions Source/GmmLib/GlobalInfo/GmmInfo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1101,6 +1101,7 @@ GMM_CACHE_POLICY *GMM_STDCALL GmmLib::Context::CreateCachePolicyCommon()
switch(GFX_GET_CURRENT_RENDERCORE(this->GetPlatformInfo().Platform))
{
case IGFX_XE2_HPG_CORE:
case IGFX_XE3_CORE:
pGmmCachePolicy = new GmmLib::GmmXe2_LPGCachePolicy(CachePolicy, this);
break;
case IGFX_GEN12LP_CORE:
Expand Down Expand Up @@ -1181,6 +1182,7 @@ GMM_TEXTURE_CALC *GMM_STDCALL GmmLib::Context::CreateTextureCalc(PLATFORM Platfo
return new GmmGen12TextureCalc(this);
break;
case IGFX_XE2_HPG_CORE:
case IGFX_XE3_CORE:
default:
return new GmmXe_LPGTextureCalc(this);
break;
Expand Down Expand Up @@ -1216,6 +1218,7 @@ GMM_PLATFORM_INFO_CLASS *GMM_STDCALL GmmLib::Context::CreatePlatformInfo(PLATFOR
case IGFX_XE_HPG_CORE:
case IGFX_XE_HPC_CORE:
case IGFX_XE2_HPG_CORE:
case IGFX_XE3_CORE:
return new GmmLib::PlatformInfoGen12(Platform, (GMM_LIB_CONTEXT *)this);
break;
case IGFX_GEN11_CORE:
Expand Down
13 changes: 13 additions & 0 deletions Source/GmmLib/Resource/GmmResourceInfoCommonEx.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,19 @@ bool GmmLib::GmmResourceInfoCommon::CopyClientParams(GMM_RESCREATE_PARAMS &Creat

// Displayable surfaces cannot be Tiled4/64.
__GMM_ASSERT(!GetGmmLibContext()->GetSkuTable().FtrDisplayYTiling);

if (GFX_GET_CURRENT_RENDERCORE(GetGmmLibContext()->GetPlatformInfo().Platform) >= IGFX_XE3_CORE)
{
if (CreateParams.Flags.Gpu.FlipChain || CreateParams.Flags.Gpu.Overlay ||
CreateParams.Flags.Gpu.Presentable)
{
if (CreateParams.Flags.Info.TiledX == 1)
{
CreateParams.Flags.Info.TiledX = 0;
CreateParams.Flags.Info.Tile4 = 1;
}
}
}

//override displayable surfaces to TileX
if(GetGmmLibContext()->GetSkuTable().FtrDisplayXTiling)
Expand Down
12 changes: 12 additions & 0 deletions Source/inc/common/igfxfmid.h
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@ typedef enum {
IGFX_ARROWLAKE = 1273,
IGFX_BMG = 1274,
IGFX_LUNARLAKE = 1275,
IGFX_PTL = 1300,

IGFX_MAX_PRODUCT,
IGFX_GENNEXT = 0x7ffffffe,
Expand Down Expand Up @@ -141,6 +142,7 @@ typedef enum {
IGFX_XE_HPC_CORE = 0x0c08, // XE_HPC Family
IGFX_XE2_LPG_CORE = 0x0c09, // XE2_LPG Family
IGFX_XE2_HPG_CORE = IGFX_XE2_LPG_CORE, //XE2_HPG Family
IGFX_XE3_CORE = 0x1e00, // XE3 Family

//Please add new GENs BEFORE THIS !
IGFX_MAX_CORE,
Expand Down Expand Up @@ -2000,6 +2002,16 @@ typedef enum __NATIVEGTTYPE
#define DEV_ID_E20D 0xE20D
#define DEV_ID_E212 0xE212

// PTL
#define DEV_ID_B080 0xB080
#define DEV_ID_B081 0xB081
#define DEV_ID_B082 0xB082
#define DEV_ID_B083 0xB083
#define DEV_ID_B08F 0xB08F
#define DEV_ID_B090 0xB090
#define DEV_ID_B0A0 0xB0A0
#define DEV_ID_B0B0 0xB0B0

#define MGM_HAS 0

//#define SDG_HAS 1 //Reserve place for Springdale-G HAS
Expand Down

0 comments on commit 9104c20

Please sign in to comment.