vesa(4): Remove definition and usage of the obsolete V_MODEOPTINFO flag.
authorSascha Wildner <saw@online.de>
Sun, 6 Jun 2010 10:43:01 +0000 (12:43 +0200)
committerSascha Wildner <saw@online.de>
Sun, 6 Jun 2010 10:43:01 +0000 (12:43 +0200)
Prior to VBE 1.2, this flag specified whether optional information
for the mode was available in the ModeInfoBlock structure. Starting
with 1.2 this information became mandatory and the D1 bit became
reserved.

Since we claim to only support cards conforming to VBE 1.2 and higher,
adjust the code to no longer take this bit into account and remove its
definition.

sys/dev/video/i386/vesa/vesa.c
sys/platform/pc32/include/pc/vesa.h

index e383273..7b9af05 100644 (file)
@@ -24,7 +24,6 @@
  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  *
  * $FreeBSD: src/sys/i386/isa/vesa.c,v 1.32.2.1 2002/08/13 02:42:33 rwatson Exp $
- * $DragonFly: src/sys/dev/video/i386/vesa/vesa.c,v 1.29 2008/10/03 09:25:18 swildner Exp $
  */
 
 #include "opt_vga.h"
@@ -662,8 +661,7 @@ vesa_bios_init(void)
                        continue;
 
                /* reject unsupported modes */
-               if ((vmode.v_modeattr & (V_MODESUPP | V_MODEOPTINFO)) !=
-                   (V_MODESUPP | V_MODEOPTINFO)) {
+               if ((vmode.v_modeattr & V_MODESUPP) != V_MODESUPP) {
 #if VESA_DEBUG > 1
                        kprintf("Rejecting VESA %s mode: %d x %d x %d bpp  attr = 0x%x\n",
                               vmode.v_modeattr & V_MODEGRAPHICS ? "graphics" : "text",
@@ -1552,20 +1550,18 @@ vesa_bios_info(int level)
                /* print something for diagnostic purpose */
                kprintf("VESA: mode:0x%03x, flags:0x%04x", 
                       vesa_vmodetab[i], vmode.v_modeattr);
-               if (vmode.v_modeattr & V_MODEOPTINFO) {
-                       if (vmode.v_modeattr & V_MODEGRAPHICS) {
-                               kprintf(", G %dx%dx%d %d, ", 
-                                      vmode.v_width, vmode.v_height,
-                                      vmode.v_bpp, vmode.v_planes);
-                       } else {
-                               kprintf(", T %dx%d, ", 
-                                      vmode.v_width, vmode.v_height);
-                       }
-                       kprintf("font:%dx%d, ", 
-                              vmode.v_cwidth, vmode.v_cheight);
-                       kprintf("pages:%d, mem:%d",
-                              vmode.v_ipages + 1, vmode.v_memmodel);
+               if (vmode.v_modeattr & V_MODEGRAPHICS) {
+                       kprintf(", G %dx%dx%d %d, ",
+                           vmode.v_width, vmode.v_height,
+                           vmode.v_bpp, vmode.v_planes);
+               } else {
+                       kprintf(", T %dx%d, ",
+                           vmode.v_width, vmode.v_height);
                }
+               kprintf("font:%dx%d, ",
+                   vmode.v_cwidth, vmode.v_cheight);
+               kprintf("pages:%d, mem:%d",
+                   vmode.v_ipages + 1, vmode.v_memmodel);
                if (vmode.v_modeattr & V_MODELFB) {
                        kprintf("\nVESA: LFB:0x%x, off:0x%x, off_size:0x%x", 
                               vmode.v_lfb, vmode.v_offscreen,
index 6408b40..4ef66ac 100644 (file)
@@ -24,7 +24,6 @@
  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  *
  * $FreeBSD: src/sys/i386/include/pc/vesa.h,v 1.7 1999/12/29 04:33:12 peter Exp $
- * $DragonFly: src/sys/platform/pc32/include/pc/vesa.h,v 1.5 2007/09/15 13:18:40 swildner Exp $
  */
 
 #ifndef _MACHINE_PC_VESA_H
@@ -52,7 +51,6 @@ struct vesa_mode  {
        /* mandatory fields */
        uint16_t        v_modeattr;
 #define V_MODESUPP     (1<<0)  /* VESA mode attributes */
-#define V_MODEOPTINFO  (1<<1)
 #define V_MODEBIOSOUT  (1<<2)
 #define V_MODECOLOR    (1<<3)
 #define V_MODEGRAPHICS (1<<4)