• Daniel Vetter's avatar
    drm/gem: switch dev->object_name_lock to a mutex · cd4f013f
    Daniel Vetter authored
    I want to wrap the creation of a dma-buf from a gem object in it,
    so that the obj->export_dma_buf cache can be atomically filled in.
    
    Instead of creating a new mutex just for that variable I've figured
    I can reuse the existing dev->object_name_lock, especially since
    the new semantics will exactly mirror the flink obj->name already
    protected by that lock.
    
    v2: idr_preload/idr_preload_end is now an atomic section, so need to
    move the mutex locking outside.
    
    [airlied: fix up conflict with patch to make debugfs use lock]
    Signed-off-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
    Signed-off-by: default avatarDave Airlie <airlied@redhat.com>
    cd4f013f
drmP.h 54.1 KB