• Chris Wilson's avatar
    drm: Wrap direct calls to driver->gem_free_object from CMA · afe705be
    Chris Wilson authored
    Since the introduction of (struct_mutex) lockless GEM bo freeing, there
    are a pair of driver vfuncs for freeing the GEM bo, of which the driver
    may choose to only implement driver->gem_object_free_unlocked (and so
    avoid taking the struct_mutex along the free path). However, the CMA GEM
    helpers were still calling driver->gem_free_object directly, now NULL,
    and promptly dying on the fancy new lockless drivers. Oops.
    
    Robert Foss bisected this to b82caafc (drm/vc4: Use lockless gem BO
    free callback) on his vc4 device, but that just serves as an enabler for
    9f0ba539
    
     (drm/gem: support BO freeing without dev->struct_mutex).
    Reported-by: default avatarRobert Foss <robert.foss@collabora.com>
    Fixes: 9f0ba539
    
     (drm/gem: support BO freeing without dev->struct_mutex)
    Signed-off-by: default avatarChris Wilson <chris@chris-wilson.co.uk>
    Cc: Robert Foss <robert.foss@collabora.com>
    Cc: Daniel Vetter <daniel.vetter@intel.com>
    Cc: Eric Anholt <eric@anholt.net>
    Cc: Alex Deucher ...
    afe705be
drm_gem_cma_helper.c 15.2 KB