Skip to contentSkip to conversation

drm/xe/ptl: Apply Wa_16026007364

PATCH Superseded Sk Anirban 2 participants 3 messages Jun 19, 2025

Subsystems (2)

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore

Sk Anirban

author
#0 lore raw

PATCH 1/1 drm/xe/ptl: Apply Wa_16026007364

As part of this WA GuC will save and restore value of two XE3_Media control registers that were not included in the HW power context.

---
 drivers/gpu/drm/xe/abi/guc_klvs_abi.h | 1 +
 drivers/gpu/drm/xe/xe_guc_ads.c       | 5 +++++
 drivers/gpu/drm/xe/xe_wa_oob.rules    | 1 +
 3 files changed, 7 insertions(+)
drivers/gpu/drm/xe/abi/guc_klvs_abi.h +1 -0
index 7de8f827281f..c4aebb7a9dc6 100644
@@ -368,6 +368,7 @@ enum xe_guc_klv_ids {
 	GUC_WORKAROUND_KLV_ID_BACK_TO_BACK_RCS_ENGINE_RESET				= 0x9009,
 	GUC_WA_KLV_WAKE_POWER_DOMAINS_FOR_OUTBOUND_MMIO					= 0x900a,
 	GUC_WA_KLV_RESET_BB_STACK_PTR_ON_VF_SWITCH					= 0x900b,
+	GUC_WA_KLV_OAM_CONTEXT_SAVE_AND_RESTORE						= 0x900c,
 };
 
 #endif
drivers/gpu/drm/xe/xe_guc_ads.c +5 -0
index 07a027755627..27668cc25ef9 100644
@@ -382,6 +382,11 @@ static void guc_waklv_init(struct xe_guc_ads *ads)
 					GUC_WA_KLV_RESET_BB_STACK_PTR_ON_VF_SWITCH,
 					&offset, &remain);
 
+	if (XE_WA(gt, 16026007364))
+		guc_waklv_enable_simple(ads,
+					GUC_WA_KLV_OAM_CONTEXT_SAVE_AND_RESTORE,
+					&offset, &remain);
+
 	size = guc_ads_waklv_size(ads) - remain;
 	if (!size)
 		return;
drivers/gpu/drm/xe/xe_wa_oob.rules +1 -0
index 9efc5accd43d..4bf0df0ed663 100644
@@ -59,3 +59,4 @@ no_media_l3	MEDIA_VERSION(3000)
 		MEDIA_VERSION_RANGE(1301, 3000)
 16026508708	GRAPHICS_VERSION_RANGE(1200, 3001)
 		MEDIA_VERSION_RANGE(1300, 3000)
+16026007364 	MEDIA_VERSION(3000)
Signature · 1 line
2.43.0
#1 lore raw
Quoted 15 lines · Sk Anirban

As part of this WA GuC will save and restore value of two XE3_Media control registers that were not included in the HW power context.

---
  drivers/gpu/drm/xe/abi/guc_klvs_abi.h | 1 +
  drivers/gpu/drm/xe/xe_guc_ads.c       | 5 +++++
  drivers/gpu/drm/xe/xe_wa_oob.rules    | 1 +
  3 files changed, 7 insertions(+)
drivers/gpu/drm/xe/abi/guc_klvs_abi.h +0 -0
index 7de8f827281f..c4aebb7a9dc6 100644

drivers/gpu/drm/xe/abi/guc_klvs_abi.h enum xe_guc_klv_ids { · line 371

Quoted 4 lines
drivers/gpu/drm/xe/abi/guc_klvs_abi.h +1 -0
@@ -368,6 +368,7 @@ enum xe_guc_klv_ids {
  	GUC_WORKAROUND_KLV_ID_BACK_TO_BACK_RCS_ENGINE_RESET				= 0x9009,
  	GUC_WA_KLV_WAKE_POWER_DOMAINS_FOR_OUTBOUND_MMIO					= 0x900a,
  	GUC_WA_KLV_RESET_BB_STACK_PTR_ON_VF_SWITCH					= 0x900b,
+	GUC_WA_KLV_OAM_CONTEXT_SAVE_AND_RESTORE						= 0x900c,

Please change the name of klv to GUC_WA_KLV_RESTORE_REG_FOR_OAM_LATENCY_MEASUREMENTS. Rest of the implementation is fine.

Badal

Quoted 28 lines
drivers/gpu/drm/xe/abi/guc_klvs_abi.h +0 -0
  };
 
  #endif
drivers/gpu/drm/xe/xe_guc_ads.c +5 -0
index 07a027755627..27668cc25ef9 100644
@@ -382,6 +382,11 @@ static void guc_waklv_init(struct xe_guc_ads *ads)
  					GUC_WA_KLV_RESET_BB_STACK_PTR_ON_VF_SWITCH,
  					&offset, &remain);
 
