summaryrefslogtreecommitdiffstats
path: root/kernel/drivers/video/fbdev/efifb.c
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/drivers/video/fbdev/efifb.c')
-rw-r--r--kernel/drivers/video/fbdev/efifb.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/kernel/drivers/video/fbdev/efifb.c b/kernel/drivers/video/fbdev/efifb.c
index 95d293b74..dc2fcda54 100644
--- a/kernel/drivers/video/fbdev/efifb.c
+++ b/kernel/drivers/video/fbdev/efifb.c
@@ -52,9 +52,9 @@ static int efifb_setcolreg(unsigned regno, unsigned red, unsigned green,
return 1;
if (regno < 16) {
- red >>= 8;
- green >>= 8;
- blue >>= 8;
+ red >>= 16 - info->var.red.length;
+ green >>= 16 - info->var.green.length;
+ blue >>= 16 - info->var.blue.length;
((u32 *)(info->pseudo_palette))[regno] =
(red << info->var.red.offset) |
(green << info->var.green.offset) |