• Daniel Vetter's avatar
    drm/i915: inline vma_create into lookup_or_create_vma · e656a6cb
    Daniel Vetter authored
    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: default avatarChris Wilson <chris@chris-wilson.co.uk>
    Signed-off-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
    e656a6cb
i915_drv.h 71.4 KB