]> git.baikalelectronics.ru Git - kernel.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)
commit299d5bddaa2540f41aea79a4e04aeea51f8e0107
treeca19a79bd5ff53a101d04e15d4cf9830f2686804
parent6a0d9a370c9ca9c0ebb217303d516bd6ece81bd7
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