From owner-cvs-src@FreeBSD.ORG Sat May 21 20:47:38 2005 Return-Path: Delivered-To: cvs-src@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 6D27016A4CE; Sat, 21 May 2005 20:47:38 +0000 (GMT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 4A4B143D48; Sat, 21 May 2005 20:47:38 +0000 (GMT) (envelope-from marius@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 j4LKlcxq084195; Sat, 21 May 2005 20:47:38 GMT (envelope-from marius@repoman.freebsd.org) Received: (from marius@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id j4LKlc9t084194; Sat, 21 May 2005 20:47:38 GMT (envelope-from marius) Message-Id: <200505212047.j4LKlc9t084194@repoman.freebsd.org> From: Marius Strobl Date: Sat, 21 May 2005 20:47:38 +0000 (UTC) To: src-committers@FreeBSD.org, cvs-src@FreeBSD.org, cvs-all@FreeBSD.org X-FreeBSD-CVS-Branch: HEAD Subject: cvs commit: src/sys/dev/fb machfb.c machfbreg.h X-BeenThere: cvs-src@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: CVS commit messages for the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 21 May 2005 20:47:38 -0000 marius 2005-05-21 20:47:38 UTC FreeBSD src repository Added files: sys/dev/fb machfb.c machfbreg.h Log: Add machfb(4), a driver for ATI Mach64 graphics chips intended for use with syscons(4) on sparc64. It's based on the respective NetBSD driver with some additional info (initialisation/hardware cursor) obtained from the Xorg 'ati' driver and some ideas taken from creator(4). ATI Mach64 chips ("ATI Rage") are quite common as low- end graphics chips in PCI-based sun4u machines and are used on-board in e.g. Blade 100 and a couple of OEM products. Most if not all of the Sun PGX add-on cards family (descriptions of the PGX32 are conflicting but most say it's a Rage Pro) are also based on these chips. Depending on the version of the OBP Mach64 cards destined for use in i386 machines also work in sun4u machines. The driver uses pixel mode with hardware acceleration as far as syscons(4) currently permits on sparc64 so text mode is already quite fast. The hardware cursor is used for the mouse pointer; for one because this is a "restriction" induced in syscons(4) on sparc64 by creator(4) and also because of issues with mapping the aperture when used as a low-level early during boot. Due to insufficiencies in the available documentation I didn't manage to get mode switch work properly (sync problems), yet. So for now this driver relies on the OBP having initialised a mode (as does creator(4)). On all of the tested machines is even true when using a serial console (and also not only when the OBP switched to a serial console because no keyboard is present). In general however the states the Mach64 chips are left in by the OBP vary a lot depending on the version of the OBP. This e.g. includes the aperture not being mapped in even when used as the console and the OBP just barfing when asked to map it. The latter is also the reason for the existence of this native driver in FreeBSD rather than taking an OFW frambuffer approach. Xorg is also happy to talk to these chips by mmap'ing them through this driver. For some hardware configs like on the Blade 100 a fix for the Xorg sparc64 MD bus code is however needed (added in version 6.8.2_2 of the xorg-server port). The video driver font loading and saving methods are not implemented, yet, as syscons(4) needs more work in that area to work viable on sparc64. With minor modifications machfb(4) would most likely also work on powerpc, when #ifdef'ing the OFW and possibly implementing mode setting probably also on the other archs. The latter is however not very practible at the moment as it would conflict with vga(4). Tested/developed with: Rage II+ add-on card on AX1105 and AXi board, AXe board (on-board Rage Pro) Additional testing by: marcel (Ultra 5 w/ on-board Rage Pro), scottl (Naturetech GENIALstation 777S w/ on-board Rage Mobility M1), Michiel Boland and Ilmar S. Habibulin (Blade 100 w/ on-board Rage XL) Revision Changes Path 1.1 +1490 -0 src/sys/dev/fb/machfb.c (new) 1.1 +458 -0 src/sys/dev/fb/machfbreg.h (new)