diff mbox series

drm/i915: Invalidate the TLBs on each GT

Message ID 20231002140742.933530-1-jonathan.cavitt@intel.com (mailing list archive)
State New, archived
Headers show
Series drm/i915: Invalidate the TLBs on each GT | expand

Commit Message

Cavitt, Jonathan Oct. 2, 2023, 2:07 p.m. UTC
From: Chris Wilson <chris.p.wilson@intel.com>

With multi-GT devices, the object may have been bound on each GT and so
we need to invalidate the TLBs across all GT before releasing the pages
back to the system.

Fixes: d6c531ab4820 ("drm/i915: Invalidate the TLBs on each GT")
Signed-off-by: Chris Wilson <chris.p.wilson@intel.com>
Signed-off-by: Jonathan Cavitt <jonathan.cavitt@intel.com>
CC: Matt Roper <matthew.d.roper@intel.com>
CC: Andi Shyti <andi.shyti@linux.intel.com>
Reviewed-by: Andi Shyti <andi.shyti@linux.intel.com>
---
 drivers/gpu/drm/i915/gem/i915_gem_pages.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Nirmoy Das Oct. 2, 2023, 2:42 p.m. UTC | #1
+dri-devel

On 10/2/2023 4:07 PM, Jonathan Cavitt wrote:
> From: Chris Wilson <chris.p.wilson@intel.com>
>
> With multi-GT devices, the object may have been bound on each GT and so
> we need to invalidate the TLBs across all GT before releasing the pages
> back to the system.
>
> Fixes: d6c531ab4820 ("drm/i915: Invalidate the TLBs on each GT")
> Signed-off-by: Chris Wilson <chris.p.wilson@intel.com>
> Signed-off-by: Jonathan Cavitt <jonathan.cavitt@intel.com>
> CC: Matt Roper <matthew.d.roper@intel.com>
> CC: Andi Shyti <andi.shyti@linux.intel.com>
> Reviewed-by: Andi Shyti <andi.shyti@linux.intel.com>

Reviewed-by: Nirmoy Das <nirmoy.das@intel.com>

Can't find it in dri-devel but if you didn't then Cc to 
dri-devel@lists.freedesktop.org for change that touches gt/gem files.


Regards,

Nirmoy

> ---
>   drivers/gpu/drm/i915/gem/i915_gem_pages.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/i915/gem/i915_gem_pages.c b/drivers/gpu/drm/i915/gem/i915_gem_pages.c
> index 6b6d22c194110..0ba955611dfb5 100644
> --- a/drivers/gpu/drm/i915/gem/i915_gem_pages.c
> +++ b/drivers/gpu/drm/i915/gem/i915_gem_pages.c
> @@ -198,7 +198,7 @@ static void flush_tlb_invalidate(struct drm_i915_gem_object *obj)
>   
>   	for_each_gt(gt, i915, id) {
>   		if (!obj->mm.tlb[id])
> -			return;
> +			continue;
>   
>   		intel_gt_invalidate_tlb_full(gt, obj->mm.tlb[id]);
>   		obj->mm.tlb[id] = 0;
Andi Shyti Oct. 3, 2023, 9:26 a.m. UTC | #2
Hi,

> Possible regressions
> 
>   • igt@kms_flip@flip-vs-suspend-interruptible@a-hdmi-a3:
>       □ shard-dg2: PASS -> INCOMPLETE

I believe this is not caused by this patch. I'm going to push it.

Andi
Andi Shyti Oct. 3, 2023, 5:17 p.m. UTC | #3
Hi Jonathan and Chris,

On Mon, Oct 02, 2023 at 07:07:42AM -0700, Jonathan Cavitt wrote:
> From: Chris Wilson <chris.p.wilson@intel.com>
> 
> With multi-GT devices, the object may have been bound on each GT and so
> we need to invalidate the TLBs across all GT before releasing the pages
> back to the system.
> 
> Fixes: d6c531ab4820 ("drm/i915: Invalidate the TLBs on each GT")
> Signed-off-by: Chris Wilson <chris.p.wilson@intel.com>
> Signed-off-by: Jonathan Cavitt <jonathan.cavitt@intel.com>
> CC: Matt Roper <matthew.d.roper@intel.com>
> CC: Andi Shyti <andi.shyti@linux.intel.com>
> Reviewed-by: Andi Shyti <andi.shyti@linux.intel.com>

pushed to drm-intel-gt-next.

Thank you,
Andi
diff mbox series

Patch

diff --git a/drivers/gpu/drm/i915/gem/i915_gem_pages.c b/drivers/gpu/drm/i915/gem/i915_gem_pages.c
index 6b6d22c194110..0ba955611dfb5 100644
--- a/drivers/gpu/drm/i915/gem/i915_gem_pages.c
+++ b/drivers/gpu/drm/i915/gem/i915_gem_pages.c
@@ -198,7 +198,7 @@  static void flush_tlb_invalidate(struct drm_i915_gem_object *obj)
 
 	for_each_gt(gt, i915, id) {
 		if (!obj->mm.tlb[id])
-			return;
+			continue;
 
 		intel_gt_invalidate_tlb_full(gt, obj->mm.tlb[id]);
 		obj->mm.tlb[id] = 0;