• Peter Rosin's avatar
    fbdev: fbmem: behave better with small rotated displays and many CPUs · f75df8d4
    Peter Rosin authored
    Blitting an image with "negative" offsets is not working since there
    is no clipping. It hopefully just crashes. For the bootup logo, there
    is protection so that blitting does not happen as the image is drawn
    further and further to the right (ROTATE_UR) or further and further
    down (ROTATE_CW). There is however no protection when drawing in the
    opposite directions (ROTATE_UD and ROTATE_CCW).
    
    Add back this protection.
    
    The regression is 20-odd years old but the mindless warning-killing
    mentality displayed in commit 34bdb666 ("fbdev: fbmem: remove
    positive test on unsigned values") is also to blame, methinks.
    
    Fixes: 448d4797 ("fbdev: fb_do_show_logo() updates")
    Signed-off-by: default avatarPeter Rosin <peda@axentia.se>
    Cc: Tomi Valkeinen <tomi.valkeinen@ti.com>
    Cc: Fabian Frederick <ffrederick@users.sourceforge.net>
    Cc: Geert Uytterhoeven <geert+renesas@glider.be>
    cc: Geoff Levand <geoff@infradead.org>
    Cc: James Simmons <jsimmons@users.sf.net>
    Signed-off-by: default avatarBartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
    f75df8d4
fbmem.c 47.2 KB