summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDave Airlie <airlied@redhat.com>2026-08-14 18:29:25 +1000
committerDave Airlie <airlied@redhat.com>2026-08-14 18:30:33 +1000
commit65b92bc671db7c222f8de1146c88e40fe8764d95 (patch)
tree451f05ce019bc613040c1e95cf9ccf23c3853a89
parentf9d4cefe4184347a2b427889d59bebb1d216a202 (diff)
parent1c4d0c45d762539f174cf1d74b2cb21d18e71363 (diff)
Merge tag 'drm-xe-next-fixes-2026-08-13' of https://gitlab.freedesktop.org/drm/xe/kernel into drm-next
Couple drm-ras fixes, a probe failure clean-up fix, a GT freq boundaries fixes for BMG/CRI and a Media engines/slice fix. Signed-off-by: Dave Airlie <airlied@redhat.com> From: Rodrigo Vivi <rodrigo.vivi@intel.com> Link: https://patch.msgid.link/an4NGzsYN9MOTFII@intel.com
-rw-r--r--drivers/gpu/drm/xe/xe_device.c13
-rw-r--r--drivers/gpu/drm/xe/xe_drm_ras.c3
-rw-r--r--drivers/gpu/drm/xe/xe_gt_mcr.c9
-rw-r--r--drivers/gpu/drm/xe/xe_guc_pc.c13
-rw-r--r--drivers/gpu/drm/xe/xe_ras.c9
5 files changed, 32 insertions, 15 deletions
diff --git a/drivers/gpu/drm/xe/xe_device.c b/drivers/gpu/drm/xe/xe_device.c
index 7007b6113760..71ce153737ab 100644
--- a/drivers/gpu/drm/xe/xe_device.c
+++ b/drivers/gpu/drm/xe/xe_device.c
@@ -1141,7 +1141,18 @@ int xe_device_probe(struct xe_device *xe)
if (err)
goto err_unregister_display;
- return devm_add_action_or_reset(xe->drm.dev, xe_device_sanitize, xe);
+ /*
+ * Process and log any errors detected by hardware. Possible results can
+ * include declaring the device as wedged, which must be done only after
+ * xe_device_wedged_fini() is registered.
+ */
+ xe_ras_process_errors(xe);
+
+ err = devm_add_action_or_reset(xe->drm.dev, xe_device_sanitize, xe);
+ if (err)
+ goto err_unregister_display;
+
+ return 0;
err_unregister_display:
xe_display_unregister(xe);
diff --git a/drivers/gpu/drm/xe/xe_drm_ras.c b/drivers/gpu/drm/xe/xe_drm_ras.c
index 7937d8ba0ed9..984fa67b9015 100644
--- a/drivers/gpu/drm/xe/xe_drm_ras.c
+++ b/drivers/gpu/drm/xe/xe_drm_ras.c
@@ -199,6 +199,9 @@ int xe_drm_ras_init(struct xe_device *xe)
struct drm_ras_node *node;
int err;
+ if (!xe->info.has_drm_ras)
+ return 0;
+
node = drmm_kcalloc(&xe->drm, DRM_XE_RAS_ERR_SEV_MAX, sizeof(*node), GFP_KERNEL);
if (!node)
return -ENOMEM;
diff --git a/drivers/gpu/drm/xe/xe_gt_mcr.c b/drivers/gpu/drm/xe/xe_gt_mcr.c
index a97b236dab7c..1949bf7d370a 100644
--- a/drivers/gpu/drm/xe/xe_gt_mcr.c
+++ b/drivers/gpu/drm/xe/xe_gt_mcr.c
@@ -443,11 +443,16 @@ static void init_steering_dss(struct xe_gt *gt)
static void init_steering_oaddrm(struct xe_gt *gt)
{
+ u64 hwe_mask = XE_HW_ENGINE_VCS0 | XE_HW_ENGINE_VECS0;
+
+ /* TODO: Add 'VD per SCMI' and 'VE per SCMI' values into 'struct xe_media_desc' */
+ if (MEDIA_VERx100(gt_to_xe(gt)) >= 3500)
+ hwe_mask |= XE_HW_ENGINE_VCS1 | XE_HW_ENGINE_VECS1;
/*
* First instance is only terminated if the entire first media slice
- * is absent (i.e., no VCS0 or VECS0).
+ * is absent (i.e., no engines in hwe_mask).
*/
- if (gt->info.engine_mask & (XE_HW_ENGINE_VCS0 | XE_HW_ENGINE_VECS0))
+ if (gt->info.engine_mask & hwe_mask)
gt->steering[OADDRM].group_target = 0;
else
gt->steering[OADDRM].group_target = 1;
diff --git a/drivers/gpu/drm/xe/xe_guc_pc.c b/drivers/gpu/drm/xe/xe_guc_pc.c
index 59f2fa79ad42..7cf8f4858598 100644
--- a/drivers/gpu/drm/xe/xe_guc_pc.c
+++ b/drivers/gpu/drm/xe/xe_guc_pc.c
@@ -911,6 +911,7 @@ static bool pc_needs_min_freq_change(struct xe_guc_pc *pc)
static int pc_adjust_freq_bounds(struct xe_guc_pc *pc)
{
int ret;
+ u32 min_freq;
lockdep_assert_held(&pc->freq_lock);
@@ -933,8 +934,14 @@ static int pc_adjust_freq_bounds(struct xe_guc_pc *pc)
* Same thing happens for Server platforms where min is listed as
* RPMax
*/
- if (pc_get_min_freq(pc) > pc->rp0_freq)
+ min_freq = pc_get_min_freq(pc);
+ if (min_freq > pc->rp0_freq) {
ret = pc_set_min_freq(pc, pc->rp0_freq);
+ if (ret)
+ goto out;
+
+ min_freq = pc->rp0_freq;
+ }
/*
* Setting GT RP min frequency to 1.2GHz by default for
@@ -947,8 +954,8 @@ static int pc_adjust_freq_bounds(struct xe_guc_pc *pc)
* we aren't expecting high power output across board
*
*/
- if (pc_needs_min_freq_change(pc))
- ret = pc_set_min_freq(pc, max(BMG_MIN_FREQ, pc_get_min_freq(pc)));
+ if (pc_needs_min_freq_change(pc) && min_freq < BMG_MIN_FREQ)
+ ret = pc_set_min_freq(pc, BMG_MIN_FREQ);
out:
return ret;
diff --git a/drivers/gpu/drm/xe/xe_ras.c b/drivers/gpu/drm/xe/xe_ras.c
index a31e06b8aa67..d98ff9453f60 100644
--- a/drivers/gpu/drm/xe/xe_ras.c
+++ b/drivers/gpu/drm/xe/xe_ras.c
@@ -681,9 +681,6 @@ void xe_ras_init(struct xe_device *xe)
{
int ret;
- if (!xe->info.has_drm_ras)
- return;
-
xe_drm_ras_init(xe);
if (!xe->info.has_sysctrl)
@@ -692,12 +689,6 @@ void xe_ras_init(struct xe_device *xe)
if (IS_ENABLED(CONFIG_PCIEAER))
ras_usp_aer_init(xe);
- /*
- * During probe, process and log any errors detected by firmware while the driver was not
- * loaded. Critical errors such as Punit and CSC are reported through Pcode init failure,
- * causing the driver to enter survivability mode.
- */
- xe_ras_process_errors(xe);
ret = devm_device_add_group(xe->drm.dev, &gpu_health_group);
if (ret)
xe_err(xe, "Failed to create GPU health sysfs, err=%d\n", ret);