xe: add lnl/ptl pci ids

IDs match those added to mesa in:
* https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29273
* https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31838
* https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32149

Also sets the correct graphics_version but still uses the unsavory
is_mtl_or_newer flag, which will later be replaced by explicit version
testing at each special-case or initialization of per-version
capabilities.

Bug: b:358427077
Test: Builds, CQ
Change-Id: I5368c0a2da00a42c70f7c6cf7740fad5ca1cea2e
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/minigbm/+/6254318
Commit-Queue: Ryan Neph <ryanneph@google.com>
Reviewed-by: Dominik Behr <dbehr@chromium.org>
Reviewed-by: Tim Van Patten <timvp@google.com>
Reviewed-by: Lina Versace <linyaa@google.com>
Tested-by: Ryan Neph <ryanneph@google.com>
Reviewed-by: Matt Turner <msturner@google.com>
This commit is contained in:
Ryan Neph 2025-02-03 16:48:05 -08:00 committed by Chromeos LUCI
parent b4d04233b0
commit e37e16203f
2 changed files with 21 additions and 1 deletions

View file

@ -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 };

18
xe.c
View file

@ -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;
}