From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1KZia2-00039p-QC for mharc-grub-devel@gnu.org; Sun, 31 Aug 2008 04:46:42 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KZia0-00039R-NE for grub-devel@gnu.org; Sun, 31 Aug 2008 04:46:40 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KZiZz-00038r-3s for grub-devel@gnu.org; Sun, 31 Aug 2008 04:46:40 -0400 Received: from [199.232.76.173] (port=39245 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KZiZy-00038m-KZ for grub-devel@gnu.org; Sun, 31 Aug 2008 04:46:38 -0400 Received: from gateway05.websitewelcome.com ([67.18.22.93]:55535) by monty-python.gnu.org with smtp (Exim 4.60) (envelope-from ) id 1KZiZx-00030B-Vl for grub-devel@gnu.org; Sun, 31 Aug 2008 04:46:38 -0400 Received: (qmail 26619 invoked from network); 31 Aug 2008 07:11:36 -0000 Received: from gator297.hostgator.com (74.53.228.114) by gateway05.websitewelcome.com with SMTP; 31 Aug 2008 07:11:36 -0000 Received: from c-67-185-142-228.hsd1.wa.comcast.net ([67.185.142.228]:38815 helo=gamma.lan) by gator297.hostgator.com with esmtpsa (TLSv1:AES128-SHA:128) (Exim 4.68) (envelope-from ) id 1KZgue-0005tg-BI for grub-devel@gnu.org; Sun, 31 Aug 2008 01:59:52 -0500 Date: Sat, 30 Aug 2008 23:59:52 -0700 From: Colin D Bennett To: grub-devel@gnu.org Message-ID: <20080830235952.4c686b44@gamma.lan> X-Mailer: Claws Mail 3.5.0 (GTK+ 2.12.11; i686-pc-linux-gnu) Mime-Version: 1.0 Content-Type: multipart/signed; boundary="Sig_/1cnU=qremOvCdiYhbC6u3k8"; protocol="application/pgp-signature"; micalg=PGP-SHA1 X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - gator297.hostgator.com X-AntiAbuse: Original Domain - gnu.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - gibibit.com X-detected-kernel: by monty-python.gnu.org: Linux 2.6 (newer, 3) Subject: [PATCH] GSoC #08 vbeinfo enhancements X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: The development of GRUB 2 List-Id: The development of GRUB 2 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 31 Aug 2008 08:46:41 -0000 --Sig_/1cnU=qremOvCdiYhbC6u3k8 Content-Type: multipart/mixed; boundary="MP_/QrMTXf/VrMwIRrcfUVzdawa" --MP_/QrMTXf/VrMwIRrcfUVzdawa Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable Content-Disposition: inline This patch adds more information to the vbeinfo output, including the video adapter VBE version, total video memory, and the color layout of each video mode. Regards, Colin --MP_/QrMTXf/VrMwIRrcfUVzdawa Content-Type: text/plain; name=08_ChangeLog.txt Content-Transfer-Encoding: quoted-printable Content-Disposition: attachment; filename=08_ChangeLog.txt 2008-08-30 Colin D Bennett * commands/i386/pc/vbeinfo.c (grub_cmd_vbeinfo): Show VBE version and total video memory in 'vbeinfo' output; show color format details for each video mode. --MP_/QrMTXf/VrMwIRrcfUVzdawa Content-Type: text/x-patch; name=08_vbeinfo-enhancements.patch Content-Transfer-Encoding: quoted-printable Content-Disposition: attachment; filename=08_vbeinfo-enhancements.patch =3D=3D=3D modified file 'commands/i386/pc/vbeinfo.c' --- commands/i386/pc/vbeinfo.c 2007-07-21 22:32:33 +0000 +++ commands/i386/pc/vbeinfo.c 2008-08-31 06:28:15 +0000 @@ -48,12 +48,18 @@ grub_err_t err; char *modevar; =20 - grub_printf ("List of compatible video modes:\n"); - err =3D grub_vbe_probe (&controller_info); if (err !=3D GRUB_ERR_NONE) return err; =20 + grub_printf ("VBE info: version: %d.%d OEM software rev: %d.%d\n", + controller_info.version >> 8,=20 + controller_info.version & 0xFF, + controller_info.oem_software_rev >> 8, + controller_info.oem_software_rev & 0xFF); + grub_printf (" total memory: %d KiB\n", + (controller_info.total_memory << 16) / 1024); + /* Because the information on video modes is stored in a temporary place, it is better to copy it to somewhere safe. */ p =3D video_mode_list =3D real2pm (controller_info.video_mode_ptr); @@ -67,6 +73,10 @@ =20 grub_memcpy (saved_video_mode_list, video_mode_list, video_mode_list_siz= e); =20 + grub_printf ("List of compatible video modes:\n"); + grub_printf ("Legend: P=3DPacked pixel, D=3DDirect color, " + "mask/pos=3DR/G/B/reserved\n");=20 + /* Walk through all video modes listed. */ for (p =3D saved_video_mode_list; *p !=3D 0xFFFF; p++) { @@ -103,10 +113,10 @@ switch (mode_info_tmp.memory_model) { case 0x04: - memory_model =3D "Packed Pixel"; + memory_model =3D "Packed"; break; case 0x06: - memory_model =3D "Direct Color"; + memory_model =3D "Direct"; break; =20 default: @@ -116,12 +126,23 @@ if (! memory_model) continue; =20 - grub_printf ("0x%03x: %d x %d x %d bpp (%s)\n", - mode, + grub_printf ("0x%03x: %4d x %4d x %2d %s",=20 + mode, mode_info_tmp.x_resolution, mode_info_tmp.y_resolution, mode_info_tmp.bits_per_pixel, - memory_model); + memory_model); + if (memory_model[0] =3D=3D 'D') + grub_printf (", mask: %d/%d/%d/%d pos: %d/%d/%d/%d", + mode_info_tmp.red_mask_size, + mode_info_tmp.green_mask_size, + mode_info_tmp.blue_mask_size, + mode_info_tmp.rsvd_mask_size, + mode_info_tmp.red_field_position, + mode_info_tmp.green_field_position, + mode_info_tmp.blue_field_position, + mode_info_tmp.rsvd_field_position); + grub_printf ("\n"); } =20 grub_free (saved_video_mode_list); --MP_/QrMTXf/VrMwIRrcfUVzdawa-- --Sig_/1cnU=qremOvCdiYhbC6u3k8 Content-Type: application/pgp-signature; name=signature.asc Content-Disposition: attachment; filename=signature.asc -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.9 (GNU/Linux) iEYEARECAAYFAki6QWoACgkQokx8fzcGbYcpyACcD+1seddxajBAVyhWnO4sTC7o 9E0An1uRnwOGN+B7/yCl9I8t7ufJ2Wx0 =Vq6J -----END PGP SIGNATURE----- --Sig_/1cnU=qremOvCdiYhbC6u3k8--