All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] GSoC #08 vbeinfo enhancements
@ 2008-08-31  6:59 Colin D Bennett
  2008-08-31  9:30 ` Vesa Jääskeläinen
  0 siblings, 1 reply; 7+ messages in thread
From: Colin D Bennett @ 2008-08-31  6:59 UTC (permalink / raw)
  To: grub-devel


[-- Attachment #1.1: Type: text/plain, Size: 180 bytes --]

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

[-- Attachment #1.2: 08_ChangeLog.txt --]
[-- Type: text/plain, Size: 214 bytes --]

2008-08-30  Colin D Bennett <colin@gibibit.com>

	* 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.

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1.3: 08_vbeinfo-enhancements.patch --]
[-- Type: text/x-patch; name=08_vbeinfo-enhancements.patch, Size: 2693 bytes --]

=== 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;
 
-  grub_printf ("List of compatible video modes:\n");
-
   err = grub_vbe_probe (&controller_info);
   if (err != GRUB_ERR_NONE)
     return err;
 
+  grub_printf ("VBE info:   version: %d.%d  OEM software rev: %d.%d\n",
+               controller_info.version >> 8, 
+               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 = video_mode_list = real2pm (controller_info.video_mode_ptr);
@@ -67,6 +73,10 @@
 
   grub_memcpy (saved_video_mode_list, video_mode_list, video_mode_list_size);
   
+  grub_printf ("List of compatible video modes:\n");
+  grub_printf ("Legend: P=Packed pixel, D=Direct color, "
+               "mask/pos=R/G/B/reserved\n"); 
+
   /* Walk through all video modes listed.  */
   for (p = saved_video_mode_list; *p != 0xFFFF; p++)
     {
@@ -103,10 +113,10 @@
       switch (mode_info_tmp.memory_model)
 	{
 	case 0x04:
-	  memory_model = "Packed Pixel";
+	  memory_model = "Packed";
 	  break;
 	case 0x06:
-	  memory_model = "Direct Color";
+	  memory_model = "Direct";
 	  break;
 
 	default:
@@ -116,12 +126,23 @@
       if (! memory_model)
 	continue;
 
-      grub_printf ("0x%03x: %d x %d x %d bpp (%s)\n",
-		   mode,
+      grub_printf ("0x%03x:  %4d x %4d x %2d  %s", 
+                   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] == '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");
     }
 
   grub_free (saved_video_mode_list);


[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 197 bytes --]

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] GSoC #08 vbeinfo enhancements
  2008-08-31  6:59 [PATCH] GSoC #08 vbeinfo enhancements Colin D Bennett
@ 2008-08-31  9:30 ` Vesa Jääskeläinen
  2008-08-31 13:43   ` Colin D Bennett
  0 siblings, 1 reply; 7+ messages in thread
From: Vesa Jääskeläinen @ 2008-08-31  9:30 UTC (permalink / raw)
  To: The development of GRUB 2

Colin D Bennett wrote:
> 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.

Thanks for the patch. In it went with a slight modification.

I think we need to get rid of those magic values there thou...



^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] GSoC #08 vbeinfo enhancements
  2008-08-31  9:30 ` Vesa Jääskeläinen
@ 2008-08-31 13:43   ` Colin D Bennett
  2008-08-31 15:59     ` Vesa Jääskeläinen
  0 siblings, 1 reply; 7+ messages in thread
From: Colin D Bennett @ 2008-08-31 13:43 UTC (permalink / raw)
  To: grub-devel

On Sun, 31 Aug 2008 12:30:24 +0300
Vesa Jääskeläinen <chaac@nic.fi> wrote:

> Colin D Bennett wrote:
> > 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.
> 
> Thanks for the patch. In it went with a slight modification.
> 
> I think we need to get rid of those magic values there thou...

Which magic values?



