linux-next: manual merge of the drm-xe tree with the drm-fixes tree

From: Mark Brown

Date: Fri Nov 13 2026 - 15:20:49 EST


Hi all,

Today's linux-next merge of the drm-xe tree got conflicts in:

drivers/gpu/drm/xe/xe_lmtt.c
drivers/gpu/drm/xe/xe_pm.c

between commits:

fc0ba46fd8278 ("drm/xe: Access GT MMIO after pcode init")
a17c5ed0dc715 ("drm/xe/pm: Apply tile workarounds after PCODE initialization")
3654a4d734df9 ("drm/xe/pf: Program LMTT directory pointer from each GT's init path")

from the drm-fixes tree and commits:

641ffb2132839 ("drm/xe/pm: Apply tile workarounds after PCODE initialization")
a8653bee6a040 ("drm/xe/pf: Program LMTT directory pointer from each GT's init path")
c9edd9cf7e613 ("drm/xe/pf: Use multicast writes for early-generation LMTT config")
be082ef8157b7 ("drm/xe/pm: skip BO eviction on iGPU for non-hibernation sleep")
ff03d9510426e ("drm/xe/pm: Introduce xe_device_suspend/resume()")

from the drm-xe tree.

I fixed it up (see below) and can carry the fix as necessary. This
is now fixed as far as linux-next is concerned, but any non trivial
conflicts should be mentioned to your upstream maintainer when your tree
is submitted for merging. You may also want to consider cooperating
with the maintainer of the conflicting tree to minimise any particularly
complex conflicts.

diff --git a/drivers/gpu/drm/xe/xe_lmtt.c b/drivers/gpu/drm/xe/xe_lmtt.c
index 8fba3c01fac29..ea2a3eeefccd7 100644
--- a/drivers/gpu/drm/xe/xe_lmtt.c
+++ b/drivers/gpu/drm/xe/xe_lmtt.c
@@ -220,14 +220,8 @@ static void lmtt_setup_dir_ptr_gt(struct xe_gt *gt, u32 config)
struct xe_reg reg;
u32 val_read;

- if (GRAPHICS_VER(xe) < 20) {
- reg = LMEM_CFG;
- xe_mmio_write32(&gt->mmio, reg, config);
- return;
- }
-
if (xe_gt_is_main_type(gt)) {
- reg_mcr = XE2_LMEM_CFG_MCR;
+ reg_mcr = GRAPHICS_VER(xe) < 20 ? LMEM_CFG_MCR : XE2_LMEM_CFG_MCR;
xe_gt_mcr_multicast_write(gt, reg_mcr, config);
val_read = xe_gt_mcr_unicast_read_any(gt, reg_mcr);
xe_gt_assert_msg(gt, val_read == config, "LMEM_CFG_MCR: %#x != %#x\n",
diff --git a/drivers/gpu/drm/xe/xe_pm.c b/drivers/gpu/drm/xe/xe_pm.c
index 61d68c09189f7..f73f68bd449b8 100644
--- a/drivers/gpu/drm/xe/xe_pm.c
+++ b/drivers/gpu/drm/xe/xe_pm.c
@@ -167,59 +167,38 @@ static void xe_rpm_lockmap_release(const struct xe_device *xe)
}

/**
- * xe_pm_suspend - Helper for System suspend, i.e. S0->S3 / S0->S2idle
+ * xe_pm_needs_bo_evict() - Check if bo eviction is needed
+ * @xe: The xe device.
+ * @hibernate: Hibernation event
+ *
+ * Return: %true if bo eviction is needed, %false otherwise.
+ */
+bool xe_pm_needs_bo_evict(struct xe_device *xe, bool hibernate)
+{
+ return IS_DGFX(xe) || hibernate;
+}
+
+/**
+ * xe_pm_suspend - Helper for System suspend, i.e. S0->S3 / S0->S2idle / S0->S4
* @xe: xe device instance
+ * @hibernate: true if preparing for S4 hibernation, false for < S4 suspend
*
* Return: 0 on success
*/
-int xe_pm_suspend(struct xe_device *xe)
+int xe_pm_suspend(struct xe_device *xe, bool hibernate)
{
- struct xe_gt *gt;
- u8 id;
int err;

drm_dbg(&xe->drm, "Suspending device\n");
xe_pm_block_begin_signalling();
trace_xe_pm_suspend(xe, __builtin_return_address(0));

- err = xe_pxp_pm_suspend(xe->pxp);
+ err = xe_device_suspend(xe, hibernate, false);
if (err)
- goto err;
+ drm_dbg(&xe->drm, "Device suspend failed %d\n", err);
+ else
+ drm_dbg(&xe->drm, "Device suspended\n");

- xe_late_bind_pm_suspend(&xe->late_bind);
-
- for_each_gt(gt, xe, id)
- xe_gt_suspend_prepare(gt);
-
- xe_display_pm_suspend(xe);
-
- /* FIXME: Super racey... */
- err = xe_bo_evict_all(xe);
- if (err)
- goto err_display;
-
- for_each_gt(gt, xe, id) {
- err = xe_gt_suspend(gt);
- if (err)
- goto err_display;
- }
-
- xe_irq_suspend(xe);
-
- xe_display_pm_suspend_late(xe);
-
- xe_i2c_pm_suspend(xe);
-
- drm_dbg(&xe->drm, "Device suspended\n");
- xe_pm_block_end_signalling();
-
- return 0;
-
-err_display:
- xe_display_pm_resume(xe);
- xe_pxp_pm_resume(xe->pxp);
-err:
- drm_dbg(&xe->drm, "Device suspend failed %d\n", err);
xe_pm_block_end_signalling();
return err;
}
@@ -232,71 +211,18 @@ int xe_pm_suspend(struct xe_device *xe)
*/
int xe_pm_resume(struct xe_device *xe)
{
- struct xe_tile *tile;
- struct xe_gt *gt;
- u8 id;
int err;

xe_pm_block_begin_signalling();
drm_dbg(&xe->drm, "Resuming device\n");
trace_xe_pm_resume(xe, __builtin_return_address(0));

- err = xe_pcode_ready(xe, true);
+ err = xe_device_resume(xe, false);
if (err)
- return err;
+ drm_dbg(&xe->drm, "Device resume failed %d\n", err);
+ else
+ drm_dbg(&xe->drm, "Device resumed\n");

- for_each_tile(tile, xe, id)
- xe_wa_apply_tile_workarounds(tile);
-
- for_each_gt(gt, xe, id)
- xe_gt_resume_early(gt);
-
- xe_display_pm_resume_early(xe);
-
- /*
- * This only restores pinned memory which is the memory required for the
- * GT(s) to resume.
- */
- err = xe_bo_restore_early(xe);
- if (err)
- goto err;
-
- xe_i2c_pm_resume(xe, true);
-
- xe_sysctrl_pm_resume(xe);
-
- xe_irq_resume(xe);
-
- for_each_gt(gt, xe, id) {
- err = xe_gt_resume(gt);
- if (err)
- break;
- }
-
- /*
- * Try to bring up display before bailing from GT resume failure,
- * so we don't leave the user clueless with a blank screen.
- */
- xe_display_pm_resume(xe);
- if (err)
- goto err;
-
- err = xe_bo_restore_late(xe);
- if (err)
- goto err;
-
- xe_pxp_pm_resume(xe->pxp);
-
- if (IS_VF_CCS_READY(xe))
- xe_sriov_vf_ccs_register_context(xe);
-
- xe_late_bind_pm_resume(&xe->late_bind);
-
- drm_dbg(&xe->drm, "Device resumed\n");
- xe_pm_block_end_signalling();
- return 0;
-err:
- drm_dbg(&xe->drm, "Device resume failed %d\n", err);
xe_pm_block_end_signalling();
return err;
}
@@ -461,6 +387,9 @@ static int xe_pm_notifier_callback(struct notifier_block *nb,
struct xe_validation_ctx ctx;

reinit_completion(&xe->pm_block);
+ if (!xe_pm_needs_bo_evict(xe, action == PM_HIBERNATION_PREPARE))
+ break;
+
xe_pm_block_begin_signalling();
xe_pm_runtime_get(xe);
(void)xe_validation_ctx_init(&ctx, &xe->val, NULL,
@@ -485,6 +414,9 @@ static int xe_pm_notifier_callback(struct notifier_block *nb,
case PM_POST_SUSPEND:
complete_all(&xe->pm_block);
xe_pm_wake_rebind_workers(xe);
+ if (!xe_pm_needs_bo_evict(xe, action == PM_POST_HIBERNATION))
+ break;
+
xe_bo_notifier_unprepare_all_pinned(xe);
xe_pm_runtime_put(xe);
break;

Attachment: signature.asc
Description: PGP signature