]> git.karo-electronics.de Git - karo-tx-linux.git/commit
drm/i915: Remove node only when allocated
authorBen Widawsky <benjamin.widawsky@intel.com>
Wed, 14 Aug 2013 01:09:06 +0000 (18:09 -0700)
committerDaniel Vetter <daniel.vetter@ffwll.ch>
Thu, 15 Aug 2013 13:40:28 +0000 (15:40 +0200)
commitac9def975455e25c9da396ffbc954e1d4018ed29
tree3618fbe4a36526d60ab63f11f9a8ee38873f261f
parentca0bd2d33cc26081c4d026fc3f7303573e76652c
drm/i915: Remove node only when allocated

VMAs can be created and not bound. One may think of it as lazy cleanup,
and safely gloss over the conditions which manufacture it. In either
case, when the object backing the i915 vma is destroyed, we must cleanup
the vma without stumbling into a bunch of pitfalls that assume the vma
is bound.

NOTE: I was pretty certain the above condition could only happen when we
introduced the use of VMAs being looked up at execbuf, and already
existing. Paulo has hit this though, so I must be missing something. As
I believe the patch is correct anyway, therefore I won't scratch my head
too hard.

v2: use goto destroy as a compromise (Chris)

Cc: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Paulo Zanoni <paulo.r.zanoni@intel.com>
Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
drivers/gpu/drm/i915/i915_gem.c