+	if (XE_WA(gt, 16026007364))
+		guc_waklv_enable_simple(ads,
+					GUC_WA_KLV_OAM_CONTEXT_SAVE_AND_RESTORE,
+					&offset, &remain);
+
  	size = guc_ads_waklv_size(ads) - remain;
  	if (!size)
  		return;
drivers/gpu/drm/xe/xe_wa_oob.rules +1 -0
index 9efc5accd43d..4bf0df0ed663 100644
@@ -59,3 +59,4 @@ no_media_l3	MEDIA_VERSION(3000)
  		MEDIA_VERSION_RANGE(1301, 3000)
  16026508708	GRAPHICS_VERSION_RANGE(1200, 3001)
  		MEDIA_VERSION_RANGE(1300, 3000)
+16026007364 	MEDIA_VERSION(3000)
#2 lore raw

Hi,

Quoted 25 lines · Badal
Quoted 15 lines · Sk Anirban

As part of this WA GuC will save and restore value of two XE3_Media control registers that were not included in the HW power context.

---
  drivers/gpu/drm/xe/abi/guc_klvs_abi.h | 1 +
  drivers/gpu/drm/xe/xe_guc_ads.c       | 5 +++++
  drivers/gpu/drm/xe/xe_wa_oob.rules    | 1 +

  3 files changed, 7 insertions(+)
drivers/gpu/drm/xe/abi/guc_klvs_abi.h +0 -0
index 7de8f827281f..c4aebb7a9dc6 100644

drivers/gpu/drm/xe/abi/guc_klvs_abi.h enum xe_guc_klv_ids { · line 372

Quoted 5 lines
drivers/gpu/drm/xe/abi/guc_klvs_abi.h +1 -0
@@ -368,6 +368,7 @@ enum xe_guc_klv_ids {
 GUC_WORKAROUND_KLV_ID_BACK_TO_BACK_RCS_ENGINE_RESET = 0x9009,
 GUC_WA_KLV_WAKE_POWER_DOMAINS_FOR_OUTBOUND_MMIO = 0x900a,
 GUC_WA_KLV_RESET_BB_STACK_PTR_ON_VF_SWITCH                    = 0x900b,
+ GUC_WA_KLV_OAM_CONTEXT_SAVE_AND_RESTORE                        = 
 0x900c,

Please change the name of klv to GUC_WA_KLV_RESTORE_REG_FOR_OAM_LATENCY_MEASUREMENTS. Rest of the implementation is fine.

Quoted 1 line

Badal

Sure, I will fix this.

Regards,
Anirban

Quoted 28 lines
Quoted 28 lines
drivers/gpu/drm/xe/abi/guc_klvs_abi.h +0 -0
   };
     #endif
drivers/gpu/drm/xe/xe_guc_ads.c +4 -0
index 07a027755627..27668cc25ef9 100644
@@ -382,6 +382,11 @@ static void guc_waklv_init(struct xe_guc_ads *ads)
 GUC_WA_KLV_RESET_BB_STACK_PTR_ON_VF_SWITCH,
                       &offset, &remain);
   +    if (XE_WA(gt, 16026007364))
+        guc_waklv_enable_simple(ads,
+                    GUC_WA_KLV_OAM_CONTEXT_SAVE_AND_RESTORE,
+                    &offset, &remain);
+
       size = guc_ads_waklv_size(ads) - remain;
       if (!size)
           return;
drivers/gpu/drm/xe/xe_wa_oob.rules +1 -0
index 9efc5accd43d..4bf0df0ed663 100644
@@ -59,3 +59,4 @@ no_media_l3    MEDIA_VERSION(3000)
           MEDIA_VERSION_RANGE(1301, 3000)
   16026508708    GRAPHICS_VERSION_RANGE(1200, 3001)
           MEDIA_VERSION_RANGE(1300, 3000)
+16026007364     MEDIA_VERSION(3000)