]> git.karo-electronics.de Git - karo-tx-linux.git/commit
drm/i915: inline vma_create into lookup_or_create_vma
authorDaniel Vetter <daniel.vetter@ffwll.ch>
Wed, 14 Aug 2013 12:14:04 +0000 (14:14 +0200)
committerDaniel Vetter <daniel.vetter@ffwll.ch>
Tue, 20 Aug 2013 12:20:51 +0000 (14:20 +0200)
commitda7fa2a47598ca24c3fec7426c6257dea8c733e0
tree026f11522ff70a4605d99a544b676ae833b1c571
parentfd1308256de17104ee6251f714eeaf6dd2b6902c
drm/i915: inline vma_create into lookup_or_create_vma

In the execbuf code we don't clean up any vmas which ended up not
getting bound for code simplicity. To make sure that we don't end up
creating multiple vma for the same vm kill the somewhat dangerous
vma_create function and inline it into lookup_or_create.

This is just a safety measure to prevent surprises in the future.

Also update the somewhat confused comment in the execbuf code and
clarify what kind of magic is going on with a new one.

v2: Keep the function separate as requested by Chris. But give it a __
prefix for paranoia and move it tighter together with the other vma
stuff.

Cc: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Ben Widawsky <ben@bwidawsk.net>
Acked-by: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
drivers/gpu/drm/i915/i915_drv.h
drivers/gpu/drm/i915/i915_gem.c
drivers/gpu/drm/i915/i915_gem_execbuffer.c
drivers/gpu/drm/i915/i915_gem_stolen.c