diff --git a/intel_defines.h b/intel_defines.h index 7491d83..bb00100 100644 --- a/intel_defines.h +++ b/intel_defines.h @@ -59,3 +59,7 @@ const uint16_t adlp_ids[] = { const uint16_t rplp_ids[] = { 0xA720, 0xA721, 0xA7A0, 0xA7A1, 0xA7A8, 0xA7A9, }; const uint16_t mtl_ids[] = { 0x7D40, 0x7D60, 0x7D45, 0x7D55, 0x7DD5, }; + +const uint16_t lnl_ids[] = { 0x6420, 0x64A0, 0x64B0, }; + +const uint16_t ptl_ids[] = { 0xB080, 0xB081, 0xB082, 0xB083, 0xB08F, 0xB090, 0xB0A0, 0xB0B0 }; diff --git a/xe.c b/xe.c index 871b48d..c265c30 100644 --- a/xe.c +++ b/xe.c @@ -80,6 +80,22 @@ static void xe_info_from_device_id(struct xe_device *xe) } } + for (i = 0; i < ARRAY_SIZE(lnl_ids); i++) { + if (lnl_ids[i] == xe->device_id) { + xe->graphics_version = 20; + xe->is_mtl_or_newer = true; + return; + } + } + + for (i = 0; i < ARRAY_SIZE(ptl_ids); i++) { + if (ptl_ids[i] == xe->device_id) { + xe->graphics_version = 30; + xe->is_mtl_or_newer = true; + return; + } + } + /* Gen 12 */ for (i = 0; i < ARRAY_SIZE(gen12_ids); i++) { if (gen12_ids[i] == xe->device_id) { @@ -391,7 +407,7 @@ static bool xe_format_needs_LCU_alignment(uint32_t format, size_t plane, case DRM_FORMAT_NV12: case DRM_FORMAT_P010: case DRM_FORMAT_P016: - return (xe->graphics_version == 12) && plane == 1; + return (xe->graphics_version >= 12) && plane == 1; } return false; }