From b4d04233b0dd2c8e1ba5de60b233384110b4f40e Mon Sep 17 00:00:00 2001 From: Ryan Neph Date: Mon, 10 Feb 2025 15:31:05 -0800 Subject: [PATCH 1/2] drv: remove unused #include A leftover from prior refactor. Unnecessary and broke android builds. Fixes: 3ab89b0 ("xe: add initial Xe kmd support for gen12 xelp") BUG=b:358427077 TEST=Builds + CQ Change-Id: I7ed2317409c2c381a244d714a26201662151adfd Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/minigbm/+/6250261 Commit-Queue: Ryan Neph Reviewed-by: Matt Turner Auto-Submit: Ryan Neph Commit-Queue: Matt Turner Tested-by: Ryan Neph --- drv_helpers.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drv_helpers.c b/drv_helpers.c index f353df9..12b671a 100644 --- a/drv_helpers.c +++ b/drv_helpers.c @@ -15,7 +15,6 @@ #include #include #include -#include #ifdef __ANDROID__ #include From e37e16203f2d4cc3f529fb1c9e81b4745bc42597 Mon Sep 17 00:00:00 2001 From: Ryan Neph Date: Mon, 3 Feb 2025 16:48:05 -0800 Subject: [PATCH 2/2] 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 Reviewed-by: Dominik Behr Reviewed-by: Tim Van Patten Reviewed-by: Lina Versace Tested-by: Ryan Neph Reviewed-by: Matt Turner --- intel_defines.h | 4 ++++ xe.c | 18 +++++++++++++++++- 2 files changed, 21 insertions(+), 1 deletion(-) 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; }