diff options
Diffstat (limited to 'drivers/video/console/vgacon.c')
-rw-r--r-- | drivers/video/console/vgacon.c | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/drivers/video/console/vgacon.c b/drivers/video/console/vgacon.c index 5855d17d19ac..9d8feac67637 100644 --- a/drivers/video/console/vgacon.c +++ b/drivers/video/console/vgacon.c | |||
@@ -42,6 +42,7 @@ | |||
42 | #include <linux/kd.h> | 42 | #include <linux/kd.h> |
43 | #include <linux/slab.h> | 43 | #include <linux/slab.h> |
44 | #include <linux/vt_kern.h> | 44 | #include <linux/vt_kern.h> |
45 | #include <linux/sched.h> | ||
45 | #include <linux/selection.h> | 46 | #include <linux/selection.h> |
46 | #include <linux/spinlock.h> | 47 | #include <linux/spinlock.h> |
47 | #include <linux/ioport.h> | 48 | #include <linux/ioport.h> |
@@ -1124,11 +1125,15 @@ static int vgacon_do_font_op(struct vgastate *state,char *arg,int set,int ch512) | |||
1124 | 1125 | ||
1125 | if (arg) { | 1126 | if (arg) { |
1126 | if (set) | 1127 | if (set) |
1127 | for (i = 0; i < cmapsz; i++) | 1128 | for (i = 0; i < cmapsz; i++) { |
1128 | vga_writeb(arg[i], charmap + i); | 1129 | vga_writeb(arg[i], charmap + i); |
1130 | cond_resched(); | ||
1131 | } | ||
1129 | else | 1132 | else |
1130 | for (i = 0; i < cmapsz; i++) | 1133 | for (i = 0; i < cmapsz; i++) { |
1131 | arg[i] = vga_readb(charmap + i); | 1134 | arg[i] = vga_readb(charmap + i); |
1135 | cond_resched(); | ||
1136 | } | ||
1132 | 1137 | ||
1133 | /* | 1138 | /* |
1134 | * In 512-character mode, the character map is not contiguous if | 1139 | * In 512-character mode, the character map is not contiguous if |
@@ -1139,11 +1144,15 @@ static int vgacon_do_font_op(struct vgastate *state,char *arg,int set,int ch512) | |||
1139 | charmap += 2 * cmapsz; | 1144 | charmap += 2 * cmapsz; |
1140 | arg += cmapsz; | 1145 | arg += cmapsz; |
1141 | if (set) | 1146 | if (set) |
1142 | for (i = 0; i < cmapsz; i++) | 1147 | for (i = 0; i < cmapsz; i++) { |
1143 | vga_writeb(arg[i], charmap + i); | 1148 | vga_writeb(arg[i], charmap + i); |
1149 | cond_resched(); | ||
1150 | } | ||
1144 | else | 1151 | else |
1145 | for (i = 0; i < cmapsz; i++) | 1152 | for (i = 0; i < cmapsz; i++) { |
1146 | arg[i] = vga_readb(charmap + i); | 1153 | arg[i] = vga_readb(charmap + i); |
1154 | cond_resched(); | ||
1155 | } | ||
1147 | } | 1156 | } |
1148 | } | 1157 | } |
1149 | 1158 | ||