From owner-p4-projects@FreeBSD.ORG Fri Jun 10 05:12:12 2005 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 66C3A16A420; Fri, 10 Jun 2005 05:12:12 +0000 (GMT) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 3EAB316A41C for ; Fri, 10 Jun 2005 05:12:12 +0000 (GMT) (envelope-from marcel@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 1442C43D1F for ; Fri, 10 Jun 2005 05:12:12 +0000 (GMT) (envelope-from marcel@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id j5A5CBw9012992 for ; Fri, 10 Jun 2005 05:12:11 GMT (envelope-from marcel@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id j5A5CBf4012989 for perforce@freebsd.org; Fri, 10 Jun 2005 05:12:11 GMT (envelope-from marcel@freebsd.org) Date: Fri, 10 Jun 2005 05:12:11 GMT Message-Id: <200506100512.j5A5CBf4012989@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to marcel@freebsd.org using -f From: Marcel Moolenaar To: Perforce Change Reviews Cc: Subject: PERFORCE change 78314 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 10 Jun 2005 05:12:13 -0000 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)); }