From: Daniel Vetter <daniel@ffwll.ch>
To: Chris Wilson <chris@chris-wilson.co.uk>
Cc: intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH] Fix for the i915_vma_unbind() fix.
Date: Fri, 23 Aug 2013 14:51:29 +0200 [thread overview]
Message-ID: <20130823125129.GS26909@phenom.ffwll.local> (raw)
In-Reply-To: <1377248836-2949-1-git-send-email-chris@chris-wilson.co.uk>
On Fri, Aug 23, 2013 at 10:07:16AM +0100, Chris Wilson wrote:
> We need to move the bogus warn out of the way and only do the
> vma->vma_link decoupling before destroying the node.
>
> Fixes gem_evict_everything, gem_evict_alignment
>
> Squash in with Daniel's fixup to the fix -- I expect that he has already
> done so...
>
> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Hm, I don't see the functional difference to the resend patch I've posted
last night... still mail woes?
And QA reported that this approach is still not good enough to make :(
Since I don't want to jeopardize other feature work I'll take out the vma
execbuf patch now so that I can cut a new -testing. We can resume the
head-banging next week ;-)
-Daniel
> ---
> drivers/gpu/drm/i915/i915_gem.c | 8 +++++---
> 1 file changed, 5 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c
> index 5788e9d..744f9a6 100644
> --- a/drivers/gpu/drm/i915/i915_gem.c
> +++ b/drivers/gpu/drm/i915/i915_gem.c
> @@ -2725,6 +2725,9 @@ int i915_vma_unbind(struct i915_vma *vma)
> if (list_empty(&vma->vma_link))
> return 0;
>
> + /* NB: Until we have real VMAs there will only ever be one */
> + WARN_ON(!list_is_singular(&obj->vma_list));
> +
> if (!drm_mm_node_allocated(&vma->node))
> goto destroy;
>
> @@ -2771,8 +2774,7 @@ destroy:
>
> /* Since the unbound list is global, only move to that list if
> * no more VMAs exist.
> - * NB: Until we have real VMAs there will only ever be one */
> - WARN_ON(!list_empty(&obj->vma_list));
> + */
> if (list_empty(&obj->vma_list))
> list_move_tail(&obj->global_list, &dev_priv->mm.unbound_list);
>
> @@ -4279,12 +4281,12 @@ i915_gem_obj_lookup_or_create_vma(struct drm_i915_gem_object *obj,
> void i915_gem_vma_destroy(struct i915_vma *vma)
> {
> WARN_ON(vma->node.allocated);
> - list_del(&vma->vma_link);
>
> /* Keep the vma as a placeholder in the execbuffer reservation lists */
> if (!list_empty(&vma->exec_list))
> return;
>
> + list_del(&vma->vma_link);
> kfree(vma);
> }
>
> --
> 1.8.4.rc3
>
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/intel-gfx
--
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch
prev parent reply other threads:[~2013-08-23 12:51 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-08-23 9:07 [PATCH] Fix for the i915_vma_unbind() fix Chris Wilson
2013-08-23 12:51 ` Daniel Vetter [this message]
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=20130823125129.GS26909@phenom.ffwll.local \
--to=daniel@ffwll.ch \
--cc=chris@chris-wilson.co.uk \
--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