Skip to content

Commit 9104c20

Browse files
authored
Introduce PTL Support (#225)
1 parent 6ea2f1d commit 9104c20

File tree

7 files changed

+38
-8
lines changed

7 files changed

+38
-8
lines changed

README.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,8 @@ Xe_LPG (MTL: Meteor Lake, ARL: Arrow Lake)
9292

9393
Xe2_HPG (BMG: Battlemage, LNL: Lunar Lake)
9494

95+
Xe3_LPG (Panther Lake)
96+
9597
Release Tags
9698
============
9799

Source/GmmLib/CMakeLists.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,14 +25,14 @@ project(igfx_gmmumd)
2525

2626
# GmmLib Api Version used for so naming
2727
set(GMMLIB_API_MAJOR_VERSION 12)
28-
set(GMMLIB_API_MINOR_VERSION 5)
28+
set(GMMLIB_API_MINOR_VERSION 6)
2929

3030
if(NOT DEFINED MAJOR_VERSION)
3131
set(MAJOR_VERSION 12)
3232
endif()
3333

3434
if(NOT DEFINED MINOR_VERSION)
35-
set(MINOR_VERSION 5)
35+
set(MINOR_VERSION 6)
3636
endif()
3737

3838
if(NOT DEFINED PATCH_VERSION)

Source/GmmLib/CachePolicy/GmmXe2_LPGCachePolicy.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -400,10 +400,10 @@ uint32_t GMM_STDCALL GmmLib::GmmXe2_LPGCachePolicy::CachePolicyGetPATIndex(GMM_R
400400
// requested compressed and coherent
401401
if (CompressionEnable && IsCpuCacheable)
402402
{
403-
// return coherent uncompressed
404-
ReturnPATIndex = CoherentPATIndex;
405-
CompressionEnable = false;
406-
GMM_ASSERTDPF(false, "Coherent Compressed is not supported on Xe2. However, respecting the coherency and returning CoherentPATIndex");
403+
// return coherent uncompressed
404+
ReturnPATIndex = CoherentPATIndex;
405+
CompressionEnable = false;
406+
GMM_ASSERTDPF(false, "Coherent Compressed is not supported on Xe2. However, respecting the coherency and returning CoherentPATIndex");
407407
}
408408
// requested compressed only
409409
else if (CompressionEnable)

Source/GmmLib/CachePolicy/GmmXe2_LPGCachePolicy.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,11 +80,11 @@ DEFINE_CACHE_ELEMENT(GMM_RESOURCE_USAGE_CURSOR
8080
DEFINE_CACHE_ELEMENT(GMM_RESOURCE_USAGE_DISPLAY_STATIC_IMG_FOR_SMOOTH_ROTATION_BUFFER , 3, 0, 0, 0 , 0 , 0 , 0, NoP);
8181
DEFINE_CACHE_ELEMENT(GMM_RESOURCE_USAGE_DUMMY_PAGE , 0, 0, 0, 0 , 0 , 0 , 1, NoP);
8282
DEFINE_CACHE_ELEMENT(GMM_RESOURCE_USAGE_GDI_SURFACE , 1, 0, 0, 0 , 0 , 0 , 1, NoP);
83-
DEFINE_CACHE_ELEMENT(GMM_RESOURCE_USAGE_GENERIC_KMD_RESOURCE , 1, 0, 0, 0 , 0 , _WA_2W, 1, NoP);
83+
DEFINE_CACHE_ELEMENT(GMM_RESOURCE_USAGE_GENERIC_KMD_RESOURCE , _L3_P, 0, 0, 0 , 0 , _WA_2W, 1, NoP);
8484
// GMM_RESOURCE_USAGE_GFX_RING is only used if WaEnableRingHostMapping is enabled .
8585
DEFINE_CACHE_ELEMENT(GMM_RESOURCE_USAGE_GFX_RING , 0, 0, 0, 0 , 0 , 0 , 1, NoP);
8686
DEFINE_CACHE_ELEMENT(GMM_RESOURCE_USAGE_GTT_TRANSFER_REGION , 0, 0, 0, 0 , 0 , 0 , 1, NoP);
87-
DEFINE_CACHE_ELEMENT(GMM_RESOURCE_USAGE_HW_CONTEXT , 1, 0, 0, 0 , 0 , _WA_2W, 1, NoP);
87+
DEFINE_CACHE_ELEMENT(GMM_RESOURCE_USAGE_HW_CONTEXT , _L3_P, 0, 0, 0 , 0 , _WA_2W, 1, NoP);
8888
DEFINE_CACHE_ELEMENT(GMM_RESOURCE_USAGE_STATE_MANAGER_KERNEL_STATE , 0, 0, 0, 0 , 0 , 0 , 1, NoP);
8989
DEFINE_CACHE_ELEMENT(GMM_RESOURCE_USAGE_KMD_STAGING_SURFACE , 1, 0, 0, 0 , 0 , 0 , 1, NoP);
9090
DEFINE_CACHE_ELEMENT(GMM_RESOURCE_USAGE_MBM_BUFFER , 0, 0, 0, 0 , 0 , 0 , 1, NoP);

Source/GmmLib/GlobalInfo/GmmInfo.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1101,6 +1101,7 @@ GMM_CACHE_POLICY *GMM_STDCALL GmmLib::Context::CreateCachePolicyCommon()
11011101
switch(GFX_GET_CURRENT_RENDERCORE(this->GetPlatformInfo().Platform))
11021102
{
11031103
case IGFX_XE2_HPG_CORE:
1104+
case IGFX_XE3_CORE:
11041105
pGmmCachePolicy = new GmmLib::GmmXe2_LPGCachePolicy(CachePolicy, this);
11051106
break;
11061107
case IGFX_GEN12LP_CORE:
@@ -1181,6 +1182,7 @@ GMM_TEXTURE_CALC *GMM_STDCALL GmmLib::Context::CreateTextureCalc(PLATFORM Platfo
11811182
return new GmmGen12TextureCalc(this);
11821183
break;
11831184
case IGFX_XE2_HPG_CORE:
1185+
case IGFX_XE3_CORE:
11841186
default:
11851187
return new GmmXe_LPGTextureCalc(this);
11861188
break;
@@ -1216,6 +1218,7 @@ GMM_PLATFORM_INFO_CLASS *GMM_STDCALL GmmLib::Context::CreatePlatformInfo(PLATFOR
12161218
case IGFX_XE_HPG_CORE:
12171219
case IGFX_XE_HPC_CORE:
12181220
case IGFX_XE2_HPG_CORE:
1221+
case IGFX_XE3_CORE:
12191222
return new GmmLib::PlatformInfoGen12(Platform, (GMM_LIB_CONTEXT *)this);
12201223
break;
12211224
case IGFX_GEN11_CORE:

Source/GmmLib/Resource/GmmResourceInfoCommonEx.cpp

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -164,6 +164,19 @@ bool GmmLib::GmmResourceInfoCommon::CopyClientParams(GMM_RESCREATE_PARAMS &Creat
164164

165165
// Displayable surfaces cannot be Tiled4/64.
166166
__GMM_ASSERT(!GetGmmLibContext()->GetSkuTable().FtrDisplayYTiling);
167+
168+
if (GFX_GET_CURRENT_RENDERCORE(GetGmmLibContext()->GetPlatformInfo().Platform) >= IGFX_XE3_CORE)
169+
{
170+
if (CreateParams.Flags.Gpu.FlipChain || CreateParams.Flags.Gpu.Overlay ||
171+
CreateParams.Flags.Gpu.Presentable)
172+
{
173+
if (CreateParams.Flags.Info.TiledX == 1)
174+
{
175+
CreateParams.Flags.Info.TiledX = 0;
176+
CreateParams.Flags.Info.Tile4 = 1;
177+
}
178+
}
179+
}
167180

168181
//override displayable surfaces to TileX
169182
if(GetGmmLibContext()->GetSkuTable().FtrDisplayXTiling)

Source/inc/common/igfxfmid.h

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,7 @@ typedef enum {
7979
IGFX_ARROWLAKE = 1273,
8080
IGFX_BMG = 1274,
8181
IGFX_LUNARLAKE = 1275,
82+
IGFX_PTL = 1300,
8283

8384
IGFX_MAX_PRODUCT,
8485
IGFX_GENNEXT = 0x7ffffffe,
@@ -141,6 +142,7 @@ typedef enum {
141142
IGFX_XE_HPC_CORE = 0x0c08, // XE_HPC Family
142143
IGFX_XE2_LPG_CORE = 0x0c09, // XE2_LPG Family
143144
IGFX_XE2_HPG_CORE = IGFX_XE2_LPG_CORE, //XE2_HPG Family
145+
IGFX_XE3_CORE = 0x1e00, // XE3 Family
144146

145147
//Please add new GENs BEFORE THIS !
146148
IGFX_MAX_CORE,
@@ -2000,6 +2002,16 @@ typedef enum __NATIVEGTTYPE
20002002
#define DEV_ID_E20D 0xE20D
20012003
#define DEV_ID_E212 0xE212
20022004

2005+
// PTL
2006+
#define DEV_ID_B080 0xB080
2007+
#define DEV_ID_B081 0xB081
2008+
#define DEV_ID_B082 0xB082
2009+
#define DEV_ID_B083 0xB083
2010+
#define DEV_ID_B08F 0xB08F
2011+
#define DEV_ID_B090 0xB090
2012+
#define DEV_ID_B0A0 0xB0A0
2013+
#define DEV_ID_B0B0 0xB0B0
2014+
20032015
#define MGM_HAS 0
20042016

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

0 commit comments

Comments
 (0)