From: Aivils S. <Aiv...@un...> - 2002-11-08 12:54:14
|
Hi, James Yes it's boot! Around the code popup currcons mismatch. find_vc() vc_allocate() good only for one console. small patch allow me start ruby with single VGA, single XFree. diff -Nurp linux-2.5.45/drivers/char/consolemap.c linux-2.5.45-chg/drivers/char/consolemap.c --- linux-2.5.45/drivers/char/consolemap.c Sat Nov 2 01:27:32 2002 +++ linux-2.5.45-chg/drivers/char/consolemap.c Fri Nov 8 00:44:00 2002 @@ -234,7 +234,7 @@ static void update_user_maps(struct vc_d struct uni_pagedir *p, *q = NULL; int i; - for (i = 0; i < MAX_NR_CONSOLES; i++) { + for (i = 0; i < MAX_NR_USER_CONSOLES; i++) { struct vc_data *tmp = vc->display_fg->vc_cons[i]; if (!tmp) @@ -379,7 +379,7 @@ static int con_unify_unimap(struct vc_da struct uni_pagedir *q; int i, j, k; - for (i = 0; i < MAX_NR_CONSOLES; i++) { + for (i = 0; i < MAX_NR_USER_CONSOLES; i++) { struct vc_data *tmp = vc->display_fg->vc_cons[i]; if (!tmp) @@ -670,7 +670,7 @@ console_map_init(void) struct vt_struct *vt = vt_cons; int i; - for (i = 0; i < MAX_NR_CONSOLES; i++) { + for (i = 0; i < MAX_NR_USER_CONSOLES; i++) { struct vc_data *vc = vt->vc_cons[i]; if (vc && !*vc->vc_uni_pagedir_loc) diff -Nurp linux-2.5.45/drivers/char/keyboard.c linux-2.5.45-chg/drivers/char/keyboard.c --- linux-2.5.45/drivers/char/keyboard.c Sat Nov 2 01:27:32 2002 +++ linux-2.5.45-chg/drivers/char/keyboard.c Thu Nov 7 23:24:37 2002 @@ -45,6 +45,7 @@ extern void ctrl_alt_del(void); void compute_shiftstate(void); struct pt_regs *kbd_pt_regs; EXPORT_SYMBOL(kbd_pt_regs); +extern int do_poke_blanked_console; /* * Handler Tables. diff -Nurp linux-2.5.45/drivers/char/vc_screen.c linux-2.5.45-chg/drivers/char/vc_screen.c --- linux-2.5.45/drivers/char/vc_screen.c Sat Nov 2 01:27:32 2002 +++ linux-2.5.45-chg/drivers/char/vc_screen.c Fri Nov 8 00:52:08 2002 @@ -91,7 +91,7 @@ vcs_size(struct inode *inode) else currcons--; - vc = vt_cons->vc_cons[currcons]; + vc = vt_cons->vc_cons[currcons - vt_cons->first_vc]; if (!vc) return -ENXIO; @@ -168,7 +168,7 @@ vcs_read(struct file *file, char *buf, s } ret = -ENXIO; - vc = vt_cons->vc_cons[currcons]; + vc = vt_cons->vc_cons[currcons - vt_cons->first_vc]; if (!vc) goto unlock_out; @@ -343,7 +343,7 @@ vcs_write(struct file *file, const char } ret = -ENXIO; - vc = vt_cons->vc_cons[currcons]; + vc = vt_cons->vc_cons[currcons - vt_cons->first_vc]; if (!vc) goto unlock_out; @@ -504,7 +504,7 @@ vcs_open(struct inode *inode, struct fil { unsigned int currcons = minor(inode->i_rdev) & 127; - if (currcons && !vt_cons->vc_cons[currcons-1]) + if (currcons && !vt_cons->vc_cons[currcons-1-vt_cons->first_vc]) return -ENXIO; return 0; } diff -Nurp linux-2.5.45/drivers/char/vt_ioctl.c linux-2.5.45-chg/drivers/char/vt_ioctl.c --- linux-2.5.45/drivers/char/vt_ioctl.c Sat Nov 2 01:27:32 2002 +++ linux-2.5.45-chg/drivers/char/vt_ioctl.c Fri Nov 8 01:01:08 2002 @@ -1094,7 +1094,7 @@ int vt_ioctl(struct tty_struct *tty, str return i; } } - + vc->vt_newvt = -1; /* * When we actually do the console switch, * make sure we are atomic with respect to diff -Nurp linux-2.5.45/drivers/video/console/Makefile linux-2.5.45-chg/drivers/video/console/Makefile --- linux-2.5.45/drivers/video/console/Makefile Sat Nov 2 01:51:14 2002 +++ linux-2.5.45-chg/drivers/video/console/Makefile Thu Nov 7 23:33:24 2002 @@ -11,7 +11,7 @@ export-objs := fbcon.o fbcon-accel.o # Each configuration option enables a list of files. -obj-$(CONFIG_DUMMY_CONSOLE) += dummycon.o +#obj-$(CONFIG_DUMMY_CONSOLE) += dummycon.o obj-$(CONFIG_SGI_NEWPORT_CONSOLE) += newport_con.o obj-$(CONFIG_PROM_CONSOLE) += promcon.o promcon_tbl.o obj-$(CONFIG_STI_CONSOLE) += sticon.o sticore.o Aivils Stoss |
From: James S. <jsi...@ph...> - 2002-11-08 19:54:52
|
> Yes it's boot! > > Around the code popup currcons mismatch. > find_vc() vc_allocate() good only for one console. I know :-( The current problem is the beeper and the keyboard. In the original ruby we didn't have the beeper converted over to the input api. This made life easier. Now we do. This means both the keyboard and beeper are registered to the keyboard console handler. Because the old ruby code assumed it was always a keyboard this means the beeper is seen as a keyboard. Of course this is bad!! So what is the solution? Well first we to see what possible combinations we can have. They are: 1) The beeper is built into the keyboard. Sparc keyboard i.e 2) Seperate beepers but we have more than one. 3) Only one beeper. Now 1 and 3 are very common. The first solution I thought of was having two struct input_handlers in struct vt_struct. One for keyboard and the second for the beeper. For the keyboard with the built in speaker both handlers would point to the same device. For the PC we have to attach the speaker to the first VT we find without a speaker. This can be easliy handled by first testing the incoming input device handles keys. Then we test it right away to see if it has a speaker. Now the question is what do we do for a "global" speaker. For example I have two PS/2 keybaords but one PC speaker. Do we share it.Then there is the issue if two users want to reprogram the beeper to be at two different rates. The hardware can't be at two different rates at the same time. Vojtech do you have any ideas on how to handle this? > small patch allow me start ruby with single VGA, single XFree. I will apply the patches tomorrow morning. Thanks. |
From: Vojtech P. <vo...@su...> - 2002-11-09 09:47:34
|
On Fri, Nov 08, 2002 at 07:54:41PM +0000, James Simmons wrote: > > Yes it's boot! > > > > Around the code popup currcons mismatch. > > find_vc() vc_allocate() good only for one console. > > I know :-( The current problem is the beeper and the keyboard. In the > original ruby we didn't have the beeper converted over to the input api. > This made life easier. Now we do. This means both the keyboard and beeper > are registered to the keyboard console handler. Because the old ruby code > assumed it was always a keyboard this means the beeper is seen as a > keyboard. Of course this is bad!! So what is the solution? > > Well first we to see what possible combinations we can have. They are: > > 1) The beeper is built into the keyboard. Sparc keyboard i.e > > 2) Seperate beepers but we have more than one. > > 3) Only one beeper. > > Now 1 and 3 are very common. The first solution I thought of was having > two struct input_handlers in struct vt_struct. One for keyboard and the > second for the beeper. For the keyboard with the built in speaker both > handlers would point to the same device. For the PC we have to attach the > speaker to the first VT we find without a speaker. This can be easliy > handled by first testing the incoming input device handles keys. Then we > test it right away to see if it has a speaker. Now the question is what do > we do for a "global" speaker. For example I have two PS/2 keybaords but > one PC speaker. Do we share it.Then there is the issue if two users want > to reprogram the beeper to be at two different rates. The hardware can't > be at two different rates at the same time. Vojtech do you have any ideas > on how to handle this? I would assign the beeper to the first keyboard and make it all configurable by the user - you really only need to have one keyboard, one screen, and one beeper running after boot and the rest (reassignment, etc) can be taken care of by the init scripts. > > small patch allow me start ruby with single VGA, single XFree. > > I will apply the patches tomorrow morning. Thanks. -- Vojtech Pavlik SuSE Labs |
From: James S. <jsi...@ph...> - 2002-11-11 19:03:56
|
> Hi, James > > Yes it's boot! > > Around the code popup currcons mismatch. > find_vc() vc_allocate() good only for one console. Applied. Will be fixing these bugs today. Once I fix the PC speaker issue we will have multihead back. I will update dummycon.c today to the new console changes so you can have multihead. |