• Daniel Vetter's avatar
    drm/i915: Fix error path leak in fbdev fb allocation · a8bb6818
    Daniel Vetter authored
    In Jesse's patch to switch the fbdev framebuffer from an embedded
    struct to a pointer the kfree in case of an error was missed. Fix this
    up by using our own internal fb allocation helper directly instead of
    reinventing that wheel.
    
    We need a to_intel_framebuffer cast unfortunately since all the other
    callers of _create still look better whith using a drm_framebuffer as
    return pointer.
    
    v2: Add an unlocked __intel_framebuffer_create function since our
    dev->struct_mutex locking is too much a mess. With ppgtt we even need
    it to take a look at the global gtt offset of pinned objects, since
    the vma list might chance from underneath us. At least with the
    current global gtt lookup functions. Reported by Mika.
    
    Cc: Mika Kuoppala <mika.kuoppala@linux.intel.com>
    Cc: Jesse Barnes <jbarnes@virtuousgeek.org>
    Reviewed-by: default avatarJesse Barnes <jbarnes@virtuousgeek.org>
    Signed-off-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
    a8bb6818
intel_drv.h 30.3 KB