diff options
author | Jeff Garzik <jgarzik@pobox.com> | 2005-11-29 03:50:33 -0500 |
---|---|---|
committer | Jeff Garzik <jgarzik@pobox.com> | 2005-11-29 03:50:33 -0500 |
commit | 2226340eb8df9c42f9fca74582d08d5117fc0cec (patch) | |
tree | c98370844715194600b79f886dbc391633f3e470 /drivers/video/console | |
parent | 2e06cb5859fdaeba0529806eb1bf161ffd0db201 (diff) | |
parent | 624f54be206adf970cd8eece16446b027913e533 (diff) |
Merge branch 'master'
Diffstat (limited to 'drivers/video/console')
-rw-r--r-- | drivers/video/console/fbcon_ccw.c | 2 | ||||
-rw-r--r-- | drivers/video/console/fbcon_rotate.h | 17 | ||||
-rw-r--r-- | drivers/video/console/vgacon.c | 1 |
3 files changed, 7 insertions, 13 deletions
diff --git a/drivers/video/console/fbcon_ccw.c b/drivers/video/console/fbcon_ccw.c index 3afd1eeb1ade..4952b66ae206 100644 --- a/drivers/video/console/fbcon_ccw.c +++ b/drivers/video/console/fbcon_ccw.c | |||
@@ -34,7 +34,7 @@ static inline void ccw_update_attr(u8 *dst, u8 *src, int attribute, | |||
34 | msk <<= (8 - mod); | 34 | msk <<= (8 - mod); |
35 | 35 | ||
36 | if (offset > mod) | 36 | if (offset > mod) |
37 | set_bit(FBCON_BIT(7), (void *)&msk1); | 37 | msk1 |= 0x01; |
38 | 38 | ||
39 | for (i = 0; i < vc->vc_font.width; i++) { | 39 | for (i = 0; i < vc->vc_font.width; i++) { |
40 | for (j = 0; j < width; j++) { | 40 | for (j = 0; j < width; j++) { |
diff --git a/drivers/video/console/fbcon_rotate.h b/drivers/video/console/fbcon_rotate.h index 90c672096c2e..1b8f92fdc6a8 100644 --- a/drivers/video/console/fbcon_rotate.h +++ b/drivers/video/console/fbcon_rotate.h | |||
@@ -21,21 +21,13 @@ | |||
21 | (s == SCROLL_REDRAW || s == SCROLL_MOVE || !(i)->fix.xpanstep) ? \ | 21 | (s == SCROLL_REDRAW || s == SCROLL_MOVE || !(i)->fix.xpanstep) ? \ |
22 | (i)->var.xres : (i)->var.xres_virtual; }) | 22 | (i)->var.xres : (i)->var.xres_virtual; }) |
23 | 23 | ||
24 | /* | ||
25 | * The bitmap is always big endian | ||
26 | */ | ||
27 | #if defined(__LITTLE_ENDIAN) | ||
28 | #define FBCON_BIT(b) (7 - (b)) | ||
29 | #else | ||
30 | #define FBCON_BIT(b) (b) | ||
31 | #endif | ||
32 | 24 | ||
33 | static inline int pattern_test_bit(u32 x, u32 y, u32 pitch, const char *pat) | 25 | static inline int pattern_test_bit(u32 x, u32 y, u32 pitch, const char *pat) |
34 | { | 26 | { |
35 | u32 tmp = (y * pitch) + x, index = tmp / 8, bit = tmp % 8; | 27 | u32 tmp = (y * pitch) + x, index = tmp / 8, bit = tmp % 8; |
36 | 28 | ||
37 | pat +=index; | 29 | pat +=index; |
38 | return (test_bit(FBCON_BIT(bit), (void *)pat)); | 30 | return (*pat) & (0x80 >> bit); |
39 | } | 31 | } |
40 | 32 | ||
41 | static inline void pattern_set_bit(u32 x, u32 y, u32 pitch, char *pat) | 33 | static inline void pattern_set_bit(u32 x, u32 y, u32 pitch, char *pat) |
@@ -43,13 +35,14 @@ static inline void pattern_set_bit(u32 x, u32 y, u32 pitch, char *pat) | |||
43 | u32 tmp = (y * pitch) + x, index = tmp / 8, bit = tmp % 8; | 35 | u32 tmp = (y * pitch) + x, index = tmp / 8, bit = tmp % 8; |
44 | 36 | ||
45 | pat += index; | 37 | pat += index; |
46 | set_bit(FBCON_BIT(bit), (void *)pat); | 38 | |
39 | (*pat) |= 0x80 >> bit; | ||
47 | } | 40 | } |
48 | 41 | ||
49 | static inline void rotate_ud(const char *in, char *out, u32 width, u32 height) | 42 | static inline void rotate_ud(const char *in, char *out, u32 width, u32 height) |
50 | { | 43 | { |
51 | int i, j; | 44 | int i, j; |
52 | int shift = width % 8; | 45 | int shift = (8 - (width % 8)) & 7; |
53 | 46 | ||
54 | width = (width + 7) & ~7; | 47 | width = (width + 7) & ~7; |
55 | 48 | ||
@@ -85,7 +78,7 @@ static inline void rotate_cw(const char *in, char *out, u32 width, u32 height) | |||
85 | static inline void rotate_ccw(const char *in, char *out, u32 width, u32 height) | 78 | static inline void rotate_ccw(const char *in, char *out, u32 width, u32 height) |
86 | { | 79 | { |
87 | int i, j, h = height, w = width; | 80 | int i, j, h = height, w = width; |
88 | int shift = width % 8; | 81 | int shift = (8 - (width % 8)) & 7; |
89 | 82 | ||
90 | width = (width + 7) & ~7; | 83 | width = (width + 7) & ~7; |
91 | height = (height + 7) & ~7; | 84 | height = (height + 7) & ~7; |
diff --git a/drivers/video/console/vgacon.c b/drivers/video/console/vgacon.c index 274f90543e32..167de397e4b4 100644 --- a/drivers/video/console/vgacon.c +++ b/drivers/video/console/vgacon.c | |||
@@ -966,6 +966,7 @@ static int vgacon_adjust_height(struct vc_data *vc, unsigned fontheight) | |||
966 | outb_p(0x12, vga_video_port_reg); /* Vertical display limit */ | 966 | outb_p(0x12, vga_video_port_reg); /* Vertical display limit */ |
967 | outb_p(vde, vga_video_port_val); | 967 | outb_p(vde, vga_video_port_val); |
968 | spin_unlock_irq(&vga_lock); | 968 | spin_unlock_irq(&vga_lock); |
969 | vga_video_font_height = fontheight; | ||
969 | 970 | ||
970 | for (i = 0; i < MAX_NR_CONSOLES; i++) { | 971 | for (i = 0; i < MAX_NR_CONSOLES; i++) { |
971 | struct vc_data *c = vc_cons[i].d; | 972 | struct vc_data *c = vc_cons[i].d; |