]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
drm/xe/wopcm: fix WOPCM size for LNL+
authorDaniele Ceraolo Spurio <daniele.ceraolospurio@intel.com>
Mon, 13 Jul 2026 22:17:59 +0000 (15:17 -0700)
committerThomas Hellström <thomas.hellstrom@linux.intel.com>
Thu, 16 Jul 2026 14:32:51 +0000 (16:32 +0200)
Starting on LNL the WOPCM size is 8MB instead of 4, so we need to avoid
using the [0, 8MB) range of the GGTT as that can be unaccessible from
the microcontrollers.

Note that the proper long-term fix here is to read the WOPCM size from
the HW, but that is a more serious rework that would be difficult to
backport, so we can do that as a follow-up.

Fixes: 9c57bc08652a ("drm/xe/lnl: Drop force_probe requirement")
Signed-off-by: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com>
Cc: Rodrigo Vivi <rodrigo.vivi@intel.com>
Cc: Shuicheng Lin <shuicheng.lin@intel.com>
Cc: Matt Roper <matthew.d.roper@intel.com>
Reviewed-by: Shuicheng Lin <shuicheng.lin@intel.com>
Link: https://patch.msgid.link/20260713221758.3285744-2-daniele.ceraolospurio@intel.com
(cherry picked from commit 3033b0b24ed0e2f5e56bdd4d9c183417c365a45b)
Signed-off-by: Thomas Hellström <thomas.hellstrom@linux.intel.com>
drivers/gpu/drm/xe/xe_wopcm.c

index 900daf1d1b1bb5ebcdb68ba395ffa0f72280e879..fe65ed246775d99973db5ac3552c40003cea9a55 100644 (file)
@@ -49,9 +49,9 @@
  */
 
 /* Default WOPCM size is 2MB from Gen11, 1MB on previous platforms */
-/* FIXME: Larger size require for 2 tile PVC, do a proper probe sooner or later */
+/* FIXME: Larger size require for some platforms, do a proper probe sooner or later */
 #define DGFX_WOPCM_SIZE                        SZ_4M
-/* FIXME: Larger size require for MTL, do a proper probe sooner or later */
+#define LNL_WOPCM_SIZE                 SZ_8M
 #define MTL_WOPCM_SIZE                 SZ_4M
 #define WOPCM_SIZE                     SZ_2M
 
@@ -179,9 +179,14 @@ err_out:
 
 u32 xe_wopcm_size(struct xe_device *xe)
 {
-       return IS_DGFX(xe) ? DGFX_WOPCM_SIZE :
-               xe->info.platform == XE_METEORLAKE ? MTL_WOPCM_SIZE :
-               WOPCM_SIZE;
+       if (xe->info.platform >= XE_LUNARLAKE)
+               return LNL_WOPCM_SIZE;
+       else if (IS_DGFX(xe))
+               return DGFX_WOPCM_SIZE;
+       else if (xe->info.platform == XE_METEORLAKE)
+               return MTL_WOPCM_SIZE;
+       else
+               return WOPCM_SIZE;
 }
 
 static u32 max_wopcm_size(struct xe_device *xe)