From: Daniel Vetter <daniel@ffwll.ch>
To: Chris Wilson <chris@chris-wilson.co.uk>,
Daniel Vetter <daniel.vetter@ffwll.ch>,
Intel Graphics Development <intel-gfx@lists.freedesktop.org>,
Daniel Vetter <daniel.vetter@intel.com>
Subject: Re: [PATCH 1/2] drm/i915: Clean up pinned bo capture
Date: Wed, 3 Dec 2014 15:16:09 +0100 [thread overview]
Message-ID: <20141203141609.GC32117@phenom.ffwll.local> (raw)
In-Reply-To: <20141202164638.GH18921@nuc-i3427.alporthouse.com>
On Tue, Dec 02, 2014 at 04:46:38PM +0000, Chris Wilson wrote:
> On Tue, Dec 02, 2014 at 04:19:43PM +0100, Daniel Vetter wrote:
> > /* Generate a semi-unique error code. The code is not meant to have meaning, The
> > @@ -1085,7 +1083,6 @@ static void i915_gem_capture_vm(struct drm_i915_private *dev_priv,
> > const int ndx)
> > {
> > struct drm_i915_error_buffer *active_bo = NULL, *pinned_bo = NULL;
> > - struct drm_i915_gem_object *obj;
> > struct i915_vma *vma;
> > int i;
> >
> > @@ -1094,12 +1091,12 @@ static void i915_gem_capture_vm(struct drm_i915_private *dev_priv,
> > i++;
> > error->active_bo_count[ndx] = i;
> >
> > - list_for_each_entry(obj, &dev_priv->mm.bound_list, global_list) {
> > - list_for_each_entry(vma, &obj->vma_list, vma_link)
> > - if (vma->vm == vm && vma->pin_count > 0) {
> > - i++;
> > + if (i915_is_ggtt(vm)) {
> > + list_for_each_entry(vma, &vm->inactive_list, mm_list) {
> > + if (vma->pin_count == 0)
> > break;
> > - }
> > + i++;
> > + }
> > }
> > error->pinned_bo_count[ndx] = i - error->active_bo_count[ndx];
> >
> > @@ -1119,7 +1116,7 @@ static void i915_gem_capture_vm(struct drm_i915_private *dev_priv,
> > error->pinned_bo_count[ndx] =
> > capture_pinned_bo(pinned_bo,
> > error->pinned_bo_count[ndx],
> > - &dev_priv->mm.bound_list, vm);
> > + &vm->inactive_list);
>
> I much prefer this to be an iteraction over the bound_list and check if
> the object has a ggtt bound vma. Combined with the request to only print
> out the pinned bo in the GGTT, it becomes much clearer and doesn't need
> to result in the confusing "active + pinned for GGTT".
We do still want to dump active objects for the GGTT, e.g. shadow batch
(well we probably should add the GGTT vm to the dumper ...) and definitely
when full ppgtt isn't enabled (i.e. everything).
And if we dump the active list then I think we should scan only the
inactive list for pinned bo to avoid duplicate listing.
-Daniel
--
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - 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:[~2014-12-03 14:15 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-12-02 15:19 [PATCH 1/2] drm/i915: Clean up pinned bo capture Daniel Vetter
2014-12-02 15:19 ` [PATCH 2/2] drm/i915: Don't capture pinned bo separately Daniel Vetter
2014-12-03 1:34 ` shuang.he
2014-12-02 16:46 ` [PATCH 1/2] drm/i915: Clean up pinned bo capture Chris Wilson
2014-12-03 14:16 ` Daniel Vetter [this message]
2014-12-04 9:11 ` Chris Wilson
2014-12-04 10:47 ` Daniel Vetter
-- strict thread matches above, loose matches on Subject: below --
2014-12-02 9:56 Daniel Vetter
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=20141203141609.GC32117@phenom.ffwll.local \
--to=daniel@ffwll.ch \
--cc=chris@chris-wilson.co.uk \
--cc=daniel.vetter@ffwll.ch \
--cc=daniel.vetter@intel.com \
--cc=intel-gfx@lists.freedesktop.org \
/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