Hi Rodrigo, > -----Original Message----- > From: Vivi, Rodrigo <rodrigo.vivi@xxxxxxxxx> > Sent: Friday, November 3, 2023 8:35 AM > To: Sousa, Gustavo <gustavo.sousa@xxxxxxxxx> > Cc: Sripada, Radhakrishna <radhakrishna.sripada@xxxxxxxxx>; intel- > gfx@xxxxxxxxxxxxxxxxxxxxx; Chris Wilson <chris.p.wilson@xxxxxxxxxxxxxxx> > Subject: Re: [PATCH] drm/i915/mtl: Increase guard pages when vt-d is > enabled > > On Thu, Nov 02, 2023 at 01:35:53PM -0300, Gustavo Sousa wrote: > > Quoting Radhakrishna Sripada (2023-11-02 13:06:44-03:00) > > >Experiments were conducted with different multipliers to VTD_GUARD macro > > >with multiplier of 185 we were observing occasional pipe faults when > > >running kms_cursor_legacy --run-subtest single-bo > > > > > >There could possibly be an underlying issue that is being investigated, for > > >now bump the guard pages for MTL. > > > > > >Closes: https://gitlab.freedesktop.org/drm/intel/-/issues/2017 > > >Cc: Gustavo Sousa <gustavo.sousa@xxxxxxxxx> > > >Cc: Chris Wilson <chris.p.wilson@xxxxxxxxxxxxxxx> > > >Signed-off-by: Radhakrishna Sripada <radhakrishna.sripada@xxxxxxxxx> > > >--- > > > drivers/gpu/drm/i915/gem/i915_gem_domain.c | 3 +++ > > > 1 file changed, 3 insertions(+) > > > > > >diff --git a/drivers/gpu/drm/i915/gem/i915_gem_domain.c > b/drivers/gpu/drm/i915/gem/i915_gem_domain.c > > >index 3770828f2eaf..b65f84c6bb3f 100644 > > >--- a/drivers/gpu/drm/i915/gem/i915_gem_domain.c > > >+++ b/drivers/gpu/drm/i915/gem/i915_gem_domain.c > > >@@ -456,6 +456,9 @@ i915_gem_object_pin_to_display_plane(struct > drm_i915_gem_object *obj, > > > if (intel_scanout_needs_vtd_wa(i915)) { > > > unsigned int guard = VTD_GUARD; > > > > > > > I remember trying increasing the guard, but with a much smaller multiplier. So > > it turns out that using a much higher value did the "trick". > > a much smaller multiplier could mess with the flags range? > it is really hard to understand what of that 'flags' is really those 12 flags > or what is this 'guard' and where that ends up... Based on my glance, if the multiplier fits in 32 bits then it should work. But the problem here pointed out by Tvrtko is that we are adding awful lot(262 mb per fb) of padding in the gurad pages clobbering up the ggtt address pace. Enough(10 to 20) fb's created we will fall into the realm of evictions. Regards, Radhakrishna(RK) Sripada > > > > > I would add a FIXME comment here to remind us that this is a hack. > > > > With the FIXME in place, > > > > Reviewed-by: Gustavo Sousa <gustavo.sousa@xxxxxxxxx> > > > > >+ if (IS_METEORLAKE(i915)) > > >+ guard *= 200; > > >+ > > > if (i915_gem_object_is_tiled(obj)) > > > guard = max(guard, > > > i915_gem_object_get_tile_row_size(obj)); > > >-- > > >2.34.1 > > >