[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <f807e1c6deedb2b819a309347295b0fd2f89c2c2.1657554353.git.geert@linux-m68k.org>
Date: Mon, 11 Jul 2022 17:50:28 +0200
From: Geert Uytterhoeven <geert@...ux-m68k.org>
To: Helge Deller <deller@....de>
Cc: Michael Schmitz <schmitzmic@...il.com>,
Jonathan Corbet <corbet@....net>, linux-fbdev@...r.kernel.org,
linux-doc@...r.kernel.org, dri-devel@...ts.freedesktop.org,
linux-m68k@...r.kernel.org, linux-kernel@...r.kernel.org,
Geert Uytterhoeven <geert@...ux-m68k.org>
Subject: [PATCH 04/10] 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@...ux-m68k.org>
---
Untested due to lack of hardware.
---
drivers/video/fbdev/atafb.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/drivers/video/fbdev/atafb.c b/drivers/video/fbdev/atafb.c
index 39c3b860a797d4bc..a36cd8f1f4200dd5 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);
--
2.25.1
Powered by blists - more mailing lists