Current-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

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:

kre%munnari.OZ.AU@localhost (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: mlelstv%serpens.de@localhost
                               "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 |
+------------------+--------------------------+------------------------+


Home | Main Index | Thread Index | Old Index