Intel-XE Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] drm/i915/display: update to the BW buddy configuration
@ 2026-06-16 10:15 Vinod Govindapillai
  2026-06-16 11:14 ` ✓ CI.KUnit: success for " Patchwork
                   ` (3 more replies)
  0 siblings, 4 replies; 6+ messages in thread
From: Vinod Govindapillai @ 2026-06-16 10:15 UTC (permalink / raw)
  To: intel-xe, intel-gfx
  Cc: vinod.govindapillai, ville.syrjala, matthew.d.roper, shawn.c.lee

Bspec has been updated for xe2_lpd+ platforms on how to handle
the bw buddy prgramming in case no matching memory configuration
is found w.r.t the current page mask table. The recommendation
is to keep the default settings for the related registers as it
is without explicitly disabling the bw buddy.

Bspec: 68871
Suggested-by: Ville Syrjala <ville.syrjala@intel.com>
Signed-off-by: Vinod Govindapillai <vinod.govindapillai@intel.com>
---
 .../drm/i915/display/intel_display_power.c    | 43 +++++++++++++------
 1 file changed, 30 insertions(+), 13 deletions(-)

diff --git a/drivers/gpu/drm/i915/display/intel_display_power.c b/drivers/gpu/drm/i915/display/intel_display_power.c
index 2e51dfcd5dce..dcfd78f48622 100644
--- a/drivers/gpu/drm/i915/display/intel_display_power.c
+++ b/drivers/gpu/drm/i915/display/intel_display_power.c
@@ -1631,23 +1631,40 @@ static void tgl_bw_buddy_init(struct intel_display *display)
 		    table[config].type == dram_info->type)
 			break;
 
+	/*
+	 * If we don't recognize the memory configuration, explicitly disable
+	 * the address buddy logic in pre-xe2_lpd platforms as it was before.
+	 * In xe2_lpd+ cases, page masks must be set to 0 if no matching
+	 * configuration is found in the table. So keep the default settings
+	 * as it is. By default, BW_BUDDY_CTL bit 31 is 0 (bw buddy enabled)
+	 * and BW_BUDDY_PAGE_MASK is 0x0
+	 *
+	 * TODO: Revisit the buddy page masks table when bspec updates the
+	 * table with the correct number of channels for each dram type.
+	 */
 	if (table[config].page_mask == 0) {
 		drm_dbg_kms(display->drm,
 			    "Unknown memory configuration; disabling address buddy logic.\n");
-		for_each_set_bit(i, &abox_mask, BITS_PER_TYPE(abox_mask))
-			intel_de_write(display, BW_BUDDY_CTL(i),
-				       BW_BUDDY_DISABLE);
-	} else {
-		for_each_set_bit(i, &abox_mask, BITS_PER_TYPE(abox_mask)) {
-			intel_de_write(display, BW_BUDDY_PAGE_MASK(i),
-				       table[config].page_mask);
-
-			/* Wa_22010178259:tgl,dg1,rkl,adl-s */
-			if (intel_display_wa(display, INTEL_DISPLAY_WA_22010178259))
-				intel_de_rmw(display, BW_BUDDY_CTL(i),
-					     BW_BUDDY_TLB_REQ_TIMER_MASK,
-					     BW_BUDDY_TLB_REQ_TIMER(0x8));
+
+		if (DISPLAY_VER(display) < 20) {
+			for_each_set_bit(i, &abox_mask, BITS_PER_TYPE(abox_mask))
+				intel_de_write(display, BW_BUDDY_CTL(i),
+					       BW_BUDDY_DISABLE);
 		}
+
+		return;
+	}
+
+	/* We found a matching configuration. Program the BW_BUDDY registers. */
+	for_each_set_bit(i, &abox_mask, BITS_PER_TYPE(abox_mask)) {
+		intel_de_write(display, BW_BUDDY_PAGE_MASK(i),
+			       table[config].page_mask);
+
+		/* Wa_22010178259:tgl,dg1,rkl,adl-s */
+		if (intel_display_wa(display, INTEL_DISPLAY_WA_22010178259))
+			intel_de_rmw(display, BW_BUDDY_CTL(i),
+				     BW_BUDDY_TLB_REQ_TIMER_MASK,
+				     BW_BUDDY_TLB_REQ_TIMER(0x8));
 	}
 }
 
-- 
2.43.0


^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2026-06-16 18:43 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-06-16 10:15 [PATCH] drm/i915/display: update to the BW buddy configuration Vinod Govindapillai
2026-06-16 11:14 ` ✓ CI.KUnit: success for " Patchwork
2026-06-16 11:54 ` ✓ Xe.CI.BAT: " Patchwork
2026-06-16 14:54 ` ✓ Xe.CI.FULL: " Patchwork
2026-06-16 17:49 ` [PATCH] " Ville Syrjälä
2026-06-16 18:43   ` Govindapillai, Vinod

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox