diff options
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/video/console/fbcon.c | 15 | ||||
-rw-r--r-- | drivers/video/console/fbcon.h | 3 | ||||
-rw-r--r-- | drivers/video/console/fbcon_ccw.c | 14 | ||||
-rw-r--r-- | drivers/video/console/fbcon_cw.c | 14 | ||||
-rw-r--r-- | drivers/video/console/fbcon_ud.c | 22 |
5 files changed, 29 insertions, 39 deletions
diff --git a/drivers/video/console/fbcon.c b/drivers/video/console/fbcon.c index e7802ffe549a..bcea87c3cc06 100644 --- a/drivers/video/console/fbcon.c +++ b/drivers/video/console/fbcon.c | |||
@@ -106,8 +106,7 @@ enum { | |||
106 | FBCON_LOGO_DONTSHOW = -3 /* do not show the logo */ | 106 | FBCON_LOGO_DONTSHOW = -3 /* do not show the logo */ |
107 | }; | 107 | }; |
108 | 108 | ||
109 | struct display fb_display[MAX_NR_CONSOLES]; | 109 | static struct display fb_display[MAX_NR_CONSOLES]; |
110 | EXPORT_SYMBOL(fb_display); | ||
111 | 110 | ||
112 | static signed char con2fb_map[MAX_NR_CONSOLES]; | 111 | static signed char con2fb_map[MAX_NR_CONSOLES]; |
113 | static signed char con2fb_map_boot[MAX_NR_CONSOLES]; | 112 | static signed char con2fb_map_boot[MAX_NR_CONSOLES]; |
@@ -653,13 +652,12 @@ static void set_blitting_type(struct vc_data *vc, struct fb_info *info, | |||
653 | { | 652 | { |
654 | struct fbcon_ops *ops = info->fbcon_par; | 653 | struct fbcon_ops *ops = info->fbcon_par; |
655 | 654 | ||
655 | ops->p = (p) ? p : &fb_display[vc->vc_num]; | ||
656 | |||
656 | if ((info->flags & FBINFO_MISC_TILEBLITTING)) | 657 | if ((info->flags & FBINFO_MISC_TILEBLITTING)) |
657 | fbcon_set_tileops(vc, info, p, ops); | 658 | fbcon_set_tileops(vc, info, p, ops); |
658 | else { | 659 | else { |
659 | struct display *disp; | 660 | fbcon_set_rotation(info, ops->p); |
660 | |||
661 | disp = (p) ? p : &fb_display[vc->vc_num]; | ||
662 | fbcon_set_rotation(info, disp); | ||
663 | fbcon_set_bitops(ops); | 661 | fbcon_set_bitops(ops); |
664 | } | 662 | } |
665 | } | 663 | } |
@@ -668,11 +666,10 @@ static void set_blitting_type(struct vc_data *vc, struct fb_info *info, | |||
668 | struct display *p) | 666 | struct display *p) |
669 | { | 667 | { |
670 | struct fbcon_ops *ops = info->fbcon_par; | 668 | struct fbcon_ops *ops = info->fbcon_par; |
671 | struct display *disp; | ||
672 | 669 | ||
673 | info->flags &= ~FBINFO_MISC_TILEBLITTING; | 670 | info->flags &= ~FBINFO_MISC_TILEBLITTING; |
674 | disp = (p) ? p : &fb_display[vc->vc_num]; | 671 | ops->p = (p) ? p : &fb_display[vc->vc_num]; |
675 | fbcon_set_rotation(info, disp); | 672 | fbcon_set_rotation(info, ops->p); |
676 | fbcon_set_bitops(ops); | 673 | fbcon_set_bitops(ops); |
677 | } | 674 | } |
678 | #endif /* CONFIG_MISC_TILEBLITTING */ | 675 | #endif /* CONFIG_MISC_TILEBLITTING */ |
diff --git a/drivers/video/console/fbcon.h b/drivers/video/console/fbcon.h index accfd7bd8e93..6892e7ff34de 100644 --- a/drivers/video/console/fbcon.h +++ b/drivers/video/console/fbcon.h | |||
@@ -52,8 +52,6 @@ struct display { | |||
52 | struct fb_videomode *mode; | 52 | struct fb_videomode *mode; |
53 | }; | 53 | }; |
54 | 54 | ||
55 | extern struct display fb_display[]; | ||
56 | |||
57 | struct fbcon_ops { | 55 | struct fbcon_ops { |
58 | void (*bmove)(struct vc_data *vc, struct fb_info *info, int sy, | 56 | void (*bmove)(struct vc_data *vc, struct fb_info *info, int sy, |
59 | int sx, int dy, int dx, int height, int width); | 57 | int sx, int dy, int dx, int height, int width); |
@@ -73,6 +71,7 @@ struct fbcon_ops { | |||
73 | struct fb_var_screeninfo var; /* copy of the current fb_var_screeninfo */ | 71 | struct fb_var_screeninfo var; /* copy of the current fb_var_screeninfo */ |
74 | struct timer_list cursor_timer; /* Cursor timer */ | 72 | struct timer_list cursor_timer; /* Cursor timer */ |
75 | struct fb_cursor cursor_state; | 73 | struct fb_cursor cursor_state; |
74 | struct display *p; | ||
76 | int currcon; /* Current VC. */ | 75 | int currcon; /* Current VC. */ |
77 | int cursor_flash; | 76 | int cursor_flash; |
78 | int cursor_reset; | 77 | int cursor_reset; |
diff --git a/drivers/video/console/fbcon_ccw.c b/drivers/video/console/fbcon_ccw.c index 680aabab73c5..3afd1eeb1ade 100644 --- a/drivers/video/console/fbcon_ccw.c +++ b/drivers/video/console/fbcon_ccw.c | |||
@@ -63,9 +63,9 @@ static inline void ccw_update_attr(u8 *dst, u8 *src, int attribute, | |||
63 | static void ccw_bmove(struct vc_data *vc, struct fb_info *info, int sy, | 63 | static void ccw_bmove(struct vc_data *vc, struct fb_info *info, int sy, |
64 | int sx, int dy, int dx, int height, int width) | 64 | int sx, int dy, int dx, int height, int width) |
65 | { | 65 | { |
66 | struct display *p = &fb_display[vc->vc_num]; | 66 | struct fbcon_ops *ops = info->fbcon_par; |
67 | struct fb_copyarea area; | 67 | struct fb_copyarea area; |
68 | u32 vyres = GETVYRES(p->scrollmode, info); | 68 | u32 vyres = GETVYRES(ops->p->scrollmode, info); |
69 | 69 | ||
70 | area.sx = sy * vc->vc_font.height; | 70 | area.sx = sy * vc->vc_font.height; |
71 | area.sy = vyres - ((sx + width) * vc->vc_font.width); | 71 | area.sy = vyres - ((sx + width) * vc->vc_font.width); |
@@ -80,10 +80,10 @@ static void ccw_bmove(struct vc_data *vc, struct fb_info *info, int sy, | |||
80 | static void ccw_clear(struct vc_data *vc, struct fb_info *info, int sy, | 80 | static void ccw_clear(struct vc_data *vc, struct fb_info *info, int sy, |
81 | int sx, int height, int width) | 81 | int sx, int height, int width) |
82 | { | 82 | { |
83 | struct display *p = &fb_display[vc->vc_num]; | 83 | struct fbcon_ops *ops = info->fbcon_par; |
84 | struct fb_fillrect region; | 84 | struct fb_fillrect region; |
85 | int bgshift = (vc->vc_hi_font_mask) ? 13 : 12; | 85 | int bgshift = (vc->vc_hi_font_mask) ? 13 : 12; |
86 | u32 vyres = GETVYRES(p->scrollmode, info); | 86 | u32 vyres = GETVYRES(ops->p->scrollmode, info); |
87 | 87 | ||
88 | region.color = attr_bgcol_ec(bgshift,vc); | 88 | region.color = attr_bgcol_ec(bgshift,vc); |
89 | region.dx = sy * vc->vc_font.height; | 89 | region.dx = sy * vc->vc_font.height; |
@@ -131,7 +131,6 @@ static void ccw_putcs(struct vc_data *vc, struct fb_info *info, | |||
131 | int fg, int bg) | 131 | int fg, int bg) |
132 | { | 132 | { |
133 | struct fb_image image; | 133 | struct fb_image image; |
134 | struct display *p = &fb_display[vc->vc_num]; | ||
135 | struct fbcon_ops *ops = info->fbcon_par; | 134 | struct fbcon_ops *ops = info->fbcon_par; |
136 | u32 width = (vc->vc_font.height + 7)/8; | 135 | u32 width = (vc->vc_font.height + 7)/8; |
137 | u32 cellsize = width * vc->vc_font.width; | 136 | u32 cellsize = width * vc->vc_font.width; |
@@ -141,7 +140,7 @@ static void ccw_putcs(struct vc_data *vc, struct fb_info *info, | |||
141 | u32 cnt, pitch, size; | 140 | u32 cnt, pitch, size; |
142 | u32 attribute = get_attribute(info, scr_readw(s)); | 141 | u32 attribute = get_attribute(info, scr_readw(s)); |
143 | u8 *dst, *buf = NULL; | 142 | u8 *dst, *buf = NULL; |
144 | u32 vyres = GETVYRES(p->scrollmode, info); | 143 | u32 vyres = GETVYRES(ops->p->scrollmode, info); |
145 | 144 | ||
146 | if (!ops->fontbuffer) | 145 | if (!ops->fontbuffer) |
147 | return; | 146 | return; |
@@ -397,9 +396,8 @@ static void ccw_cursor(struct vc_data *vc, struct fb_info *info, | |||
397 | int ccw_update_start(struct fb_info *info) | 396 | int ccw_update_start(struct fb_info *info) |
398 | { | 397 | { |
399 | struct fbcon_ops *ops = info->fbcon_par; | 398 | struct fbcon_ops *ops = info->fbcon_par; |
400 | struct display *p = &fb_display[ops->currcon]; | ||
401 | u32 yoffset; | 399 | u32 yoffset; |
402 | u32 vyres = GETVYRES(p->scrollmode, info); | 400 | u32 vyres = GETVYRES(ops->p->scrollmode, info); |
403 | int err; | 401 | int err; |
404 | 402 | ||
405 | yoffset = (vyres - info->var.yres) - ops->var.xoffset; | 403 | yoffset = (vyres - info->var.yres) - ops->var.xoffset; |
diff --git a/drivers/video/console/fbcon_cw.c b/drivers/video/console/fbcon_cw.c index 6c6f3b6dd175..6d92b8456206 100644 --- a/drivers/video/console/fbcon_cw.c +++ b/drivers/video/console/fbcon_cw.c | |||
@@ -49,9 +49,9 @@ static inline void cw_update_attr(u8 *dst, u8 *src, int attribute, | |||
49 | static void cw_bmove(struct vc_data *vc, struct fb_info *info, int sy, | 49 | static void cw_bmove(struct vc_data *vc, struct fb_info *info, int sy, |
50 | int sx, int dy, int dx, int height, int width) | 50 | int sx, int dy, int dx, int height, int width) |
51 | { | 51 | { |
52 | struct display *p = &fb_display[vc->vc_num]; | 52 | struct fbcon_ops *ops = info->fbcon_par; |
53 | struct fb_copyarea area; | 53 | struct fb_copyarea area; |
54 | u32 vxres = GETVXRES(p->scrollmode, info); | 54 | u32 vxres = GETVXRES(ops->p->scrollmode, info); |
55 | 55 | ||
56 | area.sx = vxres - ((sy + height) * vc->vc_font.height); | 56 | area.sx = vxres - ((sy + height) * vc->vc_font.height); |
57 | area.sy = sx * vc->vc_font.width; | 57 | area.sy = sx * vc->vc_font.width; |
@@ -66,10 +66,10 @@ static void cw_bmove(struct vc_data *vc, struct fb_info *info, int sy, | |||
66 | static void cw_clear(struct vc_data *vc, struct fb_info *info, int sy, | 66 | static void cw_clear(struct vc_data *vc, struct fb_info *info, int sy, |
67 | int sx, int height, int width) | 67 | int sx, int height, int width) |
68 | { | 68 | { |
69 | struct display *p = &fb_display[vc->vc_num]; | 69 | struct fbcon_ops *ops = info->fbcon_par; |
70 | struct fb_fillrect region; | 70 | struct fb_fillrect region; |
71 | int bgshift = (vc->vc_hi_font_mask) ? 13 : 12; | 71 | int bgshift = (vc->vc_hi_font_mask) ? 13 : 12; |
72 | u32 vxres = GETVXRES(p->scrollmode, info); | 72 | u32 vxres = GETVXRES(ops->p->scrollmode, info); |
73 | 73 | ||
74 | region.color = attr_bgcol_ec(bgshift,vc); | 74 | region.color = attr_bgcol_ec(bgshift,vc); |
75 | region.dx = vxres - ((sy + height) * vc->vc_font.height); | 75 | region.dx = vxres - ((sy + height) * vc->vc_font.height); |
@@ -117,7 +117,6 @@ static void cw_putcs(struct vc_data *vc, struct fb_info *info, | |||
117 | int fg, int bg) | 117 | int fg, int bg) |
118 | { | 118 | { |
119 | struct fb_image image; | 119 | struct fb_image image; |
120 | struct display *p = &fb_display[vc->vc_num]; | ||
121 | struct fbcon_ops *ops = info->fbcon_par; | 120 | struct fbcon_ops *ops = info->fbcon_par; |
122 | u32 width = (vc->vc_font.height + 7)/8; | 121 | u32 width = (vc->vc_font.height + 7)/8; |
123 | u32 cellsize = width * vc->vc_font.width; | 122 | u32 cellsize = width * vc->vc_font.width; |
@@ -127,7 +126,7 @@ static void cw_putcs(struct vc_data *vc, struct fb_info *info, | |||
127 | u32 cnt, pitch, size; | 126 | u32 cnt, pitch, size; |
128 | u32 attribute = get_attribute(info, scr_readw(s)); | 127 | u32 attribute = get_attribute(info, scr_readw(s)); |
129 | u8 *dst, *buf = NULL; | 128 | u8 *dst, *buf = NULL; |
130 | u32 vxres = GETVXRES(p->scrollmode, info); | 129 | u32 vxres = GETVXRES(ops->p->scrollmode, info); |
131 | 130 | ||
132 | if (!ops->fontbuffer) | 131 | if (!ops->fontbuffer) |
133 | return; | 132 | return; |
@@ -381,8 +380,7 @@ static void cw_cursor(struct vc_data *vc, struct fb_info *info, | |||
381 | int cw_update_start(struct fb_info *info) | 380 | int cw_update_start(struct fb_info *info) |
382 | { | 381 | { |
383 | struct fbcon_ops *ops = info->fbcon_par; | 382 | struct fbcon_ops *ops = info->fbcon_par; |
384 | struct display *p = &fb_display[ops->currcon]; | 383 | u32 vxres = GETVXRES(ops->p->scrollmode, info); |
385 | u32 vxres = GETVXRES(p->scrollmode, info); | ||
386 | u32 xoffset; | 384 | u32 xoffset; |
387 | int err; | 385 | int err; |
388 | 386 | ||
diff --git a/drivers/video/console/fbcon_ud.c b/drivers/video/console/fbcon_ud.c index 2e1d9d4249cd..c4d7c89212b4 100644 --- a/drivers/video/console/fbcon_ud.c +++ b/drivers/video/console/fbcon_ud.c | |||
@@ -48,10 +48,10 @@ static inline void ud_update_attr(u8 *dst, u8 *src, int attribute, | |||
48 | static void ud_bmove(struct vc_data *vc, struct fb_info *info, int sy, | 48 | static void ud_bmove(struct vc_data *vc, struct fb_info *info, int sy, |
49 | int sx, int dy, int dx, int height, int width) | 49 | int sx, int dy, int dx, int height, int width) |
50 | { | 50 | { |
51 | struct display *p = &fb_display[vc->vc_num]; | 51 | struct fbcon_ops *ops = info->fbcon_par; |
52 | struct fb_copyarea area; | 52 | struct fb_copyarea area; |
53 | u32 vyres = GETVYRES(p->scrollmode, info); | 53 | u32 vyres = GETVYRES(ops->p->scrollmode, info); |
54 | u32 vxres = GETVXRES(p->scrollmode, info); | 54 | u32 vxres = GETVXRES(ops->p->scrollmode, info); |
55 | 55 | ||
56 | area.sy = vyres - ((sy + height) * vc->vc_font.height); | 56 | area.sy = vyres - ((sy + height) * vc->vc_font.height); |
57 | area.sx = vxres - ((sx + width) * vc->vc_font.width); | 57 | area.sx = vxres - ((sx + width) * vc->vc_font.width); |
@@ -66,11 +66,11 @@ static void ud_bmove(struct vc_data *vc, struct fb_info *info, int sy, | |||
66 | static void ud_clear(struct vc_data *vc, struct fb_info *info, int sy, | 66 | static void ud_clear(struct vc_data *vc, struct fb_info *info, int sy, |
67 | int sx, int height, int width) | 67 | int sx, int height, int width) |
68 | { | 68 | { |
69 | struct display *p = &fb_display[vc->vc_num]; | 69 | struct fbcon_ops *ops = info->fbcon_par; |
70 | struct fb_fillrect region; | 70 | struct fb_fillrect region; |
71 | int bgshift = (vc->vc_hi_font_mask) ? 13 : 12; | 71 | int bgshift = (vc->vc_hi_font_mask) ? 13 : 12; |
72 | u32 vyres = GETVYRES(p->scrollmode, info); | 72 | u32 vyres = GETVYRES(ops->p->scrollmode, info); |
73 | u32 vxres = GETVXRES(p->scrollmode, info); | 73 | u32 vxres = GETVXRES(ops->p->scrollmode, info); |
74 | 74 | ||
75 | region.color = attr_bgcol_ec(bgshift,vc); | 75 | region.color = attr_bgcol_ec(bgshift,vc); |
76 | region.dy = vyres - ((sy + height) * vc->vc_font.height); | 76 | region.dy = vyres - ((sy + height) * vc->vc_font.height); |
@@ -153,7 +153,6 @@ static void ud_putcs(struct vc_data *vc, struct fb_info *info, | |||
153 | int fg, int bg) | 153 | int fg, int bg) |
154 | { | 154 | { |
155 | struct fb_image image; | 155 | struct fb_image image; |
156 | struct display *p = &fb_display[vc->vc_num]; | ||
157 | struct fbcon_ops *ops = info->fbcon_par; | 156 | struct fbcon_ops *ops = info->fbcon_par; |
158 | u32 width = (vc->vc_font.width + 7)/8; | 157 | u32 width = (vc->vc_font.width + 7)/8; |
159 | u32 cellsize = width * vc->vc_font.height; | 158 | u32 cellsize = width * vc->vc_font.height; |
@@ -163,8 +162,8 @@ static void ud_putcs(struct vc_data *vc, struct fb_info *info, | |||
163 | u32 mod = vc->vc_font.width % 8, cnt, pitch, size; | 162 | u32 mod = vc->vc_font.width % 8, cnt, pitch, size; |
164 | u32 attribute = get_attribute(info, scr_readw(s)); | 163 | u32 attribute = get_attribute(info, scr_readw(s)); |
165 | u8 *dst, *buf = NULL; | 164 | u8 *dst, *buf = NULL; |
166 | u32 vyres = GETVYRES(p->scrollmode, info); | 165 | u32 vyres = GETVYRES(ops->p->scrollmode, info); |
167 | u32 vxres = GETVXRES(p->scrollmode, info); | 166 | u32 vxres = GETVXRES(ops->p->scrollmode, info); |
168 | 167 | ||
169 | if (!ops->fontbuffer) | 168 | if (!ops->fontbuffer) |
170 | return; | 169 | return; |
@@ -421,10 +420,9 @@ static void ud_cursor(struct vc_data *vc, struct fb_info *info, | |||
421 | int ud_update_start(struct fb_info *info) | 420 | int ud_update_start(struct fb_info *info) |
422 | { | 421 | { |
423 | struct fbcon_ops *ops = info->fbcon_par; | 422 | struct fbcon_ops *ops = info->fbcon_par; |
424 | struct display *p = &fb_display[ops->currcon]; | ||
425 | u32 xoffset, yoffset; | 423 | u32 xoffset, yoffset; |
426 | u32 vyres = GETVYRES(p->scrollmode, info); | 424 | u32 vyres = GETVYRES(ops->p->scrollmode, info); |
427 | u32 vxres = GETVXRES(p->scrollmode, info); | 425 | u32 vxres = GETVXRES(ops->p->scrollmode, info); |
428 | int err; | 426 | int err; |
429 | 427 | ||
430 | xoffset = (vxres - info->var.xres) - ops->var.xoffset; | 428 | xoffset = (vxres - info->var.xres) - ops->var.xoffset; |