Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 10 Jun 2005 05:12:11 GMT
From:      Marcel Moolenaar <marcel@FreeBSD.org>
To:        Perforce Change Reviews <perforce@freebsd.org>
Subject:   PERFORCE change 78314 for review
Message-ID:  <200506100512.j5A5CBf4012989@repoman.freebsd.org>

next in thread | raw e-mail | index | archive | help

http://perforce.freebsd.org/chv.cgi?CH=78314

Change 78314 by marcel@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));
 }



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200506100512.j5A5CBf4012989>