^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] GSoC #08 vbeinfo enhancements
  2008-08-31 13:43   ` Colin D Bennett
@ 2008-08-31 15:59     ` Vesa Jääskeläinen
  2008-08-31 16:37       ` [PATCH] GSoC #08 [v2] " Colin D Bennett
  0 siblings, 1 reply; 7+ messages in thread
From: Vesa Jääskeläinen @ 2008-08-31 15:59 UTC (permalink / raw)
  To: The development of GRUB 2

Colin D Bennett wrote:
> On Sun, 31 Aug 2008 12:30:24 +0300
> Vesa Jääskeläinen <chaac@nic.fi> wrote:
> 
>> Colin D Bennett wrote:
>>> 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.
>> Thanks for the patch. In it went with a slight modification.
>>
>> I think we need to get rid of those magic values there thou...
> 
> Which magic values?

0x04 and 0x06 as used on memory model at least. There might be something
else, those were there already...





^ permalink raw reply	[flat|nested] 7+ messages in thread

* [PATCH] GSoC #08 [v2] vbeinfo enhancements
  2008-08-31 15:59     ` Vesa Jääskeläinen
@ 2008-08-31 16:37       ` Colin D Bennett
  2008-09-01  5:44         ` [PATCH] GSoC #08 [v3] " Colin D Bennett
  0 siblings, 1 reply; 7+ messages in thread
From: Colin D Bennett @ 2008-08-31 16:37 UTC (permalink / raw)
  To: The development of GRUB 2


