From: Mark Brown <broonie@kernel.org>
To: Dave Airlie <airlied@redhat.com>, DRI <dri-devel@lists.freedesktop.org>
Cc: Badal Nilawar <badal.nilawar@intel.com>,
Daniel Charles <daniel.charles@intel.com>,
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>,
Vinay Belgaumkar <vinay.belgaumkar@intel.com>
Subject: linux-next: manual merge of the drm tree with the origin tree
Date: Mon, 23 Nov 2026 15:35:24 +0000 [thread overview]
Message-ID: <awRdPKox0-8OAIG4@sirena.org.uk> (raw)
[-- Attachment #1: Type: text/plain, Size: 11909 bytes --]
Hi all,
Today's linux-next merge of the drm tree got conflicts in:
drivers/gpu/drm/xe/xe_hw_error.c
drivers/gpu/drm/xe/xe_pm.c
between commits:
a890a885b982f ("drm/xe/hw_error: Guard csc_hw_error_work() with runtime PM")
fc0ba46fd8278 ("drm/xe: Access GT MMIO after pcode init")
a17c5ed0dc715 ("drm/xe/pm: Apply tile workarounds after PCODE initialization")
from the origin tree and commits:
323047eeee980 ("drm/xe: Separate drm-ras netlink data from device and firmware RAS state")
fc8d229d76102 ("drm/xe/hw_error: Guard csc_hw_error_work() with runtime PM")
638d116d755ed ("drm/xe: Access GT MMIO after pcode init")
1f6ac7c86aa52 ("drm/xe: Memset g2g buffer on resume")
6569aa6628799 ("drm/xe/xe_late_bind_fw: Refactor pm flow")
641ffb2132839 ("drm/xe/pm: Apply tile workarounds after PCODE initialization")
be082ef8157b7 ("drm/xe/pm: skip BO eviction on iGPU for non-hibernation sleep")
3541c71284fa8 ("drm/xe/hw_error: Reuse CSC worker for generic error handling")
14bbd417a6e0f ("drm/xe/hw_error: Initialize hw_error_work per tile")
b6bd6c613fd5e ("drm/xe: Add support for wa_14028434957")
ff03d9510426e ("drm/xe/pm: Introduce xe_device_suspend/resume()")
from the drm 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 --combined drivers/gpu/drm/xe/xe_hw_error.c
index f726179c22e38,86b29f2828374..0000000000000
--- a/drivers/gpu/drm/xe/xe_hw_error.c
+++ b/drivers/gpu/drm/xe/xe_hw_error.c
@@@ -5,6 -5,8 +5,8 @@@
#include <linux/bitmap.h>
+ #include <generated/xe_device_wa_oob.h>
+
#include "regs/xe_gsc_regs.h"
#include "regs/xe_hw_error_regs.h"
#include "regs/xe_irq_regs.h"
@@@ -15,7 -17,11 +17,11 @@@
#include "xe_hw_error.h"
#include "xe_mmio.h"
#include "xe_pm.h"
+ #include "xe_ras.h"
#include "xe_survivability_mode.h"
+ #include "xe_wa.h"
+ #include "xe_wedge.h"
+
#define GT_HW_ERROR_MAX_ERR_BITS 16
#define HEC_UNCORR_FW_ERR_BITS 4
@@@ -166,12 -172,29 +172,29 @@@ static_assert(ARRAY_SIZE(pvc_master_loc
pvc_master_local_fatal_err_reg : \
pvc_master_local_nonfatal_err_reg)
- static void csc_hw_error_work(struct work_struct *work)
+ static void hw_error_work(struct work_struct *work)
{
- struct xe_tile *tile = container_of(work, typeof(*tile), csc_hw_error_work);
+ struct xe_tile *tile = container_of(work, typeof(*tile), hw_error_work);
struct xe_device *xe = tile_to_xe(tile);
+ /* Skip hw error processing if device is already wedged */
+ if (xe_wedged(xe))
+ return;
+
guard(xe_pm_runtime)(xe);
+
+ if (xe->info.has_sysctrl && XE_DEVICE_WA(xe, 14028434957)) {
+ /*
+ * Skip handling if an uncorrectable internal error is reported as
+ * reset is imminent
+ */
+ if (xe_ras_is_aer_internal_error(xe))
+ return;
+
+ xe_ras_process_errors(xe);
+ return;
+ }
+
xe_survivability_mode_runtime_enable(xe);
}
@@@ -204,7 -227,7 +227,7 @@@ static void csc_hw_error_handler(struc
hec_uncorrected_fw_errors[err_bit], severity_str,
err_bit);
- schedule_work(&tile->csc_hw_error_work);
+ schedule_work(&tile->hw_error_work);
}
}
@@@ -242,7 -265,7 +265,7 @@@ static void log_soc_error(struct xe_til
{
const char *severity_str = error_severity[severity];
struct xe_device *xe = tile_to_xe(tile);
- struct xe_drm_ras *ras = &xe->ras;
+ struct xe_drm_ras *ras = &xe->ras.nl_data;
struct xe_drm_ras_counter *info = ras->info[severity];
const char *name;
@@@ -262,7 -285,7 +285,7 @@@ static void gt_hw_error_handler(struct
{
const enum drm_xe_ras_error_severity severity = hw_err_to_severity(hw_err);
struct xe_device *xe = tile_to_xe(tile);
- struct xe_drm_ras *ras = &xe->ras;
+ struct xe_drm_ras *ras = &xe->ras.nl_data;
struct xe_drm_ras_counter *info = ras->info[severity];
struct xe_mmio *mmio = &tile->mmio;
unsigned long err_stat = 0;
@@@ -424,7 -447,7 +447,7 @@@ static void hw_error_source_handler(str
const enum drm_xe_ras_error_severity severity = hw_err_to_severity(hw_err);
const char *severity_str = error_severity[severity];
struct xe_device *xe = tile_to_xe(tile);
- struct xe_drm_ras *ras = &xe->ras;
+ struct xe_drm_ras *ras = &xe->ras.nl_data;
struct xe_drm_ras_counter *info = ras->info[severity];
unsigned long flags, err_src;
u32 err_bit;
@@@ -433,12 -456,12 +456,12 @@@
return;
/*
- * Hardware errors are reported through System Controller on the platforms that
- * support it, and never routed as direct IRQ to SGUnit. So we should never be
- * here for those platforms.
+ * Non-fatal errors are routed as a direct IRQ on platforms that support
+ * system controller.
*/
if (xe->info.has_sysctrl) {
- drm_err_ratelimited(&xe->drm, HW_ERR "Invalid error routing\n");
+ drm_err_ratelimited(&xe->drm, HW_ERR "Non-fatal %s reported\n", severity_str);
+ schedule_work(&tile->hw_error_work);
return;
}
@@@ -513,7 -536,7 +536,7 @@@ void xe_hw_error_irq_handler(struct xe_
enum hardware_error hw_err;
if (xe_fault_csc_hw_error())
- schedule_work(&tile->csc_hw_error_work);
+ schedule_work(&tile->hw_error_work);
for (hw_err = 0; hw_err < HARDWARE_ERROR_MAX; hw_err++) {
if (master_ctl & ERROR_IRQ(hw_err))
@@@ -537,6 -560,25 +560,25 @@@ static void process_hw_errors(struct xe
}
}
+ /**
+ * xe_hw_error_work_disable - Disable hw error work
+ * @arg: xe device instance
+ *
+ * This function disables work for hardware error handling for all tiles.
+ */
+ void xe_hw_error_work_disable(void *arg)
+ {
+ struct xe_device *xe = arg;
+ struct xe_tile *tile;
+ u8 id;
+
+ if (!IS_DGFX(xe) || IS_SRIOV_VF(xe))
+ return;
+
+ for_each_tile(tile, xe, id)
+ disable_work_sync(&tile->hw_error_work);
+ }
+
/**
* xe_hw_error_init - Initialize hw errors
* @xe: xe device instance
@@@ -546,12 -588,15 +588,15 @@@
*/
void xe_hw_error_init(struct xe_device *xe)
{
- struct xe_tile *tile = xe_device_get_root_tile(xe);
+ struct xe_tile *tile;
+ u8 id;
if (!IS_DGFX(xe) || IS_SRIOV_VF(xe))
return;
- INIT_WORK(&tile->csc_hw_error_work, csc_hw_error_work);
+ for_each_tile(tile, xe, id)
+ INIT_WORK(&tile->hw_error_work, hw_error_work);
process_hw_errors(xe);
+ devm_add_action_or_reset(xe->drm.dev, xe_hw_error_work_disable, xe);
}
diff --combined drivers/gpu/drm/xe/xe_pm.c
index d95f0d128ed49,f73f68bd449b8..0000000000000
--- a/drivers/gpu/drm/xe/xe_pm.c
+++ b/drivers/gpu/drm/xe/xe_pm.c
@@@ -167,59 -167,38 +167,38 @@@ static void xe_rpm_lockmap_release(cons
}
/**
- * 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_wait_for_worker_completion(&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 +211,18 @@@
*/
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_idle_disable_c6(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_fw_load(&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 +387,9 @@@ static int xe_pm_notifier_callback(stru
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 +414,9 @@@
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;
@@@ -707,7 -639,7 +639,7 @@@ int xe_pm_runtime_resume(struct xe_devi
xe_wa_apply_tile_workarounds(tile);
for_each_gt(gt, xe, id)
- xe_gt_idle_disable_c6(gt);
+ xe_gt_resume_early(gt);
xe_display_pm_resume_early(xe);
@@@ -755,7 -687,7 +687,7 @@@
xe_sriov_vf_ccs_register_context(xe);
if (xe->d3cold.allowed)
- xe_late_bind_fw_load(&xe->late_bind);
+ xe_late_bind_pm_resume(&xe->late_bind);
out:
xe_rpm_lockmap_release(xe);
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
next reply other threads:[~2026-11-23 15:35 UTC|newest]
Thread overview: 39+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-23 15:35 Mark Brown [this message]
-- strict thread matches above, loose matches on Subject: below --
2026-10-12 16:00 linux-next: manual merge of the drm tree with the origin tree Mark Brown
2026-10-05 10:54 Mark Brown
2026-10-05 10:57 ` Mark Brown
2026-08-17 15:27 Mark Brown
2026-08-14 13:56 Mark Brown
2026-08-14 13:56 Mark Brown
2026-08-10 15:03 Mark Brown
2026-08-10 15:02 Mark Brown
2026-08-10 15:02 Mark Brown
2026-08-10 15:02 Mark Brown
2026-08-07 14:37 Mark Brown
2026-08-03 14:31 Mark Brown
2026-08-03 14:31 Mark Brown
2026-07-31 14:01 Mark Brown
2026-07-20 14:44 Mark Brown
2026-07-20 14:44 Mark Brown
2026-06-09 17:53 Mark Brown
2026-06-04 14:13 Mark Brown
2026-05-18 12:47 Mark Brown
2026-04-14 13:08 Mark Brown
2026-04-14 13:12 ` Miguel Ojeda
2026-03-30 15:49 Mark Brown
2026-03-27 20:56 Mark Brown
2026-03-23 15:55 Mark Brown
2026-03-23 15:55 Mark Brown
2026-03-23 15:49 Mark Brown
2026-03-23 15:01 Mark Brown
2026-02-08 22:47 Mark Brown
2026-02-08 22:46 Mark Brown
2026-02-02 14:29 Mark Brown
2026-01-19 17:03 Mark Brown
2026-01-19 16:53 Mark Brown
2025-10-02 12:07 Mark Brown
2025-10-02 12:05 Mark Brown
2025-10-02 12:30 ` Danilo Krummrich
2025-09-26 12:38 Mark Brown
2024-06-28 16:51 Mark Brown
2024-06-27 15:06 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=awRdPKox0-8OAIG4@sirena.org.uk \
--to=broonie@kernel.org \
--cc=airlied@redhat.com \
--cc=badal.nilawar@intel.com \
--cc=daniel.charles@intel.com \
--cc=dri-devel@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=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