[Intel-xe] [PATCH] drm/xe: Fix wopcm size

Balasubramani Vivekanandan balasubramani.vivekanandan at intel.com
Wed Feb 15 14:03:29 UTC 2023


The wopcm size returned by xe_wopcm_size function is used in calculating
the GuC wopcm base offset and the GuC wopcm size. It is also used to
find the size of the wopcm space to be reserved at the bottom of the
GGTT address space. So it is the per-GT wopcm size and not the total
wopcm area used by all GTs.
Fix the wopcm size to 2MB which is the wopcm size per-GT for platforms
above Gen11.

Signed-off-by: Balasubramani Vivekanandan <balasubramani.vivekanandan at intel.com>
---
 drivers/gpu/drm/xe/xe_wopcm.c | 10 +---------
 1 file changed, 1 insertion(+), 9 deletions(-)

diff --git a/drivers/gpu/drm/xe/xe_wopcm.c b/drivers/gpu/drm/xe/xe_wopcm.c
index 8fe182afa06c..a88d02357cb6 100644
--- a/drivers/gpu/drm/xe/xe_wopcm.c
+++ b/drivers/gpu/drm/xe/xe_wopcm.c
@@ -46,12 +46,6 @@
  */
 
 /* Default WOPCM size is 2MB from Gen11, 1MB on previous platforms */
-#define DGFX_WOPCM_SIZE			SZ_4M	/* FIXME: Larger size require
-						   for 2 tile PVC, do a proper
-						   probe sooner or later */
-#define MTL_WOPCM_SIZE			SZ_4M	/* FIXME: Larger size require
-						   for MTL, do a proper probe
-						   sooner or later */
 #define GEN11_WOPCM_SIZE		SZ_2M
 /* 16KB WOPCM (RSVD WOPCM) is reserved from HuC firmware top. */
 #define WOPCM_RESERVED_SIZE		SZ_16K
@@ -178,9 +172,7 @@ static int __wopcm_init_regs(struct xe_device *xe, struct xe_gt *gt,
 
 u32 xe_wopcm_size(struct xe_device *xe)
 {
-	return IS_DGFX(xe) ? DGFX_WOPCM_SIZE :
-		xe->info.platform == XE_METEORLAKE ? MTL_WOPCM_SIZE :
-		GEN11_WOPCM_SIZE;
+	return GEN11_WOPCM_SIZE;
 }
 
 /**
-- 
2.34.1



More information about the Intel-xe mailing list