Re: Unexpected kernel device dependency for 'vga* at pci?'
Thanks for the explanation. It would seem to me that the vga console code should be separated from the rest of the vga driver. Then it would be rather easy to include the console code whenever vga or radeon or the Intel equivalent is configured. I've also noticed that even though no genfb is included in my config file, the generated file genfb.h sets NGENFB = 1, while the vga.h file contains NVGA = 0. Some how, this feels like a hack, in order to avoid making a similar split (console vs non-console) in the genfb code. Any way, thanks for all of the extra eyes looking at this, and all the explanations. At least now I know why I need the vga driver, even if I'd prefer to omit it. On Sun, 10 Jul 2016, Michael van Elst wrote: k...@munnari.oz.au (Robert Elz) writes: | While doing this, I've discovered that a radeondrmkmsfb0-based kernel | requires that I retain the | vga* at pci? dev ? func ? | line in the configuration, even though no such device is ever attached. The VGA driver is used very early as a console, this happens before autoconf and before the driver is really attached. For this you only need the VGA driver included in the kernel. The kernel would panic without the vga driver on conventional hardware, but there is a bug in the code. If the VGA driver is included, the radeon code will detach and reattach it as a console. When the VGA driver is not included, nothing like that happens, and the VGA hardware probably isn't mapped anywhere. In my (intel, not radeon) driver I detach the VGA console #if NVGA > 0 iaa.iaa_console = vga_cndetach() ? true : false; #else iaa.iaa_console = false; #endif and then map the hardware and attach a wsdisplay as if no VGA driver had existed. -- -- Michael van Elst Internet: mlel...@serpens.de "A potential Snark may lurk in every tree." !DSPAM:578273e731621319712218! +--+--++ | Paul Goyette | PGP Key fingerprint: | E-mail addresses: | | (Retired)| FA29 0E3B 35AF E8AE 6651 | paul at whooppee.com | | Kernel Developer | 0786 F758 55DE 53BA 7731 | pgoyette at netbsd.org | +--+--++
Re: Unexpected kernel device dependency for 'vga* at pci?'
k...@munnari.oz.au (Robert Elz) writes: >And as I (kind of said) I never actually tried a config with the "vga* at pci?" >config included but the wsdisplay* at vga? console ?" omitted, it was both >or neither for me (just the way it worked out.) Initially VGA gets attached as console. This has nothing to do with the config file. It's in the MD consinit() code. This also attaches an initial wsdisplay screen. Later VGA may attach at PCI. This provides the regular attachment and takes over the initial console screen. Later VGA may attach at ISA. This fails if there is already a PCI attachment because the hardware is already mapped and cannot be mapped again. If there is a radeon driver, it will take priority over the PCI attachment. No VGA attaches here but VGA is still the console. Then it gets a bit kludgy -- -- Michael van Elst Internet: mlel...@serpens.de "A potential Snark may lurk in every tree."
Re: Unexpected kernel device dependency for 'vga* at pci?'
k...@munnari.oz.au (Robert Elz) writes: > | While doing this, I've discovered that a radeondrmkmsfb0-based kernel > | requires that I retain the > |vga* at pci? dev ? func ? > | line in the configuration, even though no such device is ever attached. The VGA driver is used very early as a console, this happens before autoconf and before the driver is really attached. For this you only need the VGA driver included in the kernel. The kernel would panic without the vga driver on conventional hardware, but there is a bug in the code. If the VGA driver is included, the radeon code will detach and reattach it as a console. When the VGA driver is not included, nothing like that happens, and the VGA hardware probably isn't mapped anywhere. In my (intel, not radeon) driver I detach the VGA console #if NVGA > 0 iaa.iaa_console = vga_cndetach() ? true : false; #else iaa.iaa_console = false; #endif and then map the hardware and attach a wsdisplay as if no VGA driver had existed. -- -- Michael van Elst Internet: mlel...@serpens.de "A potential Snark may lurk in every tree."
Re: Unexpected kernel device dependency for 'vga* at pci?'
Date:Sun, 10 Jul 2016 08:32:24 +0800 (PHT) From:Paul GoyetteMessage-ID: | "Common" yes, but they should not be normal. The whole point of the | config(1) mess is to be able to properly specify dependencies. Well, really, the point was to make it easier to build the config files, that before config(1 or 8) appeared used to be built by hand. Adding forms of dependency handling has been a more recent add on - and config files have (since I first saw one I think) never been "anything goes" - there have always been "of course if you config X you also need Y" type stuff (apart from the obvious ones that config itself complains about if you mess up, like a device at pci, and no pci at anything). | As I indicated in a follow-up Email, I still need to include a | | vga* at pci? dev ? func ? | | to avoid a compiler error. But I have already removed the | | wsdisplay* at vga? console ? | | line. The only wsdisplay line I currently have is | | wsdisplay* at radeondrmkmsfb0 That's interesting, I don't have that (or anything like it) in my config at all - not even commented out. What I have is (aside from the "at vga?" line) is ... wsdisplay* at wsemuldisplaydev? That one seems to be enough for the kernel to config ... wsdisplay0 at intelfb0 kbdmux 1: console (default, vt100 emulation) The other related config that I have are ... i915drmkms* at pci? dev ? function ? intelfb*at intelfbbus? | which, according to the dmesg, is where it actually gets attached! which is what gets attached in my case. I assume one of the files files has something that makes an intelfb attach a wsemuldisplaydev, or that the latter is some kind of macro device for the various fb devices. But I am just guessing... And as I (kind of said) I never actually tried a config with the "vga* at pci?" config included but the wsdisplay* at vga? console ?" omitted, it was both or neither for me (just the way it worked out.) kre
Re: Unexpected kernel device dependency for 'vga* at pci?'
On Sun, 10 Jul 2016, Robert Elz wrote: Date:Sun, 10 Jul 2016 07:00:11 +0800 (PHT) From:Paul GoyetteMessage-ID: | While doing this, I've discovered that a radeondrmkmsfb0-based kernel | requires that I retain the | | vga* at pci? dev ? func ? | | line in the configuration, even though no such device is ever attached. I saw the exact same problem a month or so ago, but with a system using integrated intel graphics (core i3 processor). I didn't bother to mention it as config file inter-dependencies and weirdness are just "normal" ... "Common" yes, but they should not be normal. The whole point of the config(1) mess is to be able to properly specify dependencies. I think I concluded/assumed that the issue may have really related to the wsdisplay* at vga? console ? line that also had to be deleted (there being no vga? at anything left in the config - or in the console messages on a GENERIC boot) leaving nothing marked as "console" - whether that's actually true or not I didn't bother to find out - I put that entry back, and so had to also return the vga? at .. config, and after that, it all worked. As I indicated in a follow-up Email, I still need to include a vga* at pci? dev ? func ? to avoid a compiler error. But I have already removed the wsdisplay* at vga? console ? line. The only wsdisplay line I currently have is wsdisplay* at radeondrmkmsfb0 which, according to the dmesg, is where it actually gets attached! +--+--++ | Paul Goyette | PGP Key fingerprint: | E-mail addresses: | | (Retired)| FA29 0E3B 35AF E8AE 6651 | paul at whooppee.com | | Kernel Developer | 0786 F758 55DE 53BA 7731 | pgoyette at netbsd.org | +--+--++
Re: Unexpected kernel device dependency for 'vga* at pci?'
Date:Sun, 10 Jul 2016 07:00:11 +0800 (PHT) From:Paul GoyetteMessage-ID: | While doing this, I've discovered that a radeondrmkmsfb0-based kernel | requires that I retain the | | vga* at pci? dev ? func ? | | line in the configuration, even though no such device is ever attached. I saw the exact same problem a month or so ago, but with a system using integrated intel graphics (core i3 processor). I didn't bother to mention it as config file inter-dependencies and weirdness are just "normal" ... I think I concluded/assumed that the issue may have really related to the wsdisplay* at vga? console ? line that also had to be deleted (there being no vga? at anything left in the config - or in the console messages on a GENERIC boot) leaving nothing marked as "console" - whether that's actually true or not I didn't bother to find out - I put that entry back, and so had to also return the vga? at .. config, and after that, it all worked. When it wasn't working, the symptoms were as you described (though I probably did less tests.) kre