Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 24364
b: refs/heads/master
c: 2115aea
h: refs/heads/master
v: v3
  • Loading branch information
Samuel Thibault authored and Linus Torvalds committed Mar 27, 2006
1 parent 65e188a commit bb968e2
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 9 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: c94ded6e602594c8e66fd5b1ba832d5327f5c103
refs/heads/master: 2115aea8185c8987b7688111953322742bd8795c
27 changes: 19 additions & 8 deletions trunk/drivers/video/console/vgacon.c
Original file line number Diff line number Diff line change
Expand Up @@ -433,17 +433,22 @@ static void vgacon_set_cursor_size(int xpos, int from, int to)
cursor_size_lastto = to;

spin_lock_irqsave(&vga_lock, flags);
outb_p(0x0a, vga_video_port_reg); /* Cursor start */
curs = inb_p(vga_video_port_val);
outb_p(0x0b, vga_video_port_reg); /* Cursor end */
cure = inb_p(vga_video_port_val);
if (vga_video_type >= VIDEO_TYPE_VGAC) {
outb_p(VGA_CRTC_CURSOR_START, vga_video_port_reg);
curs = inb_p(vga_video_port_val);
outb_p(VGA_CRTC_CURSOR_END, vga_video_port_reg);
cure = inb_p(vga_video_port_val);
} else {
curs = 0;
cure = 0;
}

curs = (curs & 0xc0) | from;
cure = (cure & 0xe0) | to;

outb_p(0x0a, vga_video_port_reg); /* Cursor start */
outb_p(VGA_CRTC_CURSOR_START, vga_video_port_reg);
outb_p(curs, vga_video_port_val);
outb_p(0x0b, vga_video_port_reg); /* Cursor end */
outb_p(VGA_CRTC_CURSOR_END, vga_video_port_reg);
outb_p(cure, vga_video_port_val);
spin_unlock_irqrestore(&vga_lock, flags);
}
Expand All @@ -455,7 +460,10 @@ static void vgacon_cursor(struct vc_data *c, int mode)
switch (mode) {
case CM_ERASE:
write_vga(14, (c->vc_pos - vga_vram_base) / 2);
vgacon_set_cursor_size(c->vc_x, 31, 30);
if (vga_video_type >= VIDEO_TYPE_VGAC)
vgacon_set_cursor_size(c->vc_x, 31, 30);
else
vgacon_set_cursor_size(c->vc_x, 31, 31);
break;

case CM_MOVE:
Expand Down Expand Up @@ -493,7 +501,10 @@ static void vgacon_cursor(struct vc_data *c, int mode)
10 ? 1 : 2));
break;
case CUR_NONE:
vgacon_set_cursor_size(c->vc_x, 31, 30);
if (vga_video_type >= VIDEO_TYPE_VGAC)
vgacon_set_cursor_size(c->vc_x, 31, 30);
else
vgacon_set_cursor_size(c->vc_x, 31, 31);
break;
default:
vgacon_set_cursor_size(c->vc_x, 1,
Expand Down

0 comments on commit bb968e2

Please sign in to comment.