Commit 78de8f87 authored by Matt Roper's avatar Matt Roper
Browse files

drm/xe: Handle Wa_22010954014 and Wa_14022085890 as device workarounds



When Wa_22010954014 and Wa_14022085890 were first implemented, we didn't
have a device workaround infrastructure so we hacked them into the GT
workaround list.  Now that we have proper device workaround support,
move them to the proper place.  Note that Wa_14022085890 specifically
applies to BMG-G21 platforms, so this requires defining a BMG
subplatform to capture the correct subset of device IDs.

Reviewed-by: default avatarGustavo Sousa <gustavo.sousa@intel.com>
Link: https://lore.kernel.org/r/20251013200944.2499947-40-matthew.d.roper@intel.com


Signed-off-by: default avatarMatt Roper <matthew.d.roper@intel.com>
parent 4d292406
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
22010954014	PLATFORM(DG2)
15015404425     PLATFORM(LUNARLAKE)
		PLATFORM(PANTHERLAKE)
22019338487_display	PLATFORM(LUNARLAKE)
14022085890	SUBPLATFORM(BATTLEMAGE, G21)
+2 −1
Original line number Diff line number Diff line
@@ -14,6 +14,7 @@

#include <drm/drm_managed.h>
#include <drm/drm_print.h>
#include <generated/xe_device_wa_oob.h>
#include <generated/xe_wa_oob.h>

#include "abi/guc_actions_slpc_abi.h"
@@ -886,7 +887,7 @@ static int pc_adjust_freq_bounds(struct xe_guc_pc *pc)
	if (pc_get_min_freq(pc) > pc->rp0_freq)
		ret = pc_set_min_freq(pc, pc->rp0_freq);

	if (XE_GT_WA(tile->primary_gt, 14022085890))
	if (XE_DEVICE_WA(tile_to_xe(tile), 14022085890))
		ret = pc_set_min_freq(pc, max(BMG_MIN_FREQ, pc_get_min_freq(pc)));

out:
+6 −0
Original line number Diff line number Diff line
@@ -335,6 +335,8 @@ static const struct xe_device_desc lnl_desc = {
	.vm_max_level = 4,
};

static const u16 bmg_g21_ids[] = { INTEL_BMG_G21_IDS(NOP), 0 };

static const struct xe_device_desc bmg_desc = {
	DGFX_FEATURES,
	PLATFORM(BATTLEMAGE),
@@ -349,6 +351,10 @@ static const struct xe_device_desc bmg_desc = {
	.has_sriov = true,
	.max_gt_per_tile = 2,
	.needs_scratch = true,
	.subplatforms = (const struct xe_subplatform_desc[]) {
		{ XE_SUBPLATFORM_BATTLEMAGE_G21, "G21", bmg_g21_ids },
		{ }
	},
	.va_bits = 48,
	.vm_max_level = 4,
};
+1 −0
Original line number Diff line number Diff line
@@ -34,6 +34,7 @@ enum xe_subplatform {
	XE_SUBPLATFORM_DG2_G10,
	XE_SUBPLATFORM_DG2_G11,
	XE_SUBPLATFORM_DG2_G12,
	XE_SUBPLATFORM_BATTLEMAGE_G21,
};

#endif
+1 −1
Original line number Diff line number Diff line
@@ -1138,6 +1138,6 @@ void xe_wa_apply_tile_workarounds(struct xe_tile *tile)
	if (IS_SRIOV_VF(tile->xe))
		return;

	if (XE_GT_WA(tile->primary_gt, 22010954014))
	if (XE_DEVICE_WA(tile->xe, 22010954014))
		xe_mmio_rmw32(mmio, XEHP_CLOCK_GATE_DIS, 0, SGSI_SIDECLK_DIS);
}
Loading