public inbox for intel-gfx@lists.freedesktop.org
 help / color / mirror / Atom feed
From: Andi Shyti <andi.shyti@linux.intel.com>
To: Andi Shyti <andi.shyti@linux.intel.com>
Cc: "Thomas Hellström" <thomas.hellstrom@linux.intel.com>,
	intel-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org,
	"Chris Wilson" <chris@chris-wilson.co.uk>,
	"Matthew Auld" <matthew.auld@intel.com>
Subject: Re: [Intel-gfx] [PATCH v2 2/4] drm/i915: Introduce guard pages to i915_vma
Date: Thu, 24 Nov 2022 10:20:26 +0100	[thread overview]
Message-ID: <Y383WsBu5csVpi+w@ashyti-mobl2.lan> (raw)
In-Reply-To: <Y35sXXLiAmwulDRU@ashyti-mobl2.lan>

> > > @@ -768,6 +768,9 @@ i915_vma_insert(struct i915_vma *vma, struct i915_gem_ww_ctx *ww,
> > >   	GEM_BUG_ON(!IS_ALIGNED(alignment, I915_GTT_MIN_ALIGNMENT));
> > >   	GEM_BUG_ON(!is_power_of_2(alignment));
> > > +	guard = vma->guard; /* retain guard across rebinds */
> > > +	guard = ALIGN(guard, alignment);
> > 
> > Why does guard area needs the same alignment as the requested mapping? What about the fact on 32-bit builds guard is 32-bit and alignment u64?
> 
> I guess this just to round up/down guard to something, not
> necessarily to that alignment.
> 
> Shall I remove it?

or we could just add a comment to explain that this is just to do
some rounding in order to avoid weird values of guard.

Andi

  reply	other threads:[~2022-11-24  9:20 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-11-22 18:57 [Intel-gfx] [PATCH v2 0/4] Add guard padding around i915_vma Andi Shyti
2022-11-22 18:57 ` [Intel-gfx] [PATCH v2 1/4] drm/i915: Wrap all access to i915_vma.node.start|size Andi Shyti
2022-11-23  9:46   ` Tvrtko Ursulin
2022-11-22 18:57 ` [Intel-gfx] [PATCH v2 2/4] drm/i915: Introduce guard pages to i915_vma Andi Shyti
2022-11-23 11:13   ` Tvrtko Ursulin
2022-11-23 18:54     ` Andi Shyti
2022-11-24  9:20       ` Andi Shyti [this message]
2022-11-24 12:01       ` Tvrtko Ursulin
2022-11-22 18:57 ` [Intel-gfx] [PATCH v2 3/4] drm/i915: Refine VT-d scanout workaround Andi Shyti
2022-11-22 18:57 ` [Intel-gfx] [PATCH v2 4/4] Revert "drm/i915: Improve on suspend / resume time with VT-d enabled" Andi Shyti
2022-11-22 21:19 ` [Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for add guard padding around i915_vma (rev2) Patchwork
2022-11-22 21:19 ` [Intel-gfx] ✗ Fi.CI.SPARSE: " Patchwork
2022-11-22 21:44 ` [Intel-gfx] ✓ Fi.CI.BAT: success " Patchwork
2022-11-23 12:23 ` [Intel-gfx] ✓ Fi.CI.IGT: " 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=Y383WsBu5csVpi+w@ashyti-mobl2.lan \
    --to=andi.shyti@linux.intel.com \
    --cc=chris@chris-wilson.co.uk \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=matthew.auld@intel.com \
    --cc=thomas.hellstrom@linux.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