ref: 04ec990b670c761866da5bb0ab344da3407e78ca
parent: 2cc7c72f8e1b2c0ea98f2184014988f9e2940f52
author: ftrvxmtrx <[email protected]>
date: Fri Dec 26 11:10:45 EST 2014
vga, vesa: revert. this needs to be in aux/vga instead
--- a/sys/man/3/vga
+++ b/sys/man/3/vga
@@ -198,17 +198,6 @@
.B blank
above).
.TP
-.BI scaling " mode"
-Set the GPU scaling
-.I mode
-to
-.BR off ,
-.B full
-or
-.B aspect
-to either disable scaling, scale to full screen, or
-to scale while preserving aspect ratio.
-.TP
.BI linear " size align"
Use a linear screen aperture of size
.I size
--- a/sys/src/9/pc/devvga.c
+++ b/sys/src/9/pc/devvga.c
@@ -48,7 +48,6 @@
CMunblank,
CMsoftscreen,
CMpcidev,
- CMscaling,
};
static Cmdtab vgactlmsg[] = {
@@ -68,7 +67,6 @@
CMunblank, "unblank", 1,
CMsoftscreen, "softscreen", 2,
CMpcidev, "pcidev", 2,
- CMscaling, "scaling", 2,
};
static void
@@ -305,19 +303,6 @@
scr->pci = p;
} else
error(Ebadarg);
- return;
-
- case CMscaling:
- if(scr != nil && scr->dev != nil){
- if(scr->dev->scaling == nil)
- error("scaling not supported");
- else if(strcmp(cb->f[1], "aspect") == 0)
- scr->dev->scaling(scr, Saspect);
- else if(strcmp(cb->f[1], "full") == 0)
- scr->dev->scaling(scr, Sfull);
- else if(strcmp(cb->f[1], "off") == 0)
- scr->dev->scaling(scr, Soff);
- }
return;
case CMtype:
--- a/sys/src/9/pc/screen.h
+++ b/sys/src/9/pc/screen.h
@@ -49,15 +49,6 @@
Pwhite = 0xFF,
};
-/*
- * Scaling modes.
- */
-enum {
- Soff,
- Sfull,
- Saspect,
-};
-
#define VGAMEM() 0xA0000
#define vgai(port) inb(port)
#define vgao(port, data) outb(port, data)
@@ -83,7 +74,6 @@
void (*ovlctl)(VGAscr*, Chan*, void*, int);
int (*ovlwrite)(VGAscr*, void*, int, vlong);
void (*flush)(VGAscr*, Rectangle);
- void (*scaling)(VGAscr*, int);
};
struct VGAcur {
--- a/sys/src/9/pc/vgavesa.c
+++ b/sys/src/9/pc/vgavesa.c
@@ -23,7 +23,6 @@
Cdisable = 0,
Cenable,
Cblank,
- Cscaling,
RealModeBuf = 0x9000,
};
@@ -33,7 +32,6 @@
static QLock vesaq;
static Rendez vesar;
static int vesactl;
-static int scaling;
#define WORD(p) ((p)[0] | ((p)[1]<<8))
#define LONG(p) ((p)[0] | ((p)[1]<<8) | ((p)[2]<<16) | ((p)[3]<<24))
@@ -185,17 +183,11 @@
sleep(&vesar, gotctl, &ctl);
ctl = vesactl;
- if(ctl == Cscaling){
- vbesetup(&u, 0x4f14);
- u.bx = 0x102;
- u.cx = scaling;
- }else{
- vbesetup(&u, 0x4f10);
- if(ctl == Cblank)
- u.bx = 0x0101;
- else
- u.bx = 0x0001;
- }
+ vbesetup(&u, 0x4f10);
+ if(ctl == Cblank)
+ u.bx = 0x0101;
+ else
+ u.bx = 0x0001;
/*
* dont wait forever here. some BIOS get stuck
@@ -261,21 +253,6 @@
}
static void
-vesascaling(VGAscr *, int mode)
-{
- if(vesactl != Cdisable){
- vesactl = Cscaling;
- if(mode == Soff)
- scaling = 1;
- else if(mode == Saspect)
- scaling = 3;
- else if(mode == Sfull)
- scaling = 0;
- wakeup(&vesar);
- }
-}
-
-static void
vesadrawinit(VGAscr *scr)
{
scr->blank = vesablank;
@@ -285,12 +262,7 @@
"vesa",
vesaenable,
vesadisable,
- nil,
+ 0,
vesalinear,
vesadrawinit,
- nil,
- nil,
- nil,
- nil,
- vesascaling,
};