• Tomi Valkeinen's avatar
    drm/omap: fix race issue when unloading omapdrm · e2f8fd74
    Tomi Valkeinen authored
    At module unload, omap_fbdev_free() gets called which releases the
    framebuffers. However, the framebuffers are still used by crtcs, and
    will be released only later at vsync. The driver doesn't wait for this,
    and goes on to release the rest of the resources, which often
    causes a crash.
    
    This patchs adds a omap_crtc_flush() function which waits until the crtc
    has finished with its apply queue and page flips.
    
    The function utilizes a simple polling while-loop, as the performance is
    not an issue here.
    Signed-off-by: default avatarTomi Valkeinen <tomi.valkeinen@ti.com>
    Reviewed-by: default avatarRob Clark <robdclark@gmail.com>
    e2f8fd74
omap_drv.c 18 KB