From: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
To: "Souza, Jose" <jose.souza@intel.com>,
"intel-xe@lists.freedesktop.org" <intel-xe@lists.freedesktop.org>
Subject: Re: [PATCH v5 7/9] drm/xe: Move lrc snapshot capturing to xe_lrc.c
Date: Wed, 21 Feb 2024 20:27:28 +0100 [thread overview]
Message-ID: <c70a43f5-2813-48f1-b813-ed2c383f3828@linux.intel.com> (raw)
In-Reply-To: <436f229b67e7120c7fd35ca100059e94837fba12.camel@intel.com>
Hey,
On 2024-02-21 18:56, Souza, Jose wrote:
> On Wed, 2024-02-21 at 14:30 +0100, Maarten Lankhorst wrote:
>> This allows the dumping of HWSP and HW Context without exporting more
>> functions.
>>
>> Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
>> ---
>> drivers/gpu/drm/xe/xe_guc_submit.c | 33 ++++++-----------
>> drivers/gpu/drm/xe/xe_guc_submit_types.h | 13 +------
>> drivers/gpu/drm/xe/xe_lrc.c | 45 ++++++++++++++++++++++++
>> drivers/gpu/drm/xe/xe_lrc.h | 4 +++
>> drivers/gpu/drm/xe/xe_lrc_types.h | 2 ++
>> 5 files changed, 63 insertions(+), 34 deletions(-)
>>
>> diff --git a/drivers/gpu/drm/xe/xe_guc_submit.c b/drivers/gpu/drm/xe/xe_guc_submit.c
>> index ff77bc8da1b27..7348689ec5aef 100644
>> --- a/drivers/gpu/drm/xe/xe_guc_submit.c
>> +++ b/drivers/gpu/drm/xe/xe_guc_submit.c
>> @@ -1814,21 +1814,14 @@ xe_guc_exec_queue_snapshot_capture(struct xe_sched_job *job)
>> snapshot->sched_props.preempt_timeout_us =
>> q->sched_props.preempt_timeout_us;
>>
>> - snapshot->lrc = kmalloc_array(q->width, sizeof(struct lrc_snapshot),
>> + snapshot->lrc = kmalloc_array(q->width, sizeof(struct xe_lrc_snapshot *),
>> GFP_ATOMIC);
>>
>> if (snapshot->lrc) {
>> for (i = 0; i < q->width; ++i) {
>> struct xe_lrc *lrc = q->lrc + i;
>>
>> - snapshot->lrc[i].context_desc =
>> - lower_32_bits(xe_lrc_ggtt_addr(lrc));
>> - snapshot->lrc[i].head = xe_lrc_ring_head(lrc);
>> - snapshot->lrc[i].tail.internal = lrc->ring.tail;
>> - snapshot->lrc[i].tail.memory =
>> - xe_lrc_read_ctx_reg(lrc, CTX_RING_TAIL);
>> - snapshot->lrc[i].start_seqno = xe_lrc_start_seqno(lrc);
>> - snapshot->lrc[i].seqno = xe_lrc_seqno(lrc);
>> + snapshot->lrc[i] = xe_lrc_snapshot_capture(lrc);
>> }
>> }
>>
>> @@ -1894,18 +1887,9 @@ xe_guc_exec_queue_snapshot_print(struct xe_guc_submit_exec_queue_snapshot *snaps
>> drm_printf(p, "\tPreempt timeout: %u (us)\n",
>> snapshot->sched_props.preempt_timeout_us);
>>
>> - for (i = 0; snapshot->lrc && i < snapshot->width; ++i) {
>> - drm_printf(p, "\tHW Context Desc: 0x%08x\n",
>> - snapshot->lrc[i].context_desc);
>> - drm_printf(p, "\tLRC Head: (memory) %u\n",
>> - snapshot->lrc[i].head);
>> - drm_printf(p, "\tLRC Tail: (internal) %u, (memory) %u\n",
>> - snapshot->lrc[i].tail.internal,
>> - snapshot->lrc[i].tail.memory);
>> - drm_printf(p, "\tStart seqno: (memory) %d\n",
>> - snapshot->lrc[i].start_seqno);
>> - drm_printf(p, "\tSeqno: (memory) %d\n", snapshot->lrc[i].seqno);
>> - }
>> + for (i = 0; snapshot->lrc && i < snapshot->width; ++i)
>> + xe_lrc_snapshot_print(snapshot->lrc[i], p);
>> +
>> drm_printf(p, "\tSchedule State: 0x%x\n", snapshot->schedule_state);
>> drm_printf(p, "\tFlags: 0x%lx\n", snapshot->exec_queue_flags);
>
> can you please print this before xe_lrc_snapshot_print()? to make the file easier to read.
Yeah, will do so.
I've pushed patches 1-6, that should at least be in time for merge
window closing now.
Cheers,
~Maarten
next prev parent reply other threads:[~2024-02-21 19:27 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-02-21 13:30 [PATCH v5 1/9] drm/xe/snapshot: Remove drm_err on guc alloc failures Maarten Lankhorst
2024-02-21 13:30 ` [PATCH v5 2/9] drm/xe: Clear all snapshot members after deleting coredump Maarten Lankhorst
2024-02-21 15:09 ` Francois Dugast
2024-02-21 13:30 ` [PATCH v5 3/9] drm/xe: Add uapi for dumpable bos Maarten Lankhorst
2024-02-21 13:30 ` [PATCH v5 4/9] drm/xe: Annotate each dumpable vma as such Maarten Lankhorst
2024-02-21 13:30 ` [PATCH v5 5/9] drm/xe: Add vm snapshot mutex for easily taking a vm snapshot during devcoredump Maarten Lankhorst
2024-02-21 13:30 ` [PATCH v5 6/9] drm/xe: Implement VM snapshot support for BO's and userptr Maarten Lankhorst
2024-02-21 13:30 ` [PATCH v5 7/9] drm/xe: Move lrc snapshot capturing to xe_lrc.c Maarten Lankhorst
2024-02-21 17:56 ` Souza, Jose
2024-02-21 19:27 ` Maarten Lankhorst [this message]
2024-02-21 13:30 ` [PATCH v5 8/9] drm/xe: Add infrastructure for delayed LRC capture Maarten Lankhorst
2024-02-21 13:30 ` [PATCH v5 9/9] drm/xe: Implement capture of HWSP and HWCTX Maarten Lankhorst
2024-02-21 17:26 ` Souza, Jose
2024-02-21 17:29 ` Maarten Lankhorst
2024-02-21 17:44 ` Souza, Jose
2024-02-21 17:45 ` Souza, Jose
2024-02-21 17:56 ` Souza, Jose
2024-02-22 15:30 ` Souza, Jose
2024-02-21 13:37 ` ✓ CI.Patch_applied: success for series starting with [v5,1/9] drm/xe/snapshot: Remove drm_err on guc alloc failures Patchwork
2024-02-21 13:38 ` ✗ CI.checkpatch: warning " Patchwork
2024-02-21 13:40 ` ✓ CI.KUnit: success " Patchwork
2024-02-21 13:52 ` ✓ CI.Build: " Patchwork
2024-02-21 13:53 ` ✓ CI.Hooks: " Patchwork
2024-02-21 13:54 ` ✓ CI.checksparse: " Patchwork
2024-02-21 14:02 ` [PATCH v5 1/9] " Francois Dugast
2024-02-21 14:30 ` ✓ CI.BAT: success for series starting with [v5,1/9] " 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=c70a43f5-2813-48f1-b813-ed2c383f3828@linux.intel.com \
--to=maarten.lankhorst@linux.intel.com \
--cc=intel-xe@lists.freedesktop.org \
--cc=jose.souza@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