• Thomas Hellstrom's avatar
    drm/ttm: Optimize delayed buffer destruction · e1efc9b6
    Thomas Hellstrom authored
    This commit replaces the ttm_bo_cleanup_ref function with two new functions.
    One for the case where the bo is not yet on the delayed destroy list, and
    one for the case where the bo was on the delayed destroy list, at least at
    the time of call. This makes it possible to optimize the two cases somewhat.
    
    It also enables the possibility to directly destroy buffers on the
    delayed delete list when they are about to be evicted or swapped out.
    Currently they were only evicted / swapped and destruction was left for the
    delayed buffer destruction thread.
    Signed-off-by: default avatarThomas Hellstrom <thellstrom@vmware.com>
    Signed-off-by: default avatarDave Airlie <airlied@redhat.com>
    e1efc9b6
ttm_bo.c 45.4 KB