From: Daniel Vetter <daniel@ffwll.ch>
To: Tvrtko Ursulin <tvrtko.ursulin@linux.intel.com>
Cc: intel-gfx <intel-gfx@lists.freedesktop.org>
Subject: Re: [PATCH 1/5] drm/i915: Do not clear mappings beyond VMA size
Date: Mon, 4 May 2015 16:23:45 +0200 [thread overview]
Message-ID: <20150504142345.GJ30184@phenom.ffwll.local> (raw)
In-Reply-To: <553E31B3.6050101@linux.intel.com>
On Mon, Apr 27, 2015 at 01:55:15PM +0100, Tvrtko Ursulin wrote:
>
> On 04/24/2015 01:09 PM, Joonas Lahtinen wrote:
> >Do not to clear mappings outside the allocated VMA under any
> >circumstances. Only clear the smaller of VMA or object page count.
> >
> >This is required to allow creating partial object VMAs which in
> >turn are needed for partial GGTT views.
> >
> >Signed-off-by: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
> >---
> > drivers/gpu/drm/i915/i915_gem_gtt.c | 8 ++++++--
> > 1 file changed, 6 insertions(+), 2 deletions(-)
> >
> >diff --git a/drivers/gpu/drm/i915/i915_gem_gtt.c b/drivers/gpu/drm/i915/i915_gem_gtt.c
> >index 6fae6bd..ee9ff8e 100644
> >--- a/drivers/gpu/drm/i915/i915_gem_gtt.c
> >+++ b/drivers/gpu/drm/i915/i915_gem_gtt.c
> >@@ -1947,19 +1947,23 @@ static void ggtt_unbind_vma(struct i915_vma *vma)
> > struct drm_device *dev = vma->vm->dev;
> > struct drm_i915_private *dev_priv = dev->dev_private;
> > struct drm_i915_gem_object *obj = vma->obj;
> >+ const uint64_t size = min_t(uint64_t,
> >+ obj->base.size,
> >+ vma->node.size);
> >
> > if (vma->bound & GLOBAL_BIND) {
> > vma->vm->clear_range(vma->vm,
> > vma->node.start,
> >- obj->base.size,
> >+ size,
> > true);
> > }
> >
> > if (dev_priv->mm.aliasing_ppgtt && vma->bound & LOCAL_BIND) {
> > struct i915_hw_ppgtt *appgtt = dev_priv->mm.aliasing_ppgtt;
> >+
> > appgtt->base.clear_range(&appgtt->base,
> > vma->node.start,
> >- obj->base.size,
> >+ size,
> > true);
> > }
> > }
> >
>
> Looks good to me,
>
> Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Queued for -next, thanks for the patch.
-Daniel
--
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
next prev parent reply other threads:[~2015-05-04 14:21 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <cover.1429876733.git.joonas.lahtinen@linux.intel.com>
2015-04-24 12:09 ` [PATCH 1/5] drm/i915: Do not clear mappings beyond VMA size Joonas Lahtinen
2015-04-27 12:55 ` Tvrtko Ursulin
2015-05-04 14:23 ` Daniel Vetter [this message]
2015-04-24 12:09 ` [PATCH 2/5] drm/i915: Do not make assumptions on GGTT VMA sizes Joonas Lahtinen
2015-04-27 13:55 ` Tvrtko Ursulin
2015-04-28 7:23 ` Joonas Lahtinen
2015-04-24 12:09 ` [PATCH 3/5] drm/i915: Consider object pinned if any VMA is pinned Joonas Lahtinen
2015-04-24 12:29 ` Chris Wilson
2015-04-27 12:18 ` Joonas Lahtinen
2015-04-24 12:09 ` [PATCH 4/5] drm/i915: Add a partial GGTT view type Joonas Lahtinen
2015-04-27 14:50 ` Tvrtko Ursulin
2015-04-28 8:38 ` Tvrtko Ursulin
2015-04-30 11:02 ` Joonas Lahtinen
2015-04-24 12:10 ` [PATCH 5/5] drm/i915: Use partial view in mmap fault handler Joonas Lahtinen
2015-04-24 12:33 ` Chris Wilson
2015-04-27 11:01 ` Joonas Lahtinen
2015-04-27 11:21 ` Chris Wilson
2015-04-27 12:12 ` Joonas Lahtinen
2015-04-27 12:25 ` Chris Wilson
2015-04-27 13:46 ` Joonas Lahtinen
2015-04-27 14:52 ` Chris Wilson
2015-04-24 15:28 ` shuang.he
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=20150504142345.GJ30184@phenom.ffwll.local \
--to=daniel@ffwll.ch \
--cc=intel-gfx@lists.freedesktop.org \
--cc=tvrtko.ursulin@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