]> 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>
Wed, 4 Sep 2013 15:34:41 +0000 (17:34 +0200)
commite656a6cba0febf12a9838882b891e1c5917c7a8b
treeca19a79bd5ff53a101d04e15d4cf9830f2686804
parent27173f1f95db5e74ceb35fe9a2f2f348ea11bac9
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