From: Rodrigo Vivi <rodrigo.vivi@intel.com>
To: Matthew Brost <matthew.brost@intel.com>
Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>,
<intel-xe@lists.freedesktop.org>,
Lucas De Marchi <lucas.demarchi@intel.com>,
Matt Roper <matthew.d.roper@intel.com>
Subject: Re: [PATCH 2/4] drm/xe: Do not grab forcewakes when issuing GGTT TLB invalidation via GuC
Date: Tue, 5 Mar 2024 14:14:29 -0500 [thread overview]
Message-ID: <ZedvFU3GZCTQCsQd@intel.com> (raw)
In-Reply-To: <ZedrH8URnZU/PGTS@DUT025-TGLU.fm.intel.com>
On Tue, Mar 05, 2024 at 06:57:35PM +0000, Matthew Brost wrote:
> On Tue, Mar 05, 2024 at 02:12:48PM +0100, Maarten Lankhorst wrote:
> > Forcewakes are not required for communication with the GuC via CTB
> > as it is a memory based interfaced. Acquring forcewakes takes
> > considerable time. With that, do not grab a forcewake when issuing a
> > GGTT TLB invalidation via the GuC.
> >
> > Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
> > Cc: Lucas De Marchi <lucas.demarchi@intel.com>
> > Cc: Matt Roper <matthew.d.roper@intel.com>
> > Signed-off-by: Matthew Brost <matthew.brost@intel.com>
>
> I am the author too.
Co-developed-by: is the recommended in this case then.
Besides the signed-off-by.
>
> Matt
>
> > Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
> > ---
> > drivers/gpu/drm/xe/xe_ggtt.c | 7 -------
> > drivers/gpu/drm/xe/xe_gt_tlb_invalidation.c | 2 ++
> > 2 files changed, 2 insertions(+), 7 deletions(-)
> >
> > diff --git a/drivers/gpu/drm/xe/xe_ggtt.c b/drivers/gpu/drm/xe/xe_ggtt.c
> > index 0435e1202c46..325337c38961 100644
> > --- a/drivers/gpu/drm/xe/xe_ggtt.c
> > +++ b/drivers/gpu/drm/xe/xe_ggtt.c
> > @@ -256,16 +256,9 @@ static void ggtt_invalidate_gt_tlb(struct xe_gt *gt)
> > if (!gt)
> > return;
> >
> > - /*
> > - * Invalidation can happen when there's no in-flight work keeping the
> > - * GT awake. We need to explicitly grab forcewake to ensure the GT
> > - * and GuC are accessible.
> > - */
> > - xe_force_wake_get(gt_to_fw(gt), XE_FW_GT);
> > err = xe_gt_tlb_invalidation_ggtt(gt);
> > if (err)
> > drm_warn(>_to_xe(gt)->drm, "xe_gt_tlb_invalidation_ggtt error=%d", err);
> > - xe_force_wake_put(gt_to_fw(gt), XE_FW_GT);
> > }
> >
> > void xe_ggtt_invalidate(struct xe_ggtt *ggtt)
> > diff --git a/drivers/gpu/drm/xe/xe_gt_tlb_invalidation.c b/drivers/gpu/drm/xe/xe_gt_tlb_invalidation.c
> > index f29ee1ccfa71..a3c4ffba679d 100644
> > --- a/drivers/gpu/drm/xe/xe_gt_tlb_invalidation.c
> > +++ b/drivers/gpu/drm/xe/xe_gt_tlb_invalidation.c
> > @@ -247,6 +247,7 @@ int xe_gt_tlb_invalidation_ggtt(struct xe_gt *gt)
> >
> > xe_gt_tlb_invalidation_wait(gt, seqno);
> > } else if (xe_device_uc_enabled(xe)) {
> > + xe_force_wake_get(gt_to_fw(gt), XE_FW_GT);
> > if (xe->info.platform == XE_PVC || GRAPHICS_VER(xe) >= 20) {
> > xe_mmio_write32(gt, PVC_GUC_TLB_INV_DESC1,
> > PVC_GUC_TLB_INV_DESC1_INVALIDATE);
> > @@ -256,6 +257,7 @@ int xe_gt_tlb_invalidation_ggtt(struct xe_gt *gt)
> > xe_mmio_write32(gt, GUC_TLB_INV_CR,
> > GUC_TLB_INV_CR_INVALIDATE);
> > }
> > + xe_force_wake_put(gt_to_fw(gt), XE_FW_GT);
> > }
> >
> > return 0;
> > --
> > 2.43.0
> >
next prev parent reply other threads:[~2024-03-05 19:14 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-03-05 13:12 [PATCH 0/4] drm/xe: Reduce GGTT display pinning latency Maarten Lankhorst
2024-03-05 13:12 ` [PATCH 1/4] fix "drm/xe: Cleanup some layering in GGTT" Maarten Lankhorst
2024-03-05 14:42 ` Rodrigo Vivi
2024-03-05 15:10 ` Lucas De Marchi
2024-03-05 13:12 ` [PATCH 2/4] drm/xe: Do not grab forcewakes when issuing GGTT TLB invalidation via GuC Maarten Lankhorst
2024-03-05 14:43 ` Rodrigo Vivi
2024-03-05 18:57 ` Matthew Brost
2024-03-05 19:14 ` Rodrigo Vivi [this message]
2024-03-05 13:12 ` [PATCH 3/4] drm/xe: Do not perform GuC TLB invalidation for display GGTT Maarten Lankhorst
2024-03-05 14:46 ` Rodrigo Vivi
2024-03-05 17:09 ` Matthew Brost
2024-03-05 13:12 ` [PATCH 4/4] drm/xe: Move xe_ggtt_invalidate out from ggtt->lock Maarten Lankhorst
2024-03-05 17:05 ` Matthew Brost
2024-03-05 13:17 ` ✓ CI.Patch_applied: success for drm/xe: Reduce GGTT display pinning latency Patchwork
2024-03-05 13:18 ` ✓ CI.checkpatch: " Patchwork
2024-03-05 13:18 ` ✓ CI.KUnit: " Patchwork
2024-03-05 13:29 ` ✓ CI.Build: " Patchwork
2024-03-05 13:29 ` ✓ CI.Hooks: " Patchwork
2024-03-05 13:31 ` ✓ CI.checksparse: " Patchwork
2024-03-05 13:56 ` ✓ CI.BAT: " 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=ZedvFU3GZCTQCsQd@intel.com \
--to=rodrigo.vivi@intel.com \
--cc=intel-xe@lists.freedesktop.org \
--cc=lucas.demarchi@intel.com \
--cc=maarten.lankhorst@linux.intel.com \
--cc=matthew.brost@intel.com \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).