PERFORCE change 78314 for review
Marcel Moolenaar
marcel at FreeBSD.org
Fri Jun 10 05:12:13 GMT 2005
http://perforce.freebsd.org/chv.cgi?CH=78314
Change 78314 by marcel at marcel_nfs on 2005/06/10 05:11:31
If we're the console, don't (re-)initialize the hardware nor
display the logo, but do attach this device as a vtout device.
We won't be associated with a TE otherwise.
Affected files ...
.. //depot/projects/tty/sys/dev/vtc/hw/vga/vga.c#5 edit
Differences ...
==== //depot/projects/tty/sys/dev/vtc/hw/vga/vga.c#5 (text+ko) ====
@@ -464,20 +464,21 @@
vga_attach(device_t dev)
{
struct vga_softc *sc;
+ uintptr_t ofs;
int error;
sc = device_get_softc(dev);
- if (sc->vga_console)
- return (0);
+ if (!sc->vga_console) {
+ error = vga_init(sc);
+ if (error)
+ return (error);
- error = vga_init(sc);
- if (error)
- return (error);
-
- vga_bitblt_h4tofb(sc, vtc_logo4_image,
- 640 * (480 - vtc_logo4_height) / 2 + (640 - vtc_logo4_width) / 2,
- vtc_logo4_width, vtc_logo4_height);
+ ofs = 640 * (480 - vtc_logo4_height) / 2 +
+ (640 - vtc_logo4_width) / 2;
+ vga_bitblt_h4tofb(sc, vtc_logo4_image, ofs, vtc_logo4_width,
+ vtc_logo4_height);
+ }
return (vtc_vtout_attach(sc, vga_bitblt, 640, 480));
}
More information about the p4-projects
mailing list