Intel-XE Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: "Dixit, Ashutosh" <ashutosh.dixit@intel.com>
To: Matthew Brost <matthew.brost@intel.com>
Cc: intel-xe@lists.freedesktop.org,
	Umesh Nerlige Ramappa <umesh.nerlige.ramappa@intel.com>
Subject: Re: [PATCH 1/2] drm/xe/oa: Disallow OA from being enabled on active exec_queue's
Date: Mon, 18 Nov 2024 17:35:23 -0800	[thread overview]
Message-ID: <85ttc4vwdg.wl-ashutosh.dixit@intel.com> (raw)
In-Reply-To: <Zy6bZgJmdaMisqZ9@lstrano-desk.jf.intel.com>

On Fri, 08 Nov 2024 15:14:46 -0800, Matthew Brost wrote:
>
> On Fri, Nov 08, 2024 at 03:06:00PM -0800, Ashutosh Dixit wrote:
> > Enabling OA on an exec_queue toggles the OAC_CONTEXT_ENABLE bit in
> > CTXT_SR_CTL register. Toggling this bit changes the size and layout of the
> > underlying HW context image. Therefore, enabling OA on an already active
> > exec_queue (as currently implemented in xe) is an invalid operation and can
> > cause hangs. Therefore, disallow OA from being enabled on active
> > exec_queue's (here by active we mean a context on which submissions have
> > previously happened).
> >
> > Transition from 1 -> 0 for this bit was disallowed in
> > '0c8650b09a36 ("drm/xe/oa: Don't reset OAC_CONTEXT_ENABLE on OA stream
> > close")'. Here we disallow the 0 -> 1 transition on active contexts.
> >
> > Bspec: 60314
> > Fixes: 2f4a730fcd2d ("drm/xe/oa: Add OAR support")
> > Cc: stable@vger.kernel.org
> > Signed-off-by: Ashutosh Dixit <ashutosh.dixit@intel.com>
> > ---
> >  drivers/gpu/drm/xe/xe_guc_submit.c |  2 +-
> >  drivers/gpu/drm/xe/xe_guc_submit.h |  1 +
> >  drivers/gpu/drm/xe/xe_oa.c         | 11 +++++++++++
> >  3 files changed, 13 insertions(+), 1 deletion(-)
> >
> > diff --git a/drivers/gpu/drm/xe/xe_guc_submit.c b/drivers/gpu/drm/xe/xe_guc_submit.c
> > index 9e0f86f3778b2..5c285d966fd5c 100644
> > --- a/drivers/gpu/drm/xe/xe_guc_submit.c
> > +++ b/drivers/gpu/drm/xe/xe_guc_submit.c
> > @@ -83,7 +83,7 @@ static void clear_exec_queue_registered(struct xe_exec_queue *q)
> >	atomic_and(~EXEC_QUEUE_STATE_REGISTERED, &q->guc->state);
> >  }
> >
> > -static bool exec_queue_enabled(struct xe_exec_queue *q)
> > +bool exec_queue_enabled(struct xe_exec_queue *q)
>
> Don't export this. Use a xe_exec_queue_ops vfunc. Current vfunc
> 'reset_status' would kinda similar to this. A vfunc protects use against
> baking in submission backend specifics into other layers. We only really
> have 1 ATM that works (execlists backend is still here for some reason)
> but this is the best practice.

Done in v2, thanks for the suggestion, Matt. I've only added the vfunc to
GuC though, since OA is disabled for execlists.

  reply	other threads:[~2024-11-19  1:35 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-11-08 23:05 [PATCH 0/2] Disallow OA from being enabled on active exec_queue's Ashutosh Dixit
2024-11-08 23:06 ` [PATCH 1/2] drm/xe/oa: " Ashutosh Dixit
2024-11-08 23:14   ` Matthew Brost
2024-11-19  1:35     ` Dixit, Ashutosh [this message]
2024-11-08 23:38   ` Cavitt, Jonathan
2024-11-08 23:06 ` [PATCH 2/2] drm/xe/oa: Allow subsequent OA streams to be opened on an exec_queue Ashutosh Dixit
2024-11-08 23:42   ` Cavitt, Jonathan
2024-11-19  1:36     ` Dixit, Ashutosh
2024-11-08 23:11 ` ✓ CI.Patch_applied: success for Disallow OA from being enabled on active exec_queue's Patchwork
2024-11-08 23:11 ` ✓ CI.checkpatch: " Patchwork
2024-11-08 23:12 ` ✓ CI.KUnit: " Patchwork
2024-11-08 23:24 ` ✓ CI.Build: " Patchwork
2024-11-08 23:26 ` ✓ CI.Hooks: " Patchwork
2024-11-08 23:28 ` ✓ CI.checksparse: " Patchwork
2024-11-08 23:45 ` ✓ CI.BAT: " Patchwork
2024-11-10  2:29 ` ✗ CI.FULL: failure " Patchwork
2024-11-11 14:31 ` [PATCH 0/2] " Souza, Jose

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=85ttc4vwdg.wl-ashutosh.dixit@intel.com \
    --to=ashutosh.dixit@intel.com \
    --cc=intel-xe@lists.freedesktop.org \
    --cc=matthew.brost@intel.com \
    --cc=umesh.nerlige.ramappa@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