Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 60899
b: refs/heads/master
c: 7592181
h: refs/heads/master
i:
  60897: bec9ccf
  60895: 32e7402
v: v3
  • Loading branch information
Antonino A. Daplas authored and Linus Torvalds committed Jul 17, 2007
1 parent a6895d5 commit 4c4004f
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 10 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 11494543a5775b4764d0172084092715a533a8ce
refs/heads/master: 7592181005261c3d90398375ab6922f56cdd2bad
21 changes: 12 additions & 9 deletions trunk/drivers/video/cyblafb.c
Original file line number Diff line number Diff line change
Expand Up @@ -1068,15 +1068,18 @@ static int cyblafb_setcolreg(unsigned regno, unsigned red, unsigned green,
out8(0x3C9, green >> 10);
out8(0x3C9, blue >> 10);

} else if (bpp == 16) // RGB 565
((u32 *) info->pseudo_palette)[regno] =
(red & 0xF800) |
((green & 0xFC00) >> 5) | ((blue & 0xF800) >> 11);
else if (bpp == 32) // ARGB 8888
((u32 *) info->pseudo_palette)[regno] =
((transp & 0xFF00) << 16) |
((red & 0xFF00) << 8) |
((green & 0xFF00)) | ((blue & 0xFF00) >> 8);
} else if (regno < 16) {
if (bpp == 16) // RGB 565
((u32 *) info->pseudo_palette)[regno] =
(red & 0xF800) |
((green & 0xFC00) >> 5) |
((blue & 0xF800) >> 11);
else if (bpp == 32) // ARGB 8888
((u32 *) info->pseudo_palette)[regno] =
((transp & 0xFF00) << 16) |
((red & 0xFF00) << 8) |
((green & 0xFF00)) | ((blue & 0xFF00) >> 8);
}

return 0;
}
Expand Down

0 comments on commit 4c4004f

Please sign in to comment.