All of lore.kernel.org
 help / color / mirror / Atom feed
From: Tvrtko Ursulin <tvrtko.ursulin@linux.intel.com>
To: "Sripada, Radhakrishna" <radhakrishna.sripada@intel.com>,
	"Hajda, Andrzej" <andrzej.hajda@intel.com>,
	"intel-gfx@lists.freedesktop.org"
	<intel-gfx@lists.freedesktop.org>
Cc: Chris Wilson <chris.p.wilson@linux.intel.com>
Subject: Re: [Intel-gfx] [PATCH] drm/i915/mtl: Increase guard pages when vt-d is enabled
Date: Fri, 3 Nov 2023 08:30:28 +0000	[thread overview]
Message-ID: <aee78f9c-1ca4-48ed-aa18-da03a50ebb14@linux.intel.com> (raw)
In-Reply-To: <DM4PR11MB59717CE2FEF0F4DA5380992187A6A@DM4PR11MB5971.namprd11.prod.outlook.com>


On 02/11/2023 22:14, Sripada, Radhakrishna wrote:
> Hi Tvrtko,
> 
>> -----Original Message-----
>> From: Tvrtko Ursulin <tvrtko.ursulin@linux.intel.com>
>> Sent: Thursday, November 2, 2023 10:41 AM
>> To: Hajda, Andrzej <andrzej.hajda@intel.com>; Sripada, Radhakrishna
>> <radhakrishna.sripada@intel.com>; intel-gfx@lists.freedesktop.org
>> Cc: Chris Wilson <chris.p.wilson@linux.intel.com>
>> Subject: Re: [Intel-gfx] [PATCH] drm/i915/mtl: Increase guard pages when vt-d is
>> enabled
>>
>>
>> On 02/11/2023 16:58, Andrzej Hajda wrote:
>>> On 02.11.2023 17:06, Radhakrishna Sripada wrote:
>>>> 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@intel.com>
>>>> Cc: Chris Wilson <chris.p.wilson@linux.intel.com>
>>>> Signed-off-by: Radhakrishna Sripada <radhakrishna.sripada@intel.com>
>>>> ---
>>>>    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;
>>>> +        if (IS_METEORLAKE(i915))
>>>> +            guard *= 200;
>>>> +
>>>
>>> 200 * VTD_GUARD = 200 * 168 * 4K = 131MB
>>>
>>> Looks insanely high, 131MB for padding, if this is before and after it
>>> becomes even 262MB of wasted address per plane. Just signalling, I do
>>> not know if this actually hurts.
>>
>> Yeah this feels crazy. There must be some other explanation which is
>> getting hidden by the crazy amount of padding so I'd rather we figured
>> it out.
>>
>> With 262MiB per fb how many fit in GGTT before eviction hits? N screens
>> with double/triple buffering?
> 
> I believe with this method we will have to limit the no of frame buffers in the system. One alternative
> that worked is to do a proper clear range for the ggtt instead of doing a nop. Although it adds marginal
> time during suspend/resume/boot it does not add restrictions to the no of fb's that can be used.

And if we remember the guard pages replaced clearing to scratch, to 
improve suspend resume times, exactly for improving user experience. :(

Luckily there is time to fix this properly on MTL one way or the other. 
Is it just kms_cursor_legacy --run-subtest single-bo that is affected?

Regards,

Tvrtko


>>
>> Regards,
>>
>> Tvrtko
>>
>> P.S. Where did the 185 from the commit message come from?
> 185 came from experiment to increase the guard size. It is not a standard number.
> 
> Regards,
> Radhakrishna(RK) Sripada

  reply	other threads:[~2023-11-03  8:30 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-11-02 16:06 [Intel-gfx] [PATCH] drm/i915/mtl: Increase guard pages when vt-d is enabled Radhakrishna Sripada
2023-11-02 16:35 ` Gustavo Sousa
2023-11-02 18:01   ` Gustavo Sousa
2023-11-03 15:35   ` Rodrigo Vivi
2023-11-03 17:38     ` Sripada, Radhakrishna
2023-11-02 16:58 ` Andrzej Hajda
2023-11-02 17:41   ` Tvrtko Ursulin
2023-11-02 22:14     ` Sripada, Radhakrishna
2023-11-03  8:30       ` Tvrtko Ursulin [this message]
2023-11-03 15:53         ` Sripada, Radhakrishna
2023-11-03 21:18           ` Andrzej Hajda
2023-11-03 22:23             ` Sripada, Radhakrishna
2023-11-03  1:13 ` [Intel-gfx] ✓ Fi.CI.BAT: success for " Patchwork
2023-11-03 17:43 ` [Intel-gfx] ✗ Fi.CI.IGT: failure " 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=aee78f9c-1ca4-48ed-aa18-da03a50ebb14@linux.intel.com \
    --to=tvrtko.ursulin@linux.intel.com \
    --cc=andrzej.hajda@intel.com \
    --cc=chris.p.wilson@linux.intel.com \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=radhakrishna.sripada@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.