From: Tomasz Lis <tomasz.lis@intel.com>
To: intel-xe@lists.freedesktop.org
Cc: "Michał Winiarski" <michal.winiarski@intel.com>,
"Michał Wajdeczko" <michal.wajdeczko@intel.com>,
"Piotr Piórkowski" <piotr.piorkowski@intel.com>,
"Matthew Brost" <matthew.brost@intel.com>,
"Lucas De Marchi" <lucas.demarchi@intel.com>
Subject: [PATCH v4 8/8] drm/xe/vf: Refresh utilization buffer during migration recovery
Date: Fri, 6 Jun 2025 02:18:23 +0200 [thread overview]
Message-ID: <20250606001823.1010994-9-tomasz.lis@intel.com> (raw)
In-Reply-To: <20250606001823.1010994-1-tomasz.lis@intel.com>
The WA buffer we use to capture context utilization contains GGTT
references. This means its instructions have to be either fixed or
re-emitted during VF post-migration recovery.
This patch adds re-emitting content of the utilization WA BB during
the recovery.
Signed-off-by: Tomasz Lis <tomasz.lis@intel.com>
Cc: Michal Wajdeczko <michal.wajdeczko@intel.com>
Cc: Michal Winiarski <michal.winiarski@intel.com>
---
drivers/gpu/drm/xe/xe_exec_queue.c | 1 +
drivers/gpu/drm/xe/xe_lrc.c | 4 ++--
drivers/gpu/drm/xe/xe_lrc.h | 1 +
3 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/drivers/gpu/drm/xe/xe_exec_queue.c b/drivers/gpu/drm/xe/xe_exec_queue.c
index d5ffb550bde7..63190aab0a1f 100644
--- a/drivers/gpu/drm/xe/xe_exec_queue.c
+++ b/drivers/gpu/drm/xe/xe_exec_queue.c
@@ -1041,6 +1041,7 @@ void xe_exec_queue_contexts_hwsp_rebase(struct xe_exec_queue *q)
for (i = 0; i < q->width; ++i) {
xe_lrc_update_memirq_regs_with_address(q->lrc[i], q->hwe);
xe_lrc_update_hwctx_regs_with_address(q->lrc[i]);
+ xe_lrc_setup_utilization(q->lrc[i]);
}
}
diff --git a/drivers/gpu/drm/xe/xe_lrc.c b/drivers/gpu/drm/xe/xe_lrc.c
index c74856f3974a..21cc99935ebe 100644
--- a/drivers/gpu/drm/xe/xe_lrc.c
+++ b/drivers/gpu/drm/xe/xe_lrc.c
@@ -951,7 +951,7 @@ static void xe_lrc_finish(struct xe_lrc *lrc)
xe_bo_unpin_map_no_vm(lrc->bb_per_ctx_bo);
}
-/*
+/**
* xe_lrc_setup_utilization() - Setup wa bb to assist in calculating active
* context run ticks.
* @lrc: Pointer to the lrc.
@@ -979,7 +979,7 @@ static void xe_lrc_finish(struct xe_lrc *lrc)
* store it in the PPHSWP.
*/
#define CONTEXT_ACTIVE 1ULL
-static void xe_lrc_setup_utilization(struct xe_lrc *lrc)
+void xe_lrc_setup_utilization(struct xe_lrc *lrc)
{
u32 *cmd;
diff --git a/drivers/gpu/drm/xe/xe_lrc.h b/drivers/gpu/drm/xe/xe_lrc.h
index 801a6b943f6e..681b859f57e9 100644
--- a/drivers/gpu/drm/xe/xe_lrc.h
+++ b/drivers/gpu/drm/xe/xe_lrc.h
@@ -127,6 +127,7 @@ u32 xe_lrc_ctx_timestamp_udw_ggtt_addr(struct xe_lrc *lrc);
u64 xe_lrc_ctx_timestamp(struct xe_lrc *lrc);
u32 xe_lrc_ctx_job_timestamp_ggtt_addr(struct xe_lrc *lrc);
u32 xe_lrc_ctx_job_timestamp(struct xe_lrc *lrc);
+void xe_lrc_setup_utilization(struct xe_lrc *lrc);
/**
* xe_lrc_update_timestamp - readout LRC timestamp and update cached value
--
2.25.1
next prev parent reply other threads:[~2025-06-06 0:18 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-06-06 0:18 [PATCH v4 0/8] drm/xe/vf: Post-migration recovery of queues and jobs Tomasz Lis
2025-06-06 0:18 ` [PATCH v4 1/8] drm/xe/sa: Avoid caching GGTT address within the manager Tomasz Lis
2025-06-06 0:18 ` [PATCH v4 2/8] drm/xe/vf: Finish RESFIX by reset if CTB not enabled Tomasz Lis
2025-06-09 11:00 ` Michal Wajdeczko
2025-06-11 20:18 ` Lis, Tomasz
2025-06-06 0:18 ` [PATCH v4 3/8] drm/xe/vf: Pause submissions during RESFIX fixups Tomasz Lis
2025-06-06 0:18 ` [PATCH v4 4/8] drm/xe: Block reset while recovering from VF migration Tomasz Lis
2025-06-06 0:18 ` [PATCH v4 5/8] drm/xe/vf: Rebase HWSP of all contexts after migration Tomasz Lis
2025-06-09 11:03 ` Michal Wajdeczko
2025-06-11 20:18 ` Lis, Tomasz
2025-06-06 0:18 ` [PATCH v4 6/8] drm/xe/vf: Rebase MEMIRQ structures for " Tomasz Lis
2025-06-09 11:15 ` Michal Wajdeczko
2025-06-06 0:18 ` [PATCH v4 7/8] drm/xe/vf: Post migration, repopulate ring area for pending request Tomasz Lis
2025-06-06 0:18 ` Tomasz Lis [this message]
2025-06-06 2:43 ` ✓ CI.Patch_applied: success for drm/xe/vf: Post-migration recovery of queues and jobs (rev4) Patchwork
2025-06-06 2:44 ` ✗ CI.checkpatch: warning " Patchwork
2025-06-06 2:45 ` ✓ CI.KUnit: success " Patchwork
2025-06-06 2:56 ` ✓ CI.Build: " Patchwork
2025-06-06 2:58 ` ✗ CI.Hooks: failure " Patchwork
2025-06-06 3:00 ` ✓ CI.checksparse: success " Patchwork
2025-06-06 3:46 ` ✓ Xe.CI.BAT: " Patchwork
2025-06-08 7:58 ` ✗ Xe.CI.Full: failure " Patchwork
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=20250606001823.1010994-9-tomasz.lis@intel.com \
--to=tomasz.lis@intel.com \
--cc=intel-xe@lists.freedesktop.org \
--cc=lucas.demarchi@intel.com \
--cc=matthew.brost@intel.com \
--cc=michal.wajdeczko@intel.com \
--cc=michal.winiarski@intel.com \
--cc=piotr.piorkowski@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.