diff options
author | Antonino A. Daplas <adaplas@gmail.com> | 2006-01-09 23:52:56 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-01-10 11:01:42 -0500 |
commit | b73deed32d08740bdbf5f4aab43d988e4d135d95 (patch) | |
tree | 75d78d58fc1a20f6387d1e152bce148398a93836 /drivers | |
parent | 8416131ded5e491ecc2947d1ffaedf64725bb7a3 (diff) |
[PATCH] fbcon: Sanitize fbcon
Do not pass the structure display since fbcon is already keeping the pointer
to the current display.
Signed-off-by: Antonino Daplas <adaplas@pol.net>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/video/console/bitblit.c | 14 | ||||
-rw-r--r-- | drivers/video/console/fbcon.c | 49 | ||||
-rw-r--r-- | drivers/video/console/fbcon.h | 11 | ||||
-rw-r--r-- | drivers/video/console/fbcon_ccw.c | 17 | ||||
-rw-r--r-- | drivers/video/console/fbcon_cw.c | 17 | ||||
-rw-r--r-- | drivers/video/console/fbcon_rotate.c | 9 | ||||
-rw-r--r-- | drivers/video/console/fbcon_ud.c | 19 | ||||
-rw-r--r-- | drivers/video/console/tileblit.c | 17 |
8 files changed, 71 insertions, 82 deletions
diff --git a/drivers/video/console/bitblit.c b/drivers/video/console/bitblit.c index e65fc3ef7630..eea422eb1ab5 100644 --- a/drivers/video/console/bitblit.c +++ b/drivers/video/console/bitblit.c | |||
@@ -234,14 +234,14 @@ static void bit_clear_margins(struct vc_data *vc, struct fb_info *info, | |||
234 | } | 234 | } |
235 | } | 235 | } |
236 | 236 | ||
237 | static void bit_cursor(struct vc_data *vc, struct fb_info *info, | 237 | static void bit_cursor(struct vc_data *vc, struct fb_info *info, int mode, |
238 | struct display *p, int mode, int softback_lines, int fg, int bg) | 238 | int softback_lines, int fg, int bg) |
239 | { | 239 | { |
240 | struct fb_cursor cursor; | 240 | struct fb_cursor cursor; |
241 | struct fbcon_ops *ops = (struct fbcon_ops *) info->fbcon_par; | 241 | struct fbcon_ops *ops = info->fbcon_par; |
242 | unsigned short charmask = vc->vc_hi_font_mask ? 0x1ff : 0xff; | 242 | unsigned short charmask = vc->vc_hi_font_mask ? 0x1ff : 0xff; |
243 | int w = (vc->vc_font.width + 7) >> 3, c; | 243 | int w = (vc->vc_font.width + 7) >> 3, c; |
244 | int y = real_y(p, vc->vc_y); | 244 | int y = real_y(ops->p, vc->vc_y); |
245 | int attribute, use_sw = (vc->vc_cursor_type & 0x10); | 245 | int attribute, use_sw = (vc->vc_cursor_type & 0x10); |
246 | int err = 1; | 246 | int err = 1; |
247 | char *src; | 247 | char *src; |
@@ -310,7 +310,7 @@ static void bit_cursor(struct vc_data *vc, struct fb_info *info, | |||
310 | } | 310 | } |
311 | 311 | ||
312 | if (cursor.set & FB_CUR_SETSIZE || | 312 | if (cursor.set & FB_CUR_SETSIZE || |
313 | vc->vc_cursor_type != p->cursor_shape || | 313 | vc->vc_cursor_type != ops->p->cursor_shape || |
314 | ops->cursor_state.mask == NULL || | 314 | ops->cursor_state.mask == NULL || |
315 | ops->cursor_reset) { | 315 | ops->cursor_reset) { |
316 | char *mask = kmalloc(w*vc->vc_font.height, GFP_ATOMIC); | 316 | char *mask = kmalloc(w*vc->vc_font.height, GFP_ATOMIC); |
@@ -323,10 +323,10 @@ static void bit_cursor(struct vc_data *vc, struct fb_info *info, | |||
323 | kfree(ops->cursor_state.mask); | 323 | kfree(ops->cursor_state.mask); |
324 | ops->cursor_state.mask = mask; | 324 | ops->cursor_state.mask = mask; |
325 | 325 | ||
326 | p->cursor_shape = vc->vc_cursor_type; | 326 | ops->p->cursor_shape = vc->vc_cursor_type; |
327 | cursor.set |= FB_CUR_SETSHAPE; | 327 | cursor.set |= FB_CUR_SETSHAPE; |
328 | 328 | ||
329 | switch (p->cursor_shape & CUR_HWMASK) { | 329 | switch (ops->p->cursor_shape & CUR_HWMASK) { |
330 | case CUR_NONE: | 330 | case CUR_NONE: |
331 | cur_height = 0; | 331 | cur_height = 0; |
332 | break; | 332 | break; |
diff --git a/drivers/video/console/fbcon.c b/drivers/video/console/fbcon.c index 50e4c4eb491f..42ea3af8a9ad 100644 --- a/drivers/video/console/fbcon.c +++ b/drivers/video/console/fbcon.c | |||
@@ -209,13 +209,13 @@ static irqreturn_t fb_vbl_detect(int irq, void *dummy, struct pt_regs *fp) | |||
209 | #endif | 209 | #endif |
210 | 210 | ||
211 | #ifdef CONFIG_FRAMEBUFFER_CONSOLE_ROTATION | 211 | #ifdef CONFIG_FRAMEBUFFER_CONSOLE_ROTATION |
212 | static inline void fbcon_set_rotation(struct fb_info *info, struct display *p) | 212 | static inline void fbcon_set_rotation(struct fb_info *info) |
213 | { | 213 | { |
214 | struct fbcon_ops *ops = info->fbcon_par; | 214 | struct fbcon_ops *ops = info->fbcon_par; |
215 | 215 | ||
216 | if (!(info->flags & FBINFO_MISC_TILEBLITTING) && | 216 | if (!(info->flags & FBINFO_MISC_TILEBLITTING) && |
217 | p->con_rotate < 4) | 217 | ops->p->con_rotate < 4) |
218 | ops->rotate = p->con_rotate; | 218 | ops->rotate = ops->p->con_rotate; |
219 | else | 219 | else |
220 | ops->rotate = 0; | 220 | ops->rotate = 0; |
221 | } | 221 | } |
@@ -265,7 +265,7 @@ static void fbcon_rotate_all(struct fb_info *info, u32 rotate) | |||
265 | fbcon_set_all_vcs(info); | 265 | fbcon_set_all_vcs(info); |
266 | } | 266 | } |
267 | #else | 267 | #else |
268 | static inline void fbcon_set_rotation(struct fb_info *info, struct display *p) | 268 | static inline void fbcon_set_rotation(struct fb_info *info) |
269 | { | 269 | { |
270 | struct fbcon_ops *ops = info->fbcon_par; | 270 | struct fbcon_ops *ops = info->fbcon_par; |
271 | 271 | ||
@@ -402,7 +402,7 @@ static void fb_flashcursor(void *private) | |||
402 | c = scr_readw((u16 *) vc->vc_pos); | 402 | c = scr_readw((u16 *) vc->vc_pos); |
403 | mode = (!ops->cursor_flash || ops->cursor_state.enable) ? | 403 | mode = (!ops->cursor_flash || ops->cursor_state.enable) ? |
404 | CM_ERASE : CM_DRAW; | 404 | CM_ERASE : CM_DRAW; |
405 | ops->cursor(vc, info, p, mode, softback_lines, get_color(vc, info, c, 1), | 405 | ops->cursor(vc, info, mode, softback_lines, get_color(vc, info, c, 1), |
406 | get_color(vc, info, c, 0)); | 406 | get_color(vc, info, c, 0)); |
407 | release_console_sem(); | 407 | release_console_sem(); |
408 | } | 408 | } |
@@ -647,29 +647,27 @@ static void fbcon_prepare_logo(struct vc_data *vc, struct fb_info *info, | |||
647 | } | 647 | } |
648 | 648 | ||
649 | #ifdef CONFIG_FB_TILEBLITTING | 649 | #ifdef CONFIG_FB_TILEBLITTING |
650 | static void set_blitting_type(struct vc_data *vc, struct fb_info *info, | 650 | static void set_blitting_type(struct vc_data *vc, struct fb_info *info) |
651 | struct display *p) | ||
652 | { | 651 | { |
653 | struct fbcon_ops *ops = info->fbcon_par; | 652 | struct fbcon_ops *ops = info->fbcon_par; |
654 | 653 | ||
655 | ops->p = (p) ? p : &fb_display[vc->vc_num]; | 654 | ops->p = &fb_display[vc->vc_num]; |
656 | 655 | ||
657 | if ((info->flags & FBINFO_MISC_TILEBLITTING)) | 656 | if ((info->flags & FBINFO_MISC_TILEBLITTING)) |
658 | fbcon_set_tileops(vc, info, p, ops); | 657 | fbcon_set_tileops(vc, info); |
659 | else { | 658 | else { |
660 | fbcon_set_rotation(info, ops->p); | 659 | fbcon_set_rotation(info); |
661 | fbcon_set_bitops(ops); | 660 | fbcon_set_bitops(ops); |
662 | } | 661 | } |
663 | } | 662 | } |
664 | #else | 663 | #else |
665 | static void set_blitting_type(struct vc_data *vc, struct fb_info *info, | 664 | static void set_blitting_type(struct vc_data *vc, struct fb_info *info) |
666 | struct display *p) | ||
667 | { | 665 | { |
668 | struct fbcon_ops *ops = info->fbcon_par; | 666 | struct fbcon_ops *ops = info->fbcon_par; |
669 | 667 | ||
670 | info->flags &= ~FBINFO_MISC_TILEBLITTING; | 668 | info->flags &= ~FBINFO_MISC_TILEBLITTING; |
671 | ops->p = (p) ? p : &fb_display[vc->vc_num]; | 669 | ops->p = &fb_display[vc->vc_num]; |
672 | fbcon_set_rotation(info, ops->p); | 670 | fbcon_set_rotation(info); |
673 | fbcon_set_bitops(ops); | 671 | fbcon_set_bitops(ops); |
674 | } | 672 | } |
675 | #endif /* CONFIG_MISC_TILEBLITTING */ | 673 | #endif /* CONFIG_MISC_TILEBLITTING */ |
@@ -697,7 +695,7 @@ static int con2fb_acquire_newinfo(struct vc_data *vc, struct fb_info *info, | |||
697 | if (!err) { | 695 | if (!err) { |
698 | memset(ops, 0, sizeof(struct fbcon_ops)); | 696 | memset(ops, 0, sizeof(struct fbcon_ops)); |
699 | info->fbcon_par = ops; | 697 | info->fbcon_par = ops; |
700 | set_blitting_type(vc, info, NULL); | 698 | set_blitting_type(vc, info); |
701 | } | 699 | } |
702 | 700 | ||
703 | if (err) { | 701 | if (err) { |
@@ -933,7 +931,7 @@ static const char *fbcon_startup(void) | |||
933 | ops->cur_rotate = -1; | 931 | ops->cur_rotate = -1; |
934 | info->fbcon_par = ops; | 932 | info->fbcon_par = ops; |
935 | p->con_rotate = rotate; | 933 | p->con_rotate = rotate; |
936 | set_blitting_type(vc, info, NULL); | 934 | set_blitting_type(vc, info); |
937 | 935 | ||
938 | if (info->fix.type != FB_TYPE_TEXT) { | 936 | if (info->fix.type != FB_TYPE_TEXT) { |
939 | if (fbcon_softback_size) { | 937 | if (fbcon_softback_size) { |
@@ -1093,7 +1091,7 @@ static void fbcon_init(struct vc_data *vc, int init) | |||
1093 | 1091 | ||
1094 | ops = info->fbcon_par; | 1092 | ops = info->fbcon_par; |
1095 | p->con_rotate = rotate; | 1093 | p->con_rotate = rotate; |
1096 | set_blitting_type(vc, info, NULL); | 1094 | set_blitting_type(vc, info); |
1097 | 1095 | ||
1098 | cols = vc->vc_cols; | 1096 | cols = vc->vc_cols; |
1099 | rows = vc->vc_rows; | 1097 | rows = vc->vc_rows; |
@@ -1141,9 +1139,9 @@ static void fbcon_init(struct vc_data *vc, int init) | |||
1141 | if (vc == svc && softback_buf) | 1139 | if (vc == svc && softback_buf) |
1142 | fbcon_update_softback(vc); | 1140 | fbcon_update_softback(vc); |
1143 | 1141 | ||
1144 | if (ops->rotate_font && ops->rotate_font(info, vc, p)) { | 1142 | if (ops->rotate_font && ops->rotate_font(info, vc)) { |
1145 | ops->rotate = FB_ROTATE_UR; | 1143 | ops->rotate = FB_ROTATE_UR; |
1146 | set_blitting_type(vc, info, p); | 1144 | set_blitting_type(vc, info); |
1147 | } | 1145 | } |
1148 | 1146 | ||
1149 | } | 1147 | } |
@@ -1243,7 +1241,6 @@ static void fbcon_cursor(struct vc_data *vc, int mode) | |||
1243 | { | 1241 | { |
1244 | struct fb_info *info = registered_fb[con2fb_map[vc->vc_num]]; | 1242 | struct fb_info *info = registered_fb[con2fb_map[vc->vc_num]]; |
1245 | struct fbcon_ops *ops = info->fbcon_par; | 1243 | struct fbcon_ops *ops = info->fbcon_par; |
1246 | struct display *p = &fb_display[vc->vc_num]; | ||
1247 | int y; | 1244 | int y; |
1248 | int c = scr_readw((u16 *) vc->vc_pos); | 1245 | int c = scr_readw((u16 *) vc->vc_pos); |
1249 | 1246 | ||
@@ -1260,7 +1257,7 @@ static void fbcon_cursor(struct vc_data *vc, int mode) | |||
1260 | y = 0; | 1257 | y = 0; |
1261 | } | 1258 | } |
1262 | 1259 | ||
1263 | ops->cursor(vc, info, p, mode, y, get_color(vc, info, c, 1), | 1260 | ops->cursor(vc, info, mode, y, get_color(vc, info, c, 1), |
1264 | get_color(vc, info, c, 0)); | 1261 | get_color(vc, info, c, 0)); |
1265 | vbl_cursor_cnt = CURSOR_DRAW_DELAY; | 1262 | vbl_cursor_cnt = CURSOR_DRAW_DELAY; |
1266 | } | 1263 | } |
@@ -2111,12 +2108,12 @@ static int fbcon_switch(struct vc_data *vc) | |||
2111 | fbcon_add_cursor_timer(info); | 2108 | fbcon_add_cursor_timer(info); |
2112 | } | 2109 | } |
2113 | 2110 | ||
2114 | set_blitting_type(vc, info, p); | 2111 | set_blitting_type(vc, info); |
2115 | ops->cursor_reset = 1; | 2112 | ops->cursor_reset = 1; |
2116 | 2113 | ||
2117 | if (ops->rotate_font && ops->rotate_font(info, vc, p)) { | 2114 | if (ops->rotate_font && ops->rotate_font(info, vc)) { |
2118 | ops->rotate = FB_ROTATE_UR; | 2115 | ops->rotate = FB_ROTATE_UR; |
2119 | set_blitting_type(vc, info, p); | 2116 | set_blitting_type(vc, info); |
2120 | } | 2117 | } |
2121 | 2118 | ||
2122 | vc->vc_can_do_color = (fb_get_color_depth(&info->var, &info->fix)!=1); | 2119 | vc->vc_can_do_color = (fb_get_color_depth(&info->var, &info->fix)!=1); |
@@ -2739,7 +2736,7 @@ static void fbcon_modechanged(struct fb_info *info) | |||
2739 | return; | 2736 | return; |
2740 | 2737 | ||
2741 | p = &fb_display[vc->vc_num]; | 2738 | p = &fb_display[vc->vc_num]; |
2742 | set_blitting_type(vc, info, p); | 2739 | set_blitting_type(vc, info); |
2743 | 2740 | ||
2744 | if (CON_IS_VISIBLE(vc)) { | 2741 | if (CON_IS_VISIBLE(vc)) { |
2745 | var_to_display(p, &info->var, info); | 2742 | var_to_display(p, &info->var, info); |
@@ -2781,7 +2778,7 @@ static void fbcon_set_all_vcs(struct fb_info *info) | |||
2781 | continue; | 2778 | continue; |
2782 | 2779 | ||
2783 | p = &fb_display[vc->vc_num]; | 2780 | p = &fb_display[vc->vc_num]; |
2784 | set_blitting_type(vc, info, p); | 2781 | set_blitting_type(vc, info); |
2785 | var_to_display(p, &info->var, info); | 2782 | var_to_display(p, &info->var, info); |
2786 | cols = FBCON_SWAP(ops->rotate, info->var.xres, info->var.yres); | 2783 | cols = FBCON_SWAP(ops->rotate, info->var.xres, info->var.yres); |
2787 | rows = FBCON_SWAP(ops->rotate, info->var.yres, info->var.xres); | 2784 | rows = FBCON_SWAP(ops->rotate, info->var.yres, info->var.xres); |
diff --git a/drivers/video/console/fbcon.h b/drivers/video/console/fbcon.h index 6892e7ff34de..c38c3d8e7a74 100644 --- a/drivers/video/console/fbcon.h +++ b/drivers/video/console/fbcon.h | |||
@@ -62,12 +62,10 @@ struct fbcon_ops { | |||
62 | int fg, int bg); | 62 | int fg, int bg); |
63 | void (*clear_margins)(struct vc_data *vc, struct fb_info *info, | 63 | void (*clear_margins)(struct vc_data *vc, struct fb_info *info, |
64 | int bottom_only); | 64 | int bottom_only); |
65 | void (*cursor)(struct vc_data *vc, struct fb_info *info, | 65 | void (*cursor)(struct vc_data *vc, struct fb_info *info, int mode, |
66 | struct display *p, int mode, int softback_lines, | 66 | int softback_lines, int fg, int bg); |
67 | int fg, int bg); | ||
68 | int (*update_start)(struct fb_info *info); | 67 | int (*update_start)(struct fb_info *info); |
69 | int (*rotate_font)(struct fb_info *info, struct vc_data *vc, | 68 | int (*rotate_font)(struct fb_info *info, struct vc_data *vc); |
70 | struct display *p); | ||
71 | struct fb_var_screeninfo var; /* copy of the current fb_var_screeninfo */ | 69 | struct fb_var_screeninfo var; /* copy of the current fb_var_screeninfo */ |
72 | struct timer_list cursor_timer; /* Cursor timer */ | 70 | struct timer_list cursor_timer; /* Cursor timer */ |
73 | struct fb_cursor cursor_state; | 71 | struct fb_cursor cursor_state; |
@@ -173,8 +171,7 @@ struct fbcon_ops { | |||
173 | #define SCROLL_PAN_REDRAW 0x005 | 171 | #define SCROLL_PAN_REDRAW 0x005 |
174 | 172 | ||
175 | #ifdef CONFIG_FB_TILEBLITTING | 173 | #ifdef CONFIG_FB_TILEBLITTING |
176 | extern void fbcon_set_tileops(struct vc_data *vc, struct fb_info *info, | 174 | extern void fbcon_set_tileops(struct vc_data *vc, struct fb_info *info); |
177 | struct display *p, struct fbcon_ops *ops); | ||
178 | #endif | 175 | #endif |
179 | extern void fbcon_set_bitops(struct fbcon_ops *ops); | 176 | extern void fbcon_set_bitops(struct fbcon_ops *ops); |
180 | extern int soft_cursor(struct fb_info *info, struct fb_cursor *cursor); | 177 | extern int soft_cursor(struct fb_info *info, struct fb_cursor *cursor); |
diff --git a/drivers/video/console/fbcon_ccw.c b/drivers/video/console/fbcon_ccw.c index 4952b66ae206..990289a69b78 100644 --- a/drivers/video/console/fbcon_ccw.c +++ b/drivers/video/console/fbcon_ccw.c | |||
@@ -219,19 +219,18 @@ static void ccw_clear_margins(struct vc_data *vc, struct fb_info *info, | |||
219 | } | 219 | } |
220 | } | 220 | } |
221 | 221 | ||
222 | static void ccw_cursor(struct vc_data *vc, struct fb_info *info, | 222 | static void ccw_cursor(struct vc_data *vc, struct fb_info *info, int mode, |
223 | struct display *p, int mode, int softback_lines, | 223 | int softback_lines, int fg, int bg) |
224 | int fg, int bg) | ||
225 | { | 224 | { |
226 | struct fb_cursor cursor; | 225 | struct fb_cursor cursor; |
227 | struct fbcon_ops *ops = (struct fbcon_ops *) info->fbcon_par; | 226 | struct fbcon_ops *ops = info->fbcon_par; |
228 | unsigned short charmask = vc->vc_hi_font_mask ? 0x1ff : 0xff; | 227 | unsigned short charmask = vc->vc_hi_font_mask ? 0x1ff : 0xff; |
229 | int w = (vc->vc_font.height + 7) >> 3, c; | 228 | int w = (vc->vc_font.height + 7) >> 3, c; |
230 | int y = real_y(p, vc->vc_y); | 229 | int y = real_y(ops->p, vc->vc_y); |
231 | int attribute, use_sw = (vc->vc_cursor_type & 0x10); | 230 | int attribute, use_sw = (vc->vc_cursor_type & 0x10); |
232 | int err = 1, dx, dy; | 231 | int err = 1, dx, dy; |
233 | char *src; | 232 | char *src; |
234 | u32 vyres = GETVYRES(p->scrollmode, info); | 233 | u32 vyres = GETVYRES(ops->p->scrollmode, info); |
235 | 234 | ||
236 | if (!ops->fontbuffer) | 235 | if (!ops->fontbuffer) |
237 | return; | 236 | return; |
@@ -303,7 +302,7 @@ static void ccw_cursor(struct vc_data *vc, struct fb_info *info, | |||
303 | } | 302 | } |
304 | 303 | ||
305 | if (cursor.set & FB_CUR_SETSIZE || | 304 | if (cursor.set & FB_CUR_SETSIZE || |
306 | vc->vc_cursor_type != p->cursor_shape || | 305 | vc->vc_cursor_type != ops->p->cursor_shape || |
307 | ops->cursor_state.mask == NULL || | 306 | ops->cursor_state.mask == NULL || |
308 | ops->cursor_reset) { | 307 | ops->cursor_reset) { |
309 | char *tmp, *mask = kmalloc(w*vc->vc_font.width, GFP_ATOMIC); | 308 | char *tmp, *mask = kmalloc(w*vc->vc_font.width, GFP_ATOMIC); |
@@ -323,10 +322,10 @@ static void ccw_cursor(struct vc_data *vc, struct fb_info *info, | |||
323 | kfree(ops->cursor_state.mask); | 322 | kfree(ops->cursor_state.mask); |
324 | ops->cursor_state.mask = mask; | 323 | ops->cursor_state.mask = mask; |
325 | 324 | ||
326 | p->cursor_shape = vc->vc_cursor_type; | 325 | ops->p->cursor_shape = vc->vc_cursor_type; |
327 | cursor.set |= FB_CUR_SETSHAPE; | 326 | cursor.set |= FB_CUR_SETSHAPE; |
328 | 327 | ||
329 | switch (p->cursor_shape & CUR_HWMASK) { | 328 | switch (ops->p->cursor_shape & CUR_HWMASK) { |
330 | case CUR_NONE: | 329 | case CUR_NONE: |
331 | cur_height = 0; | 330 | cur_height = 0; |
332 | break; | 331 | break; |
diff --git a/drivers/video/console/fbcon_cw.c b/drivers/video/console/fbcon_cw.c index 6d92b8456206..d44c5fa515fb 100644 --- a/drivers/video/console/fbcon_cw.c +++ b/drivers/video/console/fbcon_cw.c | |||
@@ -203,19 +203,18 @@ static void cw_clear_margins(struct vc_data *vc, struct fb_info *info, | |||
203 | } | 203 | } |
204 | } | 204 | } |
205 | 205 | ||
206 | static void cw_cursor(struct vc_data *vc, struct fb_info *info, | 206 | static void cw_cursor(struct vc_data *vc, struct fb_info *info, int mode, |
207 | struct display *p, int mode, int softback_lines, | 207 | int softback_lines, int fg, int bg) |
208 | int fg, int bg) | ||
209 | { | 208 | { |
210 | struct fb_cursor cursor; | 209 | struct fb_cursor cursor; |
211 | struct fbcon_ops *ops = (struct fbcon_ops *) info->fbcon_par; | 210 | struct fbcon_ops *ops = info->fbcon_par; |
212 | unsigned short charmask = vc->vc_hi_font_mask ? 0x1ff : 0xff; | 211 | unsigned short charmask = vc->vc_hi_font_mask ? 0x1ff : 0xff; |
213 | int w = (vc->vc_font.height + 7) >> 3, c; | 212 | int w = (vc->vc_font.height + 7) >> 3, c; |
214 | int y = real_y(p, vc->vc_y); | 213 | int y = real_y(ops->p, vc->vc_y); |
215 | int attribute, use_sw = (vc->vc_cursor_type & 0x10); | 214 | int attribute, use_sw = (vc->vc_cursor_type & 0x10); |
216 | int err = 1, dx, dy; | 215 | int err = 1, dx, dy; |
217 | char *src; | 216 | char *src; |
218 | u32 vxres = GETVXRES(p->scrollmode, info); | 217 | u32 vxres = GETVXRES(ops->p->scrollmode, info); |
219 | 218 | ||
220 | if (!ops->fontbuffer) | 219 | if (!ops->fontbuffer) |
221 | return; | 220 | return; |
@@ -287,7 +286,7 @@ static void cw_cursor(struct vc_data *vc, struct fb_info *info, | |||
287 | } | 286 | } |
288 | 287 | ||
289 | if (cursor.set & FB_CUR_SETSIZE || | 288 | if (cursor.set & FB_CUR_SETSIZE || |
290 | vc->vc_cursor_type != p->cursor_shape || | 289 | vc->vc_cursor_type != ops->p->cursor_shape || |
291 | ops->cursor_state.mask == NULL || | 290 | ops->cursor_state.mask == NULL || |
292 | ops->cursor_reset) { | 291 | ops->cursor_reset) { |
293 | char *tmp, *mask = kmalloc(w*vc->vc_font.width, GFP_ATOMIC); | 292 | char *tmp, *mask = kmalloc(w*vc->vc_font.width, GFP_ATOMIC); |
@@ -307,10 +306,10 @@ static void cw_cursor(struct vc_data *vc, struct fb_info *info, | |||
307 | kfree(ops->cursor_state.mask); | 306 | kfree(ops->cursor_state.mask); |
308 | ops->cursor_state.mask = mask; | 307 | ops->cursor_state.mask = mask; |
309 | 308 | ||
310 | p->cursor_shape = vc->vc_cursor_type; | 309 | ops->p->cursor_shape = vc->vc_cursor_type; |
311 | cursor.set |= FB_CUR_SETSHAPE; | 310 | cursor.set |= FB_CUR_SETSHAPE; |
312 | 311 | ||
313 | switch (p->cursor_shape & CUR_HWMASK) { | 312 | switch (ops->p->cursor_shape & CUR_HWMASK) { |
314 | case CUR_NONE: | 313 | case CUR_NONE: |
315 | cur_height = 0; | 314 | cur_height = 0; |
316 | break; | 315 | break; |
diff --git a/drivers/video/console/fbcon_rotate.c b/drivers/video/console/fbcon_rotate.c index ec0dd8fe241c..2dc091fbd5c9 100644 --- a/drivers/video/console/fbcon_rotate.c +++ b/drivers/video/console/fbcon_rotate.c | |||
@@ -18,8 +18,7 @@ | |||
18 | #include "fbcon.h" | 18 | #include "fbcon.h" |
19 | #include "fbcon_rotate.h" | 19 | #include "fbcon_rotate.h" |
20 | 20 | ||
21 | static int fbcon_rotate_font(struct fb_info *info, struct vc_data *vc, | 21 | static int fbcon_rotate_font(struct fb_info *info, struct vc_data *vc) |
22 | struct display *p) | ||
23 | { | 22 | { |
24 | struct fbcon_ops *ops = info->fbcon_par; | 23 | struct fbcon_ops *ops = info->fbcon_par; |
25 | int len, err = 0; | 24 | int len, err = 0; |
@@ -28,12 +27,12 @@ static int fbcon_rotate_font(struct fb_info *info, struct vc_data *vc, | |||
28 | u8 *dst; | 27 | u8 *dst; |
29 | 28 | ||
30 | if (vc->vc_font.data == ops->fontdata && | 29 | if (vc->vc_font.data == ops->fontdata && |
31 | p->con_rotate == ops->cur_rotate) | 30 | ops->p->con_rotate == ops->cur_rotate) |
32 | goto finished; | 31 | goto finished; |
33 | 32 | ||
34 | src = ops->fontdata = vc->vc_font.data; | 33 | src = ops->fontdata = vc->vc_font.data; |
35 | ops->cur_rotate = p->con_rotate; | 34 | ops->cur_rotate = ops->p->con_rotate; |
36 | len = (!p->userfont) ? 256 : FNTCHARCNT(src); | 35 | len = (!ops->p->userfont) ? 256 : FNTCHARCNT(src); |
37 | s_cellsize = ((vc->vc_font.width + 7)/8) * | 36 | s_cellsize = ((vc->vc_font.width + 7)/8) * |
38 | vc->vc_font.height; | 37 | vc->vc_font.height; |
39 | d_cellsize = s_cellsize; | 38 | d_cellsize = s_cellsize; |
diff --git a/drivers/video/console/fbcon_ud.c b/drivers/video/console/fbcon_ud.c index 9dd059e8b645..f56ed068a5bc 100644 --- a/drivers/video/console/fbcon_ud.c +++ b/drivers/video/console/fbcon_ud.c | |||
@@ -249,20 +249,19 @@ static void ud_clear_margins(struct vc_data *vc, struct fb_info *info, | |||
249 | } | 249 | } |
250 | } | 250 | } |
251 | 251 | ||
252 | static void ud_cursor(struct vc_data *vc, struct fb_info *info, | 252 | static void ud_cursor(struct vc_data *vc, struct fb_info *info, int mode, |
253 | struct display *p, int mode, int softback_lines, | 253 | int softback_lines, int fg, int bg) |
254 | int fg, int bg) | ||
255 | { | 254 | { |
256 | struct fb_cursor cursor; | 255 | struct fb_cursor cursor; |
257 | struct fbcon_ops *ops = (struct fbcon_ops *) info->fbcon_par; | 256 | struct fbcon_ops *ops = info->fbcon_par; |
258 | unsigned short charmask = vc->vc_hi_font_mask ? 0x1ff : 0xff; | 257 | unsigned short charmask = vc->vc_hi_font_mask ? 0x1ff : 0xff; |
259 | int w = (vc->vc_font.width + 7) >> 3, c; | 258 | int w = (vc->vc_font.width + 7) >> 3, c; |
260 | int y = real_y(p, vc->vc_y); | 259 | int y = real_y(ops->p, vc->vc_y); |
261 | int attribute, use_sw = (vc->vc_cursor_type & 0x10); | 260 | int attribute, use_sw = (vc->vc_cursor_type & 0x10); |
262 | int err = 1, dx, dy; | 261 | int err = 1, dx, dy; |
263 | char *src; | 262 | char *src; |
264 | u32 vyres = GETVYRES(p->scrollmode, info); | 263 | u32 vyres = GETVYRES(ops->p->scrollmode, info); |
265 | u32 vxres = GETVXRES(p->scrollmode, info); | 264 | u32 vxres = GETVXRES(ops->p->scrollmode, info); |
266 | 265 | ||
267 | if (!ops->fontbuffer) | 266 | if (!ops->fontbuffer) |
268 | return; | 267 | return; |
@@ -334,7 +333,7 @@ static void ud_cursor(struct vc_data *vc, struct fb_info *info, | |||
334 | } | 333 | } |
335 | 334 | ||
336 | if (cursor.set & FB_CUR_SETSIZE || | 335 | if (cursor.set & FB_CUR_SETSIZE || |
337 | vc->vc_cursor_type != p->cursor_shape || | 336 | vc->vc_cursor_type != ops->p->cursor_shape || |
338 | ops->cursor_state.mask == NULL || | 337 | ops->cursor_state.mask == NULL || |
339 | ops->cursor_reset) { | 338 | ops->cursor_reset) { |
340 | char *mask = kmalloc(w*vc->vc_font.height, GFP_ATOMIC); | 339 | char *mask = kmalloc(w*vc->vc_font.height, GFP_ATOMIC); |
@@ -347,10 +346,10 @@ static void ud_cursor(struct vc_data *vc, struct fb_info *info, | |||
347 | kfree(ops->cursor_state.mask); | 346 | kfree(ops->cursor_state.mask); |
348 | ops->cursor_state.mask = mask; | 347 | ops->cursor_state.mask = mask; |
349 | 348 | ||
350 | p->cursor_shape = vc->vc_cursor_type; | 349 | ops->p->cursor_shape = vc->vc_cursor_type; |
351 | cursor.set |= FB_CUR_SETSHAPE; | 350 | cursor.set |= FB_CUR_SETSHAPE; |
352 | 351 | ||
353 | switch (p->cursor_shape & CUR_HWMASK) { | 352 | switch (ops->p->cursor_shape & CUR_HWMASK) { |
354 | case CUR_NONE: | 353 | case CUR_NONE: |
355 | cur_height = 0; | 354 | cur_height = 0; |
356 | break; | 355 | break; |
diff --git a/drivers/video/console/tileblit.c b/drivers/video/console/tileblit.c index cb25324a5635..153352ca9461 100644 --- a/drivers/video/console/tileblit.c +++ b/drivers/video/console/tileblit.c | |||
@@ -80,9 +80,8 @@ static void tile_clear_margins(struct vc_data *vc, struct fb_info *info, | |||
80 | return; | 80 | return; |
81 | } | 81 | } |
82 | 82 | ||
83 | static void tile_cursor(struct vc_data *vc, struct fb_info *info, | 83 | static void tile_cursor(struct vc_data *vc, struct fb_info *info, int mode, |
84 | struct display *p, int mode, int softback_lines, | 84 | int softback_lines, int fg, int bg) |
85 | int fg, int bg) | ||
86 | { | 85 | { |
87 | struct fb_tilecursor cursor; | 86 | struct fb_tilecursor cursor; |
88 | int use_sw = (vc->vc_cursor_type & 0x01); | 87 | int use_sw = (vc->vc_cursor_type & 0x01); |
@@ -130,10 +129,10 @@ static int tile_update_start(struct fb_info *info) | |||
130 | return err; | 129 | return err; |
131 | } | 130 | } |
132 | 131 | ||
133 | void fbcon_set_tileops(struct vc_data *vc, struct fb_info *info, | 132 | void fbcon_set_tileops(struct vc_data *vc, struct fb_info *info) |
134 | struct display *p, struct fbcon_ops *ops) | ||
135 | { | 133 | { |
136 | struct fb_tilemap map; | 134 | struct fb_tilemap map; |
135 | struct fbcon_ops *ops = info->fbcon_par; | ||
137 | 136 | ||
138 | ops->bmove = tile_bmove; | 137 | ops->bmove = tile_bmove; |
139 | ops->clear = tile_clear; | 138 | ops->clear = tile_clear; |
@@ -142,13 +141,13 @@ void fbcon_set_tileops(struct vc_data *vc, struct fb_info *info, | |||
142 | ops->cursor = tile_cursor; | 141 | ops->cursor = tile_cursor; |
143 | ops->update_start = tile_update_start; | 142 | ops->update_start = tile_update_start; |
144 | 143 | ||
145 | if (p) { | 144 | if (ops->p) { |
146 | map.width = vc->vc_font.width; | 145 | map.width = vc->vc_font.width; |
147 | map.height = vc->vc_font.height; | 146 | map.height = vc->vc_font.height; |
148 | map.depth = 1; | 147 | map.depth = 1; |
149 | map.length = (p->userfont) ? | 148 | map.length = (ops->p->userfont) ? |
150 | FNTCHARCNT(p->fontdata) : 256; | 149 | FNTCHARCNT(ops->p->fontdata) : 256; |
151 | map.data = p->fontdata; | 150 | map.data = ops->p->fontdata; |
152 | info->tileops->fb_settile(info, &map); | 151 | info->tileops->fb_settile(info, &map); |
153 | } | 152 | } |
154 | } | 153 | } |