vga: avoid setting vgactl type vesa multiple times

This commit is contained in:
cinap_lenrek 2013-01-06 03:16:07 +01:00
parent 0d5c57a132
commit a5b6143c4c

View file

@ -390,7 +390,6 @@ main(int argc, char** argv)
} }
else else
vtype = vga->ctlr->name; vtype = vga->ctlr->name;
vgactlw("type", vtype);
/* /*
* VESA must be set up before linear. * VESA must be set up before linear.
@ -401,7 +400,8 @@ main(int argc, char** argv)
if(vga->vesa->flag&Ferror) if(vga->vesa->flag&Ferror)
error("vesa load error\n"); error("vesa load error\n");
vgactlw("type", vesa.name); vgactlw("type", vesa.name);
} } else
vgactlw("type", vtype);
/* /*
* The new draw device needs linear mode set * The new draw device needs linear mode set
@ -413,7 +413,7 @@ main(int argc, char** argv)
* Linear is over so switch to other driver for * Linear is over so switch to other driver for
* acceleration. * acceleration.
*/ */
if(vga->vesa) if(vga->vesa && strcmp(vesa.name, vtype))
vgactlw("type", vtype); vgactlw("type", vtype);
sprint(buf, "%ludx%ludx%d %s", sprint(buf, "%ludx%ludx%d %s",