• Mikulas Patocka's avatar
    udlfb: fix sleeping inside spinlock · d6763d4f
    Mikulas Patocka authored
    commit 6b11f9d8 upstream.
    
    If a framebuffer device is used as a console, the rendering calls
    (copyarea, fillrect, imageblit) may be done with the console spinlock
    held. On udlfb, these function call dlfb_handle_damage that takes a
    blocking semaphore before acquiring an URB.
    
    In order to fix the bug, this patch changes the calls copyarea, fillrect
    and imageblit to offload USB work to a workqueue.
    
    A side effect of this patch is 3x improvement in console scrolling speed
    because the device doesn't have to be updated after each copyarea call.
    Signed-off-by: default avatarMikulas Patocka <mpatocka@redhat.com>
    Cc: Bernie Thompson <bernie@plugable.com>
    Cc: Ladislav Michl <ladis@linux-mips.org>
    Cc: <stable@vger.kernel.org>
    Signed-off-by: default avatarBartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
    Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
    d6763d4f
udlfb.h 2.88 KB