Intel-XE Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Matthew Brost <matthew.brost@intel.com>
To: John Harrison <john.c.harrison@intel.com>
Cc: "Cavitt, Jonathan" <jonathan.cavitt@intel.com>,
	"intel-xe@lists.freedesktop.org" <intel-xe@lists.freedesktop.org>,
	"Teres Alexis, Alan Previn" <alan.previn.teres.alexis@intel.com>,
	"Dong, Zhanjun" <zhanjun.dong@intel.com>,
	"Vivi, Rodrigo" <rodrigo.vivi@intel.com>
Subject: Re: [PATCH 2/7] drm/xe: Add ring address to LRC snapshot
Date: Tue, 12 Nov 2024 10:18:04 -0800	[thread overview]
Message-ID: <ZzOb3FtRFAMAQzt3@lstrano-desk.jf.intel.com> (raw)
In-Reply-To: <9d829b21-4327-4cbf-ad72-b3e47d57fa74@intel.com>

On Tue, Nov 12, 2024 at 09:59:16AM -0800, John Harrison wrote:
> On 11/8/2024 15:34, Cavitt, Jonathan wrote:
> > -----Original Message-----
> > From: Brost, Matthew <matthew.brost@intel.com>
> > Sent: Friday, November 8, 2024 3:10 PM
> > To: Cavitt, Jonathan <jonathan.cavitt@intel.com>
> > Cc: intel-xe@lists.freedesktop.org; Teres Alexis, Alan Previn <alan.previn.teres.alexis@intel.com>; Dong, Zhanjun <zhanjun.dong@intel.com>; Vivi, Rodrigo <rodrigo.vivi@intel.com>
> > Subject: Re: [PATCH 2/7] drm/xe: Add ring address to LRC snapshot
> > > On Fri, Nov 08, 2024 at 03:05:34PM -0700, Cavitt, Jonathan wrote:
> > > > -----Original Message-----
> > > > From: Intel-xe <intel-xe-bounces@lists.freedesktop.org> On Behalf Of Matthew Brost
> > > > Sent: Friday, November 8, 2024 9:43 AM
> > > > To: intel-xe@lists.freedesktop.org
> > > > Cc: Teres Alexis, Alan Previn <alan.previn.teres.alexis@intel.com>; Dong, Zhanjun <zhanjun.dong@intel.com>; Vivi, Rodrigo <rodrigo.vivi@intel.com>
> > > > Subject: [PATCH 2/7] drm/xe: Add ring address to LRC snapshot
> > > > > The ring is currently in LRC BO but this may change going forward.
> > > > > Include the ring address in the snapshot protecting again any future
> > > > > changes.
> > > > > 
> > > > > Signed-off-by: Matthew Brost <matthew.brost@intel.com>
> > > > LGTM, though the terminology we're using to describe the various ggtt addresses
> > > > as "descriptors" is a bit confusing, even if it's consistent.  I wonder where that
> > > > terminology came from?
> > > > This is just a rhetorical question.  I'm not suggesting it be changed.
> > > > 
> > > LRC descriptors is name copied over from i915 and may even be in the bspec.
> > > 
> > > But yea, indirect_state_desc and ring_desc are bad names. Will change to
> > > 'ring_addr' here.
> > IMO it would probably be better to leave it as "ring_desc" for now as it's
> > consistent with surrounding struct members.  We can do a pass of the full
> > XE kernel for inaccurate uses of the "desc" qualifier in the near future and
> > fix the naming scheme here as a part of that fixup.
> I strongly disagree. Just because A is broken doesn't mean we should add a
> broken B and C! It makes no sense to add a name we know is bad just so that
> we can change it later. Anything new should be done properly from the start.
> 

I agree with John here.

Matt

> John.
> 
> > 
> > My RB still stands either way.
> > -Jonathan Cavitt
> > 
> > > Matt
> > > 
> > > > Reviewed-by: Jonathan Cavitt <jonathan.cavitt@intel.com>
> > > > -Jonathan Cavitt
> > > > 
> > > > > ---
> > > > >   drivers/gpu/drm/xe/xe_lrc.c | 3 +++
> > > > >   drivers/gpu/drm/xe/xe_lrc.h | 1 +
> > > > >   2 files changed, 4 insertions(+)
> > > > > 
> > > > > diff --git a/drivers/gpu/drm/xe/xe_lrc.c b/drivers/gpu/drm/xe/xe_lrc.c
> > > > > index e219657535cf..afb0f4f44748 100644
> > > > > --- a/drivers/gpu/drm/xe/xe_lrc.c
> > > > > +++ b/drivers/gpu/drm/xe/xe_lrc.c
> > > > > @@ -1636,6 +1636,7 @@ struct xe_lrc_snapshot *xe_lrc_snapshot_capture(struct xe_lrc *lrc)
> > > > >   		xe_vm_get(lrc->bo->vm);
> > > > >   	snapshot->context_desc = xe_lrc_ggtt_addr(lrc);
> > > > > +	snapshot->ring_desc = __xe_lrc_ring_ggtt_addr(lrc);
> > > > >   	snapshot->indirect_context_desc = xe_lrc_indirect_ring_ggtt_addr(lrc);
> > > > >   	snapshot->head = xe_lrc_ring_head(lrc);
> > > > >   	snapshot->tail.internal = lrc->ring.tail;
> > > > > @@ -1693,6 +1694,8 @@ void xe_lrc_snapshot_print(struct xe_lrc_snapshot *snapshot, struct drm_printer
> > > > >   		return;
> > > > >   	drm_printf(p, "\tHW Context Desc: 0x%08x\n", snapshot->context_desc);
> > > > > +	drm_printf(p, "\tHW Ring: 0x%08x\n",
> > > > > +		   snapshot->ring_desc);
> > > > >   	drm_printf(p, "\tHW Indirect Ring State: 0x%08x\n",
> > > > >   		   snapshot->indirect_context_desc);
> > > > >   	drm_printf(p, "\tLRC Head: (memory) %u\n", snapshot->head);
> > > > > diff --git a/drivers/gpu/drm/xe/xe_lrc.h b/drivers/gpu/drm/xe/xe_lrc.h
> > > > > index 9d64cedc4d14..a2058a501353 100644
> > > > > --- a/drivers/gpu/drm/xe/xe_lrc.h
> > > > > +++ b/drivers/gpu/drm/xe/xe_lrc.h
> > > > > @@ -25,6 +25,7 @@ struct xe_lrc_snapshot {
> > > > >   	unsigned long lrc_size, lrc_offset;
> > > > >   	u32 context_desc;
> > > > > +	u32 ring_desc;
> > > > >   	u32 indirect_context_desc;
> > > > >   	u32 head;
> > > > >   	struct {
> > > > > -- 
> > > > > 2.34.1
> > > > > 
> > > > > 
> 

  reply	other threads:[~2024-11-12 18:17 UTC|newest]

Thread overview: 40+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-11-08 17:43 [PATCH 0/7] Devcoredump Improvements Matthew Brost
2024-11-08 17:43 ` [PATCH 1/7] drm/xe: Add xe_lrc_is_idle() helper Matthew Brost
2024-11-08 20:11   ` Rodrigo Vivi
2024-11-08 22:00   ` Cavitt, Jonathan
2024-11-08 22:06   ` Dong, Zhanjun
2024-11-08 22:58     ` Matthew Brost
2024-11-08 17:43 ` [PATCH 2/7] drm/xe: Add ring address to LRC snapshot Matthew Brost
2024-11-08 20:12   ` Rodrigo Vivi
2024-11-08 22:05   ` Cavitt, Jonathan
2024-11-08 23:10     ` Matthew Brost
2024-11-08 23:34       ` Cavitt, Jonathan
2024-11-12 17:59         ` John Harrison
2024-11-12 18:18           ` Matthew Brost [this message]
2024-11-12 20:16             ` Cavitt, Jonathan
2024-11-12 20:30               ` Matt Roper
2024-11-12 20:46                 ` Rodrigo Vivi
2024-11-12 21:21                   ` Cavitt, Jonathan
2024-11-12 22:26                     ` Matt Roper
2024-11-08 17:43 ` [PATCH 3/7] drm/xe: Add ring start " Matthew Brost
2024-11-08 22:07   ` Cavitt, Jonathan
2024-11-08 17:43 ` [PATCH 4/7] drm/xe: Improve schedule disable response failure Matthew Brost
2024-11-08 22:07   ` Cavitt, Jonathan
2024-11-08 17:43 ` [PATCH 5/7] drm/xe: Add exec queue param to devcoredump Matthew Brost
2024-11-08 22:21   ` Rodrigo Vivi
2024-11-08 22:56     ` Matthew Brost
2024-11-08 22:22   ` Cavitt, Jonathan
2024-11-08 17:43 ` [PATCH 6/7] drm/xe: Change xe_engine_snapshot_capture_for_job to be for_queue Matthew Brost
2024-11-08 22:27   ` Cavitt, Jonathan
2024-11-11 22:15   ` Dong, Zhanjun
2024-11-11 22:41     ` Dong, Zhanjun
2024-11-08 17:43 ` [PATCH 7/7] drm/xe: Wire devcoredump to LR TDR Matthew Brost
2024-11-08 22:27   ` Cavitt, Jonathan
2024-11-08 17:47 ` ✓ CI.Patch_applied: success for Devcoredump Improvements Patchwork
2024-11-08 17:48 ` ✓ CI.checkpatch: " Patchwork
2024-11-08 17:49 ` ✓ CI.KUnit: " Patchwork
2024-11-08 18:00 ` ✓ CI.Build: " Patchwork
2024-11-08 18:03 ` ✗ CI.Hooks: failure " Patchwork
2024-11-08 18:04 ` ✓ CI.checksparse: success " Patchwork
2024-11-08 18:21 ` ✓ CI.BAT: " Patchwork
2024-11-09 20:30 ` ✗ 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=ZzOb3FtRFAMAQzt3@lstrano-desk.jf.intel.com \
    --to=matthew.brost@intel.com \
    --cc=alan.previn.teres.alexis@intel.com \
    --cc=intel-xe@lists.freedesktop.org \
    --cc=john.c.harrison@intel.com \
    --cc=jonathan.cavitt@intel.com \
    --cc=rodrigo.vivi@intel.com \
    --cc=zhanjun.dong@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