summaryrefslogtreecommitdiff
path: root/drivers/video
diff options
context:
space:
mode:
authorGeert Uytterhoeven <geert@linux-m68k.org>2022-07-11 17:50:28 +0200
committerHelge Deller <deller@gmx.de>2022-07-18 07:56:18 +0200
commit35fa155e836833fdd5744c5237aca7e2c2c31e03 (patch)
tree6342e9d2b90098cedcdeb398365ea999fc88a348 /drivers/video
parentc7ef5e285c842bdca1121512967400443e565456 (diff)
video: fbdev: atari: Fix ext_setcolreg()
The red, green, and blue color values are 16-bit, while the external graphics hardware registers are 8-bit. Add the missing conversion from 16-bit to 8-bit. Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org> Tested-by: Michael Schmitz <schmitzmic@gmail.com> Signed-off-by: Helge Deller <deller@gmx.de>
Diffstat (limited to 'drivers/video')
-rw-r--r--drivers/video/fbdev/atafb.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/video/fbdev/atafb.c b/drivers/video/fbdev/atafb.c
index 39c3b860a797..a36cd8f1f420 100644
--- a/drivers/video/fbdev/atafb.c
+++ b/drivers/video/fbdev/atafb.c
@@ -2206,6 +2206,10 @@ static int ext_setcolreg(unsigned int regno, unsigned int red,
if (regno > 255)
return 1;
+ red >>= 8;
+ green >>= 8;
+ blue >>= 8;
+
switch (external_card_type) {
case IS_VGA:
OUTB(0x3c8, regno);