]>
Commit | Line | Data |
---|---|---|
2cb7cef9 BS |
1 | From: Dirk Mueller <dmueller@novell.com> |
2 | Subject: setfont breaks first Xserver start | |
3 | References: 302010 | |
4 | Patch-Mainline: No | |
5 | ||
6 | The patch prevents setfont from accessing vga registers on the card when | |
7 | the card is in graphics mode KD_GRAPHICS as we assume, that someone else (ie. | |
8 | the Xserver) is in charge of the HW in which case accessing the vga registers | |
9 | may (at best) have no effect (not even the desired one) or (at worst) interfer | |
10 | with settings the graphics driver has made. | |
11 | ||
12 | Signed-off-by: Hannes Reinecke <hare@suse.de> | |
13 | ||
14 | --- | |
15 | drivers/video/console/vgacon.c | 4 ++-- | |
16 | 1 file changed, 2 insertions(+), 2 deletions(-) | |
17 | ||
18 | --- a/drivers/video/console/vgacon.c | |
19 | +++ b/drivers/video/console/vgacon.c | |
20 | @@ -1240,7 +1240,7 @@ static int vgacon_font_set(struct vc_dat | |
21 | unsigned charcount = font->charcount; | |
22 | int rc; | |
23 | ||
24 | - if (vga_video_type < VIDEO_TYPE_EGAM) | |
25 | + if (vga_video_type < VIDEO_TYPE_EGAM || vga_is_gfx) | |
26 | return -EINVAL; | |
27 | ||
28 | if (font->width != VGA_FONTWIDTH || | |
29 | @@ -1258,7 +1258,7 @@ static int vgacon_font_set(struct vc_dat | |
30 | ||
31 | static int vgacon_font_get(struct vc_data *c, struct console_font *font) | |
32 | { | |
33 | - if (vga_video_type < VIDEO_TYPE_EGAM) | |
34 | + if (vga_video_type < VIDEO_TYPE_EGAM || vga_is_gfx) | |
35 | return -EINVAL; | |
36 | ||
37 | font->width = VGA_FONTWIDTH; |