All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Das, Nirmoy" <nirmoy.das@linux.intel.com>
To: Matt Roper <matthew.d.roper@intel.com>, intel-xe@lists.freedesktop.org
Subject: Re: [Intel-xe] [PATCH v2 25/30] drm/xe: Invalidate TLB on all affected GTs during GGTT updates
Date: Mon, 22 May 2023 11:02:01 +0200	[thread overview]
Message-ID: <64820c6a-eb0f-333d-984b-c460170fa5e8@linux.intel.com> (raw)
In-Reply-To: <20230519231827.3572452-26-matthew.d.roper@intel.com>


On 5/20/2023 1:18 AM, Matt Roper wrote:
> The GGTT is part of the tile and is shared by the primary and media GTs
> on platforms with a standalone media architecture.  However each of
> these GTs has its own TLBs caching the page table lookups, and each
> needs to be invalidated separately.
>
> Signed-off-by: Matt Roper <matthew.d.roper@intel.com>
Reviewed-by: Nirmoy Das <nirmoy.das@intel.com>
> ---
>   drivers/gpu/drm/xe/xe_ggtt.c | 16 ++++++++++------
>   1 file changed, 10 insertions(+), 6 deletions(-)
>
> diff --git a/drivers/gpu/drm/xe/xe_ggtt.c b/drivers/gpu/drm/xe/xe_ggtt.c
> index 7c87623ef5c5..31f958613c2f 100644
> --- a/drivers/gpu/drm/xe/xe_ggtt.c
> +++ b/drivers/gpu/drm/xe/xe_ggtt.c
> @@ -188,13 +188,10 @@ int xe_ggtt_init(struct xe_ggtt *ggtt)
>   #define PVC_GUC_TLB_INV_DESC1			XE_REG(0xcf80)
>   #define   PVC_GUC_TLB_INV_DESC1_INVALIDATE	REG_BIT(6)
>   
> -void xe_ggtt_invalidate(struct xe_ggtt *ggtt)
> +static void ggtt_invalidate_gt_tlb(struct xe_gt *gt)
>   {
> -	/*
> -	 * TODO: Loop over each GT in tile once media GT support is
> -	 * re-added
> -	 */
> -	struct xe_gt *gt = ggtt->tile->primary_gt;
> +	if (!gt)
> +		return;
>   
>   	/* TODO: vfunc for GuC vs. non-GuC */
>   
> @@ -219,6 +216,13 @@ void xe_ggtt_invalidate(struct xe_ggtt *ggtt)
>   	}
>   }
>   
> +void xe_ggtt_invalidate(struct xe_ggtt *ggtt)
> +{
> +	/* Each GT in a tile has its own TLB to cache GGTT lookups */
> +	ggtt_invalidate_gt_tlb(ggtt->tile->primary_gt);
> +	ggtt_invalidate_gt_tlb(ggtt->tile->media_gt);
> +}
> +
>   void xe_ggtt_printk(struct xe_ggtt *ggtt, const char *prefix)
>   {
>   	u64 addr, scratch_pte;

  reply	other threads:[~2023-05-22  9:02 UTC|newest]

Thread overview: 54+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-05-19 23:17 [Intel-xe] [PATCH v2 00/30] Separate GT and tile Matt Roper
2023-05-19 23:17 ` [Intel-xe] [PATCH v2 01/30] drm/xe/mtl: Disable media GT Matt Roper
2023-05-20  5:50   ` Lucas De Marchi
2023-05-19 23:17 ` [Intel-xe] [PATCH v2 02/30] drm/xe: Introduce xe_tile Matt Roper
2023-05-19 23:18 ` [Intel-xe] [PATCH v2 03/30] drm/xe: Add backpointer from gt to tile Matt Roper
2023-05-19 23:18 ` [Intel-xe] [PATCH v2 04/30] drm/xe: Add for_each_tile iterator Matt Roper
2023-05-19 23:18 ` [Intel-xe] [PATCH v2 05/30] drm/xe: Move register MMIO into xe_tile Matt Roper
2023-05-19 23:18 ` [Intel-xe] [PATCH v2 06/30] fixup! drm/xe/display: Implement display support Matt Roper
2023-05-20  5:52   ` Lucas De Marchi
2023-05-19 23:18 ` [Intel-xe] [PATCH v2 07/30] drm/xe: Move GGTT from GT to tile Matt Roper
2023-05-25 23:29   ` Lucas De Marchi
2023-05-19 23:18 ` [Intel-xe] [PATCH v2 08/30] fixup! drm/xe/display: Implement display support Matt Roper
2023-05-25 23:30   ` Lucas De Marchi
2023-05-19 23:18 ` [Intel-xe] [PATCH v2 09/30] drm/xe: Move VRAM from GT to tile Matt Roper
2023-05-26 21:11   ` Lucas De Marchi
2023-05-19 23:18 ` [Intel-xe] [PATCH v2 10/30] fixup! drm/xe/display: Implement display support Matt Roper
2023-05-26 21:12   ` Lucas De Marchi
2023-05-19 23:18 ` [Intel-xe] [PATCH v2 11/30] drm/xe: Memory allocations are tile-based, not GT-based Matt Roper
2023-05-19 23:18 ` [Intel-xe] [PATCH v2 12/30] fixup! drm/xe/display: Implement display support Matt Roper
2023-05-26 21:14   ` Lucas De Marchi
2023-05-19 23:18 ` [Intel-xe] [PATCH v2 13/30] drm/xe: Move migration from GT to tile Matt Roper
2023-05-19 23:18 ` [Intel-xe] [PATCH v2 14/30] drm/xe: Clarify 'gt' retrieval for primary tile Matt Roper
2023-05-22 11:47   ` Das, Nirmoy
2023-05-26 21:33   ` Lucas De Marchi
2023-05-19 23:18 ` [Intel-xe] [PATCH v2 15/30] drm/xe: Drop vram_id Matt Roper
2023-05-19 23:18 ` [Intel-xe] [PATCH v2 16/30] drm/xe: Drop extra_gts[] declarations and XE_GT_TYPE_REMOTE Matt Roper
2023-05-19 23:18 ` [Intel-xe] [PATCH v2 17/30] drm/xe: Allocate GT dynamically Matt Roper
2023-05-19 23:18 ` [Intel-xe] [PATCH v2 18/30] drm/xe: Add media GT to tile Matt Roper
2023-05-19 23:18 ` [Intel-xe] [PATCH v2 19/30] drm/xe: Move display IRQ postinstall out of GT function Matt Roper
2023-05-19 23:18 ` [Intel-xe] [PATCH v2 20/30] drm/xe: Interrupts are delivered per-tile, not per-GT Matt Roper
2023-05-26 22:16   ` Lucas De Marchi
2023-05-30  6:36   ` Iddamsetty, Aravind
2023-05-30 15:58     ` Matt Roper
2023-05-19 23:18 ` [Intel-xe] [PATCH v2 21/30] drm/xe/irq: Handle ASLE backlight interrupts at same time as display Matt Roper
2023-05-19 23:18 ` [Intel-xe] [PATCH v2 22/30] drm/xe/irq: Ensure primary GuC won't clobber media GuC's interrupt mask Matt Roper
2023-05-19 23:18 ` [Intel-xe] [PATCH v2 23/30] drm/xe/irq: Untangle postinstall functions Matt Roper
2023-05-19 23:18 ` [Intel-xe] [PATCH v2 24/30] drm/xe: Replace xe_gt_irq_postinstall with xe_irq_enable_hwe Matt Roper
2023-05-26 22:20   ` Lucas De Marchi
2023-05-19 23:18 ` [Intel-xe] [PATCH v2 25/30] drm/xe: Invalidate TLB on all affected GTs during GGTT updates Matt Roper
2023-05-22  9:02   ` Das, Nirmoy [this message]
2023-05-19 23:18 ` [Intel-xe] [PATCH v2 26/30] drm/xe/tlb: Obtain forcewake when doing GGTT TLB invalidations Matt Roper
2023-05-22 11:47   ` Das, Nirmoy
2023-05-19 23:18 ` [Intel-xe] [PATCH v2 27/30] drm/xe: Allow GT looping and lookup on standalone media Matt Roper
2023-05-26 22:37   ` Lucas De Marchi
2023-05-30 16:41     ` Matt Roper
2023-05-19 23:18 ` [Intel-xe] [PATCH v2 28/30] drm/xe: Update query uapi to support " Matt Roper
2023-05-19 23:18 ` [Intel-xe] [PATCH v2 29/30] drm/xe: Reinstate media GT support Matt Roper
2023-05-26 22:46   ` Lucas De Marchi
2023-05-19 23:18 ` [Intel-xe] [PATCH v2 30/30] drm/xe: Add kerneldoc description of multi-tile devices Matt Roper
2023-05-26 22:52   ` Lucas De Marchi
2023-05-27  0:22     ` Matt Roper
2023-05-19 23:23 ` [Intel-xe] ✓ CI.Patch_applied: success for Separate GT and tile (rev3) Patchwork
2023-05-19 23:26 ` [Intel-xe] ✓ CI.KUnit: " Patchwork
2023-05-19 23:29 ` [Intel-xe] ✓ CI.Build: " 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=64820c6a-eb0f-333d-984b-c460170fa5e8@linux.intel.com \
    --to=nirmoy.das@linux.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.