From: Rodrigo Vivi <rodrigo.vivi@intel.com>
To: Matt Roper <matthew.d.roper@intel.com>
Cc: intel-xe@lists.freedesktop.org
Subject: Re: [Intel-xe] [PATCH] drm/xe: fix mcr semaphore locking for MTL
Date: Thu, 27 Jul 2023 09:55:23 -0400 [thread overview]
Message-ID: <ZMJ3S2hk/UAczabO@intel.com> (raw)
In-Reply-To: <20230726234550.GB209733@mdroper-desk1.amr.corp.intel.com>
On Wed, Jul 26, 2023 at 04:45:50PM -0700, Matt Roper wrote:
> On Wed, Jul 26, 2023 at 03:25:28PM -0700, Daniele Ceraolo Spurio wrote:
> > in commit 8604f978f45b ("drm/xe: Convert xe_mmio_wait32 to us so we can
> > stop using wait_for_us.") the mcr semaphore register read was
> > accidentally switched from waiting for the register to go to 1 to
> > waiting for the register to go to 0, so we need to flip it back.
> >
> > Signed-off-by: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com>
> > Cc: Rodrigo Vivi <rodrigo.vivi@intel.com>
> > Cc: Matthew Brost <matthew.brost@intel.com>
>
> Reviewed-by: Matt Roper <matthew.d.roper@intel.com>
I just pushed this since I have changes on top of xe_mmio_wait32 that would
conflict with this.
Thanks for the patch and review and sorry for the mistake previous patch.
>
> > ---
> > drivers/gpu/drm/xe/xe_gt_mcr.c | 7 ++++---
> > 1 file changed, 4 insertions(+), 3 deletions(-)
> >
> > diff --git a/drivers/gpu/drm/xe/xe_gt_mcr.c b/drivers/gpu/drm/xe/xe_gt_mcr.c
> > index c56815af0686..9eb7a6a1348d 100644
> > --- a/drivers/gpu/drm/xe/xe_gt_mcr.c
> > +++ b/drivers/gpu/drm/xe/xe_gt_mcr.c
> > @@ -420,10 +420,11 @@ static void mcr_lock(struct xe_gt *gt)
> > /*
> > * Starting with MTL we also need to grab a semaphore register
> > * to synchronize with external agents (e.g., firmware) that now
> > - * shares the same steering control register.
> > + * shares the same steering control register. The semaphore is obtained
> > + * when a read to the relevant register returns 1.
> > */
> > if (GRAPHICS_VERx100(xe) >= 1270)
> > - ret = xe_mmio_wait32(gt, STEER_SEMAPHORE, 0, 0x1, 10, NULL,
> > + ret = xe_mmio_wait32(gt, STEER_SEMAPHORE, 0x1, 0x1, 10, NULL,
> > true);
> >
> > drm_WARN_ON_ONCE(&xe->drm, ret == -ETIMEDOUT);
> > @@ -431,7 +432,7 @@ static void mcr_lock(struct xe_gt *gt)
> >
> > static void mcr_unlock(struct xe_gt *gt)
> > {
> > - /* Release hardware semaphore */
> > + /* Release hardware semaphore - this is done by writing 1 to the register */
> > if (GRAPHICS_VERx100(gt_to_xe(gt)) >= 1270)
> > xe_mmio_write32(gt, STEER_SEMAPHORE, 0x1);
> >
> > --
> > 2.41.0
> >
>
> --
> Matt Roper
> Graphics Software Engineer
> Linux GPU Platform Enablement
> Intel Corporation
next prev parent reply other threads:[~2023-07-27 13:55 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-07-26 22:25 [Intel-xe] [PATCH] drm/xe: fix mcr semaphore locking for MTL Daniele Ceraolo Spurio
2023-07-26 23:12 ` [Intel-xe] ✓ CI.Patch_applied: success for " Patchwork
2023-07-26 23:12 ` [Intel-xe] ✗ CI.checkpatch: warning " Patchwork
2023-07-26 23:13 ` [Intel-xe] ✓ CI.KUnit: success " Patchwork
2023-07-26 23:17 ` [Intel-xe] ✓ CI.Build: " Patchwork
2023-07-26 23:17 ` [Intel-xe] ✓ CI.Hooks: " Patchwork
2023-07-26 23:19 ` [Intel-xe] ✓ CI.checksparse: " Patchwork
2023-07-26 23:45 ` [Intel-xe] [PATCH] " Matt Roper
2023-07-27 13:55 ` Rodrigo Vivi [this message]
2023-07-26 23:53 ` [Intel-xe] ○ CI.BAT: info for " 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=ZMJ3S2hk/UAczabO@intel.com \
--to=rodrigo.vivi@intel.com \
--cc=intel-xe@lists.freedesktop.org \
--cc=matthew.d.roper@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.