[-- Attachment #1.1: Type: text/plain, Size: 1021 bytes --]

On Sun, 31 Aug 2008 18:59:53 +0300
Vesa Jääskeläinen <chaac@nic.fi> wrote:

> Colin D Bennett wrote:
> > On Sun, 31 Aug 2008 12:30:24 +0300
> > Vesa Jääskeläinen <chaac@nic.fi> wrote:
> > 
> >> Colin D Bennett wrote:
> >>> 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.
> >> Thanks for the patch. In it went with a slight modification.
> >>
> >> I think we need to get rid of those magic values there thou...
> > 
> > Which magic values?
> 
> 0x04 and 0x06 as used on memory model at least. There might be
> something else, those were there already...

OK, I have replaced those and added the other VBE constants for those
fields.  Even though many of the values are not currently used, it
seems to help document the other possible values and uses of the field.

Attached are both a full patch, and an incremental patch against the
first version.

Regards,
Colin

[-- Attachment #1.2: 08_ChangeLog.txt --]
[-- Type: text/plain, Size: 329 bytes --]

2008-08-30  Colin D Bennett <colin@gibibit.com>

	* 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.  Added constant values for VBE mode info values, and
        replaced magic numbers with references to constants.

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1.3: 08_vbeinfo-enhancements.patch --]
[-- Type: text/x-patch; name=08_vbeinfo-enhancements.patch, Size: 5262 bytes --]

=== 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 16:26:53 +0000
@@ -26,6 +26,31 @@
 #include <grub/machine/vbe.h>
 #include <grub/mm.h>
 
+/* Bits from the VBE "mode_attributes" field in the mode info struct.  */
+#define VBE_MODEATTR_SUPPORTED                 (1 << 0)
+#define VBE_MODEATTR_RESERVED_1                (1 << 1)
+#define VBE_MODEATTR_BIOS_TTY_OUTPUT_SUPPORT   (1 << 2)
+#define VBE_MODEATTR_COLOR                     (1 << 3)
+#define VBE_MODEATTR_GRAPHICS                  (1 << 4)
+#define VBE_MODEATTR_VGA_COMPATIBLE            (1 << 5)
+#define VBE_MODEATTR_VGA_WINDOWED_AVAIL        (1 << 6)
+#define VBE_MODEATTR_LINEAR_FB_AVAIL           (1 << 7)
+#define VBE_MODEATTR_DOUBLE_SCAN_AVAIL         (1 << 8)
+#define VBE_MODEATTR_INTERLACED_AVAIL          (1 << 9)
+#define VBE_MODEATTR_TRIPLE_BUF_AVAIL          (1 << 10)
+#define VBE_MODEATTR_STEREO_AVAIL              (1 << 11)
+#define VBE_MODEATTR_DUAL_DISPLAY_START        (1 << 12)
+
+/* Values for the VBE memory_model field in the mode info struct.  */
+#define VBE_MODE_MEMORY_MODEL_TEXT           0x00
+#define VBE_MODE_MEMORY_MODEL_CGA            0x01
+#define VBE_MODE_MEMORY_MODEL_HERCULES       0x02
+#define VBE_MODE_MEMORY_MODEL_PLANAR         0x03
+#define VBE_MODE_MEMORY_MODEL_PACKED_PIXEL   0x04
+#define VBE_MODE_MEMORY_MODEL_NONCHAIN4_256  0x05
+#define VBE_MODE_MEMORY_MODEL_DIRECT_COLOR   0x06
+#define VBE_MODE_MEMORY_MODEL_YUV            0x07
+
 static void *
 real2pm (grub_vbe_farptr_t ptr)
 {
@@ -48,12 +73,19 @@
   grub_err_t err;
   char *modevar;
 
-  grub_printf ("List of compatible video modes:\n");
-
   err = grub_vbe_probe (&controller_info);
   if (err != GRUB_ERR_NONE)
     return err;
 
+  grub_printf ("VBE info:   version: %d.%d  OEM software rev: %d.%d\n",
+               controller_info.version >> 8, 
+               controller_info.version & 0xFF,
+               controller_info.oem_software_rev >> 8,
+               controller_info.oem_software_rev & 0xFF);
+  /* The total_memory field is in 64 KiB units.  */
+  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 = video_mode_list = real2pm (controller_info.video_mode_ptr);
@@ -67,6 +99,10 @@
 
   grub_memcpy (saved_video_mode_list, video_mode_list, video_mode_list_size);
   
+  grub_printf ("List of compatible video modes:\n");
+  grub_printf ("Legend: P=Packed pixel, D=Direct color, "
+               "mask/pos=R/G/B/reserved\n"); 
+
   /* Walk through all video modes listed.  */
   for (p = saved_video_mode_list; *p != 0xFFFF; p++)
     {
@@ -80,33 +116,33 @@
 	  continue;
 	}
 
-      if ((mode_info_tmp.mode_attributes & 0x001) == 0)
+      if ((mode_info_tmp.mode_attributes & VBE_MODEATTR_SUPPORTED) == 0)
 	/* If not available, skip it.  */
 	continue;
 
-      if ((mode_info_tmp.mode_attributes & 0x002) == 0)
+      if ((mode_info_tmp.mode_attributes & VBE_MODEATTR_RESERVED_1) == 0)
 	/* Not enough information.  */
 	continue;
 
-      if ((mode_info_tmp.mode_attributes & 0x008) == 0)
+      if ((mode_info_tmp.mode_attributes & VBE_MODEATTR_COLOR) == 0)
 	/* Monochrome is unusable.  */
 	continue;
 
-      if ((mode_info_tmp.mode_attributes & 0x080) == 0)
+      if ((mode_info_tmp.mode_attributes & VBE_MODEATTR_LINEAR_FB_AVAIL) == 0)
 	/* We support only linear frame buffer modes.  */
 	continue;
 
-      if ((mode_info_tmp.mode_attributes & 0x010) == 0)
+      if ((mode_info_tmp.mode_attributes & VBE_MODEATTR_GRAPHICS) == 0)
 	/* We allow only graphical modes.  */
 	continue;
 
       switch (mode_info_tmp.memory_model)
 	{
-	case 0x04:
-	  memory_model = "Packed Pixel";
+	case VBE_MODE_MEMORY_MODEL_PACKED_PIXEL:
+	  memory_model = "Packed";
 	  break;
-	case 0x06:
-	  memory_model = "Direct Color";
+	case VBE_MODE_MEMORY_MODEL_DIRECT_COLOR:
+	  memory_model = "Direct";
 	  break;
 
 	default:
@@ -116,12 +152,23 @@
       if (! memory_model)
 	continue;
 
-      grub_printf ("0x%03x: %d x %d x %d bpp (%s)\n",
-		   mode,
+      grub_printf ("0x%03x:  %4d x %4d x %2d  %s", 
+                   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] == '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");
     }
 
   grub_free (saved_video_mode_list);


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1.4: 08_vbeinfo-enhancements_v1_v2.patch --]
[-- Type: text/x-patch; name=08_vbeinfo-enhancements_v1_v2.patch, Size: 3226 bytes --]

=== modified file 'commands/i386/pc/vbeinfo.c'
--- commands/i386/pc/vbeinfo.c	2008-08-31 04:27:54 +0000
+++ commands/i386/pc/vbeinfo.c	2008-08-31 16:30:27 +0000
@@ -26,6 +26,31 @@
 #include <grub/machine/vbe.h>
 #include <grub/mm.h>
 
+/* Bits from the VBE "mode_attributes" field in the mode info struct.  */
+#define VBE_MODEATTR_SUPPORTED                 (1 << 0)
+#define VBE_MODEATTR_RESERVED_1                (1 << 1)
+#define VBE_MODEATTR_BIOS_TTY_OUTPUT_SUPPORT   (1 << 2)
+#define VBE_MODEATTR_COLOR                     (1 << 3)
+#define VBE_MODEATTR_GRAPHICS                  (1 << 4)
+#define VBE_MODEATTR_VGA_COMPATIBLE            (1 << 5)
+#define VBE_MODEATTR_VGA_WINDOWED_AVAIL        (1 << 6)
+#define VBE_MODEATTR_LINEAR_FB_AVAIL           (1 << 7)
+#define VBE_MODEATTR_DOUBLE_SCAN_AVAIL         (1 << 8)
+#define VBE_MODEATTR_INTERLACED_AVAIL          (1 << 9)
+#define VBE_MODEATTR_TRIPLE_BUF_AVAIL          (1 << 10)
+#define VBE_MODEATTR_STEREO_AVAIL              (1 << 11)
+#define VBE_MODEATTR_DUAL_DISPLAY_START        (1 << 12)
+
+/* Values for the VBE memory_model field in the mode info struct.  */
+#define VBE_MODE_MEMORY_MODEL_TEXT           0x00
+#define VBE_MODE_MEMORY_MODEL_CGA            0x01
+#define VBE_MODE_MEMORY_MODEL_HERCULES       0x02
+#define VBE_MODE_MEMORY_MODEL_PLANAR         0x03
+#define VBE_MODE_MEMORY_MODEL_PACKED_PIXEL   0x04
+#define VBE_MODE_MEMORY_MODEL_NONCHAIN4_256  0x05
+#define VBE_MODE_MEMORY_MODEL_DIRECT_COLOR   0x06
+#define VBE_MODE_MEMORY_MODEL_YUV            0x07
+
 static void *
 real2pm (grub_vbe_farptr_t ptr)
 {
@@ -57,6 +82,7 @@
                controller_info.version & 0xFF,
                controller_info.oem_software_rev >> 8,
                controller_info.oem_software_rev & 0xFF);
+  /* The total_memory field is in 64 KiB units.  */
   grub_printf ("            total memory: %d KiB\n",
                (controller_info.total_memory << 16) / 1024);
 
@@ -90,32 +116,32 @@
 	  continue;
 	}
 
-      if ((mode_info_tmp.mode_attributes & 0x001) == 0)
+      if ((mode_info_tmp.mode_attributes & VBE_MODEATTR_SUPPORTED) == 0)
 	/* If not available, skip it.  */
 	continue;
 
-      if ((mode_info_tmp.mode_attributes & 0x002) == 0)
+      if ((mode_info_tmp.mode_attributes & VBE_MODEATTR_RESERVED_1) == 0)
 	/* Not enough information.  */
 	continue;
 
-      if ((mode_info_tmp.mode_attributes & 0x008) == 0)
+      if ((mode_info_tmp.mode_attributes & VBE_MODEATTR_COLOR) == 0)
 	/* Monochrome is unusable.  */
 	continue;
 
-      if ((mode_info_tmp.mode_attributes & 0x080) == 0)
+      if ((mode_info_tmp.mode_attributes & VBE_MODEATTR_LINEAR_FB_AVAIL) == 0)
 	/* We support only linear frame buffer modes.  */
 	continue;
 
-      if ((mode_info_tmp.mode_attributes & 0x010) == 0)
+      if ((mode_info_tmp.mode_attributes & VBE_MODEATTR_GRAPHICS) == 0)
 	/* We allow only graphical modes.  */
 	continue;
 
       switch (mode_info_tmp.memory_model)
 	{
-	case 0x04:
+	case VBE_MODE_MEMORY_MODEL_PACKED_PIXEL:
 	  memory_model = "Packed";
 	  break;
-	case 0x06:
+	case VBE_MODE_MEMORY_MODEL_DIRECT_COLOR:
 	  memory_model = "Direct";
 	  break;
 


[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 197 bytes --]

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] GSoC #08 [v3] vbeinfo enhancements
  2008-08-31 16:37       ` [PATCH] GSoC #08 [v2] " Colin D Bennett
@ 2008-09-01  5:44         ` Colin D Bennett
  2008-09-01 15:59           ` Vesa Jääskeläinen
  0 siblings, 1 reply; 7+ messages in thread
From: Colin D Bennett @ 2008-09-01  5:44 UTC (permalink / raw)
  To: grub-devel, Vesa Jääskeläinen


[-- Attachment #1.1: Type: text/plain, Size: 195 bytes --]

This refinement is against current SVN head.  It introduces the VBE
mode info field constant values into vbe.h and these are used instead
of the magic numbers in vbeinfo.c.

Regards,
Colin

[-- Attachment #1.2: 08_ChangeLog.txt --]
[-- Type: text/plain, Size: 409 bytes --]

2008-08-31  Colin D Bennett <colin@gibibit.com>

	* 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.  Added constant values for VBE mode info values, and
	replaced magic numbers with references to constants.

	* include/grub/i386/pc/vbe.h: Created VBE mode info field value
	constant macros.

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1.3: 08_vbeinfo-enhancements.patch --]
[-- Type: text/x-patch; name=08_vbeinfo-enhancements.patch, Size: 4013 bytes --]

=== modified file 'commands/i386/pc/vbeinfo.c'
--- commands/i386/pc/vbeinfo.c	2008-08-31 08:28:36 +0000
+++ commands/i386/pc/vbeinfo.c	2008-09-01 05:36:39 +0000
@@ -57,6 +57,7 @@
                controller_info.version & 0xFF,
                controller_info.oem_software_rev >> 8,
                controller_info.oem_software_rev & 0xFF);
+  /* The total_memory field is in 64 KiB units.  */
   grub_printf ("            total memory: %d KiB\n",
                (controller_info.total_memory << 16) / 1024);
 
@@ -90,32 +91,32 @@
 	  continue;
 	}
 
-      if ((mode_info_tmp.mode_attributes & 0x001) == 0)
+      if ((mode_info_tmp.mode_attributes & GRUB_VBE_MODEATTR_SUPPORTED) == 0)
 	/* If not available, skip it.  */
 	continue;
 
-      if ((mode_info_tmp.mode_attributes & 0x002) == 0)
+      if ((mode_info_tmp.mode_attributes & GRUB_VBE_MODEATTR_RESERVED_1) == 0)
 	/* Not enough information.  */
 	continue;
 
-      if ((mode_info_tmp.mode_attributes & 0x008) == 0)
+      if ((mode_info_tmp.mode_attributes & GRUB_VBE_MODEATTR_COLOR) == 0)
 	/* Monochrome is unusable.  */
 	continue;
 
-      if ((mode_info_tmp.mode_attributes & 0x080) == 0)
+      if ((mode_info_tmp.mode_attributes & GRUB_VBE_MODEATTR_LFB_AVAIL) == 0)
 	/* We support only linear frame buffer modes.  */
 	continue;
 
-      if ((mode_info_tmp.mode_attributes & 0x010) == 0)
+      if ((mode_info_tmp.mode_attributes & GRUB_VBE_MODEATTR_GRAPHICS) == 0)
 	/* We allow only graphical modes.  */
 	continue;
 
       switch (mode_info_tmp.memory_model)
 	{
-	case 0x04:
+	case GRUB_VBE_MEMORY_MODEL_PACKED_PIXEL:
 	  memory_model = "Packed";
 	  break;
-	case 0x06:
+	case GRUB_VBE_MEMORY_MODEL_DIRECT_COLOR:
 	  memory_model = "Direct";
 	  break;
 
@@ -134,7 +135,7 @@
                    memory_model);
 
       /* Show mask and position details for direct color modes.  */
-      if (mode_info_tmp.memory_model == 0x06)
+      if (mode_info_tmp.memory_model == GRUB_VBE_MEMORY_MODEL_DIRECT_COLOR)
         grub_printf (", mask: %d/%d/%d/%d  pos: %d/%d/%d/%d",
                      mode_info_tmp.red_mask_size,
                      mode_info_tmp.green_mask_size,

=== modified file 'include/grub/i386/pc/vbe.h'
--- include/grub/i386/pc/vbe.h	2008-01-01 12:02:07 +0000
+++ include/grub/i386/pc/vbe.h	2008-09-01 05:34:40 +0000
@@ -30,9 +30,30 @@
 /* VBE status codes.  */
 #define GRUB_VBE_STATUS_OK		0x004f
 
-/* VBE memory model types.  */
-#define GRUB_VBE_MEMORY_MODEL_PACKED_PIXEL	0x04
-#define GRUB_VBE_MEMORY_MODEL_DIRECT_COLOR	0x06
+/* Bits from the GRUB_VBE "mode_attributes" field in the mode info struct.  */
+#define GRUB_VBE_MODEATTR_SUPPORTED                 (1 << 0)
+#define GRUB_VBE_MODEATTR_RESERVED_1                (1 << 1)
+#define GRUB_VBE_MODEATTR_BIOS_TTY_OUTPUT_SUPPORT   (1 << 2)
+#define GRUB_VBE_MODEATTR_COLOR                     (1 << 3)
+#define GRUB_VBE_MODEATTR_GRAPHICS                  (1 << 4)
+#define GRUB_VBE_MODEATTR_VGA_COMPATIBLE            (1 << 5)
+#define GRUB_VBE_MODEATTR_VGA_WINDOWED_AVAIL        (1 << 6)
+#define GRUB_VBE_MODEATTR_LFB_AVAIL                 (1 << 7)
+#define GRUB_VBE_MODEATTR_DOUBLE_SCAN_AVAIL         (1 << 8)
+#define GRUB_VBE_MODEATTR_INTERLACED_AVAIL          (1 << 9)
+#define GRUB_VBE_MODEATTR_TRIPLE_BUF_AVAIL          (1 << 10)
+#define GRUB_VBE_MODEATTR_STEREO_AVAIL              (1 << 11)
+#define GRUB_VBE_MODEATTR_DUAL_DISPLAY_START        (1 << 12)
+
+/* Values for the GRUB_VBE memory_model field in the mode info struct.  */
+#define GRUB_VBE_MEMORY_MODEL_TEXT           0x00
+#define GRUB_VBE_MEMORY_MODEL_CGA            0x01
+#define GRUB_VBE_MEMORY_MODEL_HERCULES       0x02
+#define GRUB_VBE_MEMORY_MODEL_PLANAR         0x03
+#define GRUB_VBE_MEMORY_MODEL_PACKED_PIXEL   0x04
+#define GRUB_VBE_MEMORY_MODEL_NONCHAIN4_256  0x05
+#define GRUB_VBE_MEMORY_MODEL_DIRECT_COLOR   0x06
+#define GRUB_VBE_MEMORY_MODEL_YUV            0x07
 
 /* Note:
 


[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 197 bytes --]

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] GSoC #08 [v3] vbeinfo enhancements
  2008-09-01  5:44         ` [PATCH] GSoC #08 [v3] " Colin D Bennett
@ 2008-09-01 15:59           ` Vesa Jääskeläinen
  0 siblings, 0 replies; 7+ messages in thread
From: Vesa Jääskeläinen @ 2008-09-01 15:59 UTC (permalink / raw)
  To: The development of GRUB 2

Colin D Bennett wrote:
> This refinement is against current SVN head.  It introduces the VBE
> mode info field constant values into vbe.h and these are used instead
> of the magic numbers in vbeinfo.c.

Thanks! Commited with modified changelog entry. Check what I changed.




^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2008-09-01 15:59 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-08-31  6:59 [PATCH] GSoC #08 vbeinfo enhancements Colin D Bennett
2008-08-31  9:30 ` Vesa Jääskeläinen
2008-08-31 13:43   ` Colin D Bennett
2008-08-31 15:59     ` Vesa Jääskeläinen
2008-08-31 16:37       ` [PATCH] GSoC #08 [v2] " Colin D Bennett
2008-09-01  5:44         ` [PATCH] GSoC #08 [v3] " Colin D Bennett
2008-09-01 15:59           ` Vesa Jääskeläinen

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.