From: Mark Brown <broonie@kernel.org>
To: "Thomas Hellström" <thomas.hellstrom@linux.intel.com>,
"DRM XE List" <intel-xe@lists.freedesktop.org>
Cc: Daniel Charles <daniel.charles@intel.com>,
Dave Airlie <airlied@redhat.com>,
DRI <dri-devel@lists.freedesktop.org>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
Linux Next Mailing List <linux-next@vger.kernel.org>,
Matthew Auld <matthew.auld@intel.com>,
Matthew Brost <matthew.brost@intel.com>,
Matt Roper <matthew.d.roper@intel.com>,
Raag Jadav <raag.jadav@intel.com>,
Riana Tauro <riana.tauro@intel.com>,
Satyanarayana K V P <satyanarayana.k.v.p@intel.com>,
Vinay Belgaumkar <vinay.belgaumkar@intel.com>
Subject: linux-next: manual merge of the drm-xe tree with the drm-fixes tree
Date: Fri, 13 Nov 2026 16:16:47 +0000 [thread overview]
Message-ID: <avc376Z6nj4HlOnJ@sirena.org.uk> (raw)
[-- Attachment #1: Type: text/plain, Size: 6508 bytes --]
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(>->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 #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
next reply other threads:[~2026-11-13 16:16 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-13 16:16 Mark Brown [this message]
-- strict thread matches above, loose matches on Subject: below --
2026-09-18 12:31 Mark Brown
2026-08-14 16:12 Mark Brown
2026-07-03 16:20 Mark Brown
2026-07-03 15:44 Mark Brown
2026-07-03 15:44 Mark Brown
2026-07-03 15:41 Mark Brown
2026-07-03 15:41 Mark Brown
2026-01-30 16:05 Mark Brown
2026-01-23 15:34 Mark Brown
2025-09-19 12:49 Mark Brown
2025-09-19 12:45 Mark Brown
2025-09-22 18:28 ` Nathan Chancellor
2025-09-22 19:25 ` Lucas De Marchi
2024-12-06 12:55 Mark Brown
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=avc376Z6nj4HlOnJ@sirena.org.uk \
--to=broonie@kernel.org \
--cc=airlied@redhat.com \
--cc=daniel.charles@intel.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=intel-xe@lists.freedesktop.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-next@vger.kernel.org \
--cc=matthew.auld@intel.com \
--cc=matthew.brost@intel.com \
--cc=matthew.d.roper@intel.com \
--cc=raag.jadav@intel.com \
--cc=riana.tauro@intel.com \
--cc=satyanarayana.k.v.p@intel.com \
--cc=thomas.hellstrom@linux.intel.com \
--cc=vinay.belgaumkar@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®