From: Johannes G. <joh...@gm...> - 2004-09-22 21:35:26
|
Dear list members, thank you very much for your replies! Because Vojtech Pavlik wrote that it has to do with x86-64 mainboards I installed on the same hardware (AMD64+K8S8XMainboard+NVidiaFX5200+MGAMillenium) 2.4.27 kernel for i386 architecture with Jean-Daniel Paugets patch. lspci -v showed: 00:0a.0 VGA compatible controller: Matrox Graphics, Inc. MGA 2064W [Millennium] (rev 01) (prog-if 00 [VGA]) Flags: stepping, medium devsel, IRQ 5 Memory at 40000000 (32-bit, non-prefetchable) [disabled] [size=16K] Memory at 40800000 (32-bit, prefetchable) [disabled] [size=8M] Expansion ROM at ffff0000 [disabled] [size=64K] ... 01:00.0 VGA compatible controller: nVidia Corporation NV34 [GeForce FX 5200] (rev a1) (prog-if 00 [VGA]) Flags: bus master, 66Mhz, medium devsel, latency 248, IRQ 11 Memory at fd000000 (32-bit, non-prefetchable) [size=16M] Memory at f0000000 (32-bit, prefetchable) [size=128M] Expansion ROM at feae0000 [disabled] [size=128K] Capabilities: [60] Power Management version 2 Capabilities: [44] AGP version 3.0 I wrote echo 1 > /proc/bus/pci/hackvideo and started the second XServer from an xterm on the first XServer: X :1 -layout MGA vt17 which gave me the error (EE) MGA(0): Cannot read V_BIOS I must point out that I used XFree86 4.0.3.1 from SuSE 9.0 distribution without prefbusid-patch. Nothing was displayed on the second monitor and I had to kill -9 the second XServer from another xterm, it did not react on <Ctrl-Alt-Backspace> from the second keyboard. When I stoped all XServers and started only one Xserver with X -layout MGA from the console both monitors went blank, the leds on my keyboard did not work any more and I had to turn the power off. Yours, Johannes Gajdosik ----------------------------- Ludovic Pollet wrote: > Does lspci returns the same before and after you start the X server ? Yes, it does. ---------------------------- Petr Vandrovec wrote: > > When I start X on the MGA I get the error > > (WW) ****INVALID MEM ALLOCATION**** b: 0xffffc000 e: 0xffffc000 > > correcting > > (EE) MGA(0): No valid MMIO address in PCI config space > > (EE) Screen(s) found, but none have a usable configuration. > > If you'll build matroxfb into kernel, it should force kernel to > allocate > MMIO regions for Matrox card, and it will also take a care about > initializing > matrox's hardware during bootup (X do not contain that code). Im sorry but make menuconfig tells me: Support for frame buffer devices (NOT IMPLEMENTED) with the 2.4.27 bruby kernel. But I will try 2.6.8.1 later. ------------ Aivils wrote: >> I have kernel 2.4.27 for AMD64 (xf86_64) and use Jean-Daniel . >> Paugets >> patch which I have slightly modified by replacing "i386" with >> "x86_64" >> where it seemed appropriate to me. > > --- arch/x86_64/kernel/setup.c~ 2004-08-19 14:40:13.000000000 +0300 > +++ arch/x86_64/kernel/setup.c 2004-09-22 09:46:59.952898432 +0300 > @@ -577,7 +577,7 @@ void __init setup_arch(char **cmdline_p) > iommu_hole_init(); > #endif > > -#ifdef CONFIG_VT > +#if 0 > #if defined(CONFIG_VGA_CONSOLE) > conswitchp = &vga_con; > #elif defined(CONFIG_DUMMY_CONSOLE) Thanks very much for the patch. I had to remove the whole block in order to make it compile. >> I had to hack a little on IA32 >> support, but finally the result was quite ok for me. I wanted to ask you about arch/x86_64/ia32/ia32_ioctl.c. I did the following: ---------------------------------------------------- static int do_fontx_ioctl(unsigned int fd, int cmd, struct consolefontdesc32 *user_cfd, struct file *file) { struct consolefontdesc cfdarg; struct console_font_op op; int i, perm; perm = vt_check(file); if (perm < 0) return perm; if (copy_from_user(&cfdarg, user_cfd, sizeof(struct consolefontdesc32))) return -EFAULT; cfdarg.chardata = (unsigned char *) A(((struct consolefontdesc32 *)&cfdarg)->chardata); switch (cmd) { case PIO_FONTX: /*gaj if (!perm) */ return -EPERM; /* op.op = KD_FONT_OP_SET; op.flags = 0; op.width = 8; op.height = cfdarg.charheight; op.charcount = cfdarg.charcount; op.data = cfdarg.chardata; return con_font_op(fg_console, &op); */ case GIO_FONTX: /* gaj if (!cfdarg.chardata) */ return 0; /* op.op = KD_FONT_OP_GET; op.flags = 0; op.width = 8; op.height = cfdarg.charheight; op.charcount = cfdarg.charcount; op.data = cfdarg.chardata; i = con_font_op(fg_console, &op); if (i) return i; cfdarg.charheight = op.height; cfdarg.charcount = op.charcount; ((struct consolefontdesc32 *)&cfdarg)->chardata = (unsigned long)cfdarg.chardata; if (copy_to_user(user_cfd, &cfdarg, sizeof(struct consolefontdesc32))) return -EFAULT; return 0; */ } return -EINVAL; } static int do_kdfontop_ioctl(unsigned int fd, unsigned int cmd, struct console_font_op32 *fontop, struct file *file) { struct console_font_op op; int perm = vt_check(file), i; struct vt_struct *vt; if (perm < 0) return perm; if (copy_from_user(&op, (void *) fontop, sizeof(struct console_font_op32))) return -EFAULT; if (!perm && op.op != KD_FONT_OP_GET) return -EPERM; op.data = (unsigned char *) A(((struct console_font_op32 *)&op)->data); op.flags |= KD_FONT_FLAG_OLD; vt = (struct vt_struct *)((struct tty_struct *) file->private_data)->driver_data; /*gaj i = con_font_op(vt->vc_num, &op); */ i = con_font_op(vt->fg_console->vc_num, &op); if (i) return i; ((struct console_font_op32 *)&op)->data = (unsigned long)op.data; if (copy_to_user((void *) fontop, &op, sizeof(struct console_font_op32))) return -EFAULT; return 0; } static int do_unimap_ioctl(unsigned int fd, unsigned int cmd, struct unimapdesc32 *user_ud, struct file *file) { struct unimapdesc32 tmp; int perm = vt_check(file); if (perm < 0) return perm; if (copy_from_user(&tmp, user_ud, sizeof tmp)) return -EFAULT; switch (cmd) { case PIO_UNIMAP: /* gaj if (!perm) */ return -EPERM; /* return con_set_unimap(fg_console, tmp.entry_ct, (struct unipair *)A(tmp.entries)); */ case GIO_UNIMAP: return -EPERM; /* gaj return con_get_unimap(fg_console, tmp.entry_ct, &(user_ud->entry_ct), (struct unipair *)A(tmp.entries)); */ } return 0; } -------------------------------------------------------------------- I do not care much about fonts on the console but you certainly know a better solution. Also thank you for your hint using 2.6.8 kernel, I will try that. |