Skip to content

Commit ad87e24

Browse files
dceraoloThomas Hellström
authored andcommitted
drm/xe/wopcm: fix WOPCM size for LNL+
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: 9c57bc0 ("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 3033b0b) Signed-off-by: Thomas Hellström <thomas.hellstrom@linux.intel.com>
1 parent 56441f9 commit ad87e24

1 file changed

Lines changed: 10 additions & 5 deletions

File tree

drivers/gpu/drm/xe/xe_wopcm.c

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -49,9 +49,9 @@
4949
*/
5050

5151
/* Default WOPCM size is 2MB from Gen11, 1MB on previous platforms */
52-
/* FIXME: Larger size require for 2 tile PVC, do a proper probe sooner or later */
52+
/* FIXME: Larger size require for some platforms, do a proper probe sooner or later */
5353
#define DGFX_WOPCM_SIZE SZ_4M
54-
/* FIXME: Larger size require for MTL, do a proper probe sooner or later */
54+
#define LNL_WOPCM_SIZE SZ_8M
5555
#define MTL_WOPCM_SIZE SZ_4M
5656
#define WOPCM_SIZE SZ_2M
5757

@@ -179,9 +179,14 @@ static int __wopcm_init_regs(struct xe_device *xe, struct xe_gt *gt,
179179

180180
u32 xe_wopcm_size(struct xe_device *xe)
181181
{
182-
return IS_DGFX(xe) ? DGFX_WOPCM_SIZE :
183-
xe->info.platform == XE_METEORLAKE ? MTL_WOPCM_SIZE :
184-
WOPCM_SIZE;
182+
if (xe->info.platform >= XE_LUNARLAKE)
183+
return LNL_WOPCM_SIZE;
184+
else if (IS_DGFX(xe))
185+
return DGFX_WOPCM_SIZE;
186+
else if (xe->info.platform == XE_METEORLAKE)
187+
return MTL_WOPCM_SIZE;
188+
else
189+
return WOPCM_SIZE;
185190
}
186191

187192
static u32 max_wopcm_size(struct xe_device *xe)

0 commit comments

Comments
 (0)