diff options
author | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2009-11-02 22:10:07 -0800 |
---|---|---|
committer | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2009-11-02 22:10:07 -0800 |
commit | 7a53c7f56bbfc9b0ef892e68f5cfae3d902544d1 (patch) | |
tree | 19dec256fc80ad06d631ece78b9eb68a457ce66b /drivers/video/platinumfb.c | |
parent | e57130698fe3dd2b7d617d90bbf86474473cb40c (diff) | |
parent | 012abeea669ea49636cf952d13298bb68654146a (diff) |
Merge commit 'v2.6.32-rc5' into for-linus
Diffstat (limited to 'drivers/video/platinumfb.c')
-rw-r--r-- | drivers/video/platinumfb.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/drivers/video/platinumfb.c b/drivers/video/platinumfb.c index bacfabd9ce1..0a366d86f08 100644 --- a/drivers/video/platinumfb.c +++ b/drivers/video/platinumfb.c @@ -223,10 +223,14 @@ static int platinumfb_setcolreg(u_int regno, u_int red, u_int green, u_int blue, static inline int platinum_vram_reqd(int video_mode, int color_mode) { - return vmode_attrs[video_mode-1].vres * - (vmode_attrs[video_mode-1].hres * (1<<color_mode) + - ((video_mode == VMODE_832_624_75) && - (color_mode > CMODE_8)) ? 0x10 : 0x20) + 0x1000; + int baseval = vmode_attrs[video_mode-1].hres * (1<<color_mode); + + if ((video_mode == VMODE_832_624_75) && (color_mode > CMODE_8)) + baseval += 0x10; + else + baseval += 0x20; + + return vmode_attrs[video_mode-1].vres * baseval + 0x1000; } #define STORE_D2(a, d) { \ |