summaryrefslogtreecommitdiff
path: root/sys/src/9/pc/vganvidia.c
diff options
context:
space:
mode:
authorcinap_lenrek <cinap_lenrek@felloff.net>2020-12-27 23:08:59 +0100
committercinap_lenrek <cinap_lenrek@felloff.net>2020-12-27 23:08:59 +0100
commit806353ec9eda162a3ff13cad1e5228c58cd67566 (patch)
tree442d3fcd52e36862de12d047cf6e3a5eca2672d0 /sys/src/9/pc/vganvidia.c
parent874e71c8dc489b820c9a6066d13c470a34d7f83f (diff)
devvga: implement screen tilting, remove panning and overlays
Tilting allows using left/right rotated or invetrted display orientation. This can be changed at runtime such as: echo tilt right > /dev/vgactl This removes the old panning and vga overlays as they are only implemented with some ancient vga controllers.
Diffstat (limited to 'sys/src/9/pc/vganvidia.c')
-rw-r--r--sys/src/9/pc/vganvidia.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/sys/src/9/pc/vganvidia.c b/sys/src/9/pc/vganvidia.c
index 0d20f43a8..3267e6b52 100644
--- a/sys/src/9/pc/vganvidia.c
+++ b/sys/src/9/pc/vganvidia.c
@@ -343,13 +343,11 @@ static int
nvresetgraphics(VGAscr *scr)
{
ulong surfaceFormat, patternFormat, rectFormat, lineFormat;
- int pitch, i;
+ int i;
if(scr->paddr == 0)
return -1;
- pitch = scr->gscreen->width*sizeof(ulong);
-
/*
* DMA is at the end of the virtual window,
* but we might have cut it short when mapping it.
@@ -416,7 +414,7 @@ nvresetgraphics(VGAscr *scr)
nvdmastart(scr, SURFACE_FORMAT, 4);
nvdmanext(surfaceFormat);
- nvdmanext(pitch | (pitch << 16));
+ nvdmanext(scr->pitch | (scr->pitch << 16));
nvdmanext(0);
nvdmanext(0);