video/macfb: Always initialize DAFB colour table pointer register
authorFinn Thain <fthain@telegraphics.com.au>
Mon, 1 Apr 2019 15:46:55 +0000 (17:46 +0200)
committerBartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
Mon, 1 Apr 2019 15:46:55 +0000 (17:46 +0200)
Don't skip the framebuffer CLUT pointer register initialization when
the first dafb_setpalette() invocation has regno equal to zero.

Suggested-by: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: Finn Thain <fthain@telegraphics.com.au>
Signed-off-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
drivers/video/fbdev/macfb.c

index 37c56c45ee399a5b753cdd8bd1ec155399e51c13..8820a556014c48e131723efc92d3668fd35643fc 100644 (file)
@@ -148,7 +148,7 @@ static int dafb_setpalette(unsigned int regno, unsigned int red,
                           unsigned int green, unsigned int blue,
                           struct fb_info *info)
 {
-       static int lastreg = -1;
+       static int lastreg = -2;
        unsigned long flags;
 
        local_irq_save(flags);