Skip to content
  • David Herrmann's avatar
    drm/mm: remove unused API · c700c67b
    David Herrmann authored
    
    
    We used to pre-allocate drm_mm nodes and save them in a linked list for
    later usage so we always have spare ones in atomic contexts. However, this
    is really racy if multiple threads are in an atomic context at the same
    time and we don't have enough spare nodes. Moreover, all remaining users
    run in user-context and just lock drm_mm with a spinlock. So we can easily
    preallocate the node, take the spinlock and insert the node.
    
    This may have worked well with BKL in place, however, with today's
    infrastructure it really doesn't make any sense. Besides, most users can
    easily embed drm_mm_node into their objects so no allocation is needed at
    all.
    
    Thus, remove the old pre-alloc API and all the helpers that it provides.
    Drivers have already been converted and we should not use the old API for
    new code, anymore.
    
    Signed-off-by: default avatarDavid Herrmann <dh.herrmann@gmail.com>
    Acked-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
    Signed-off-by: default avatarDave Airlie <airlied@redhat.com>
    c700c67b