summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKeith Packard <keithp@keithp.com>2000-09-19 23:50:48 +0000
committerKeith Packard <keithp@keithp.com>2000-09-19 23:50:48 +0000
commit02777941e6ac8c79f934ba95b6b2e7f388ffbd14 (patch)
treeaad323364339409a39107a7eb1a9a5edbe50ae28
parent5b9f49f64c7fb51afbfaab4f848fc7d67851582c (diff)
kdrive: fix bug in vesa 4plane in 8bpp mode
-rw-r--r--hw/kdrive/vesa/vesa.c7
-rw-r--r--hw/kdrive/vesa/vesa.h3
2 files changed, 7 insertions, 3 deletions
diff --git a/hw/kdrive/vesa/vesa.c b/hw/kdrive/vesa/vesa.c
index b8fbc82bf..4542611c0 100644
--- a/hw/kdrive/vesa/vesa.c
+++ b/hw/kdrive/vesa/vesa.c
@@ -19,7 +19,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
*/
-/* $XFree86$ */
+/* $XFree86: xc/programs/Xserver/hw/kdrive/vesa/vesa.c,v 1.5 2000/09/15 07:25:13 keithp Exp $ */
#include "vesa.h"
@@ -327,6 +327,7 @@ vesaScreenInitialize (KdScreenInfo *screen, VesaScreenPrivPtr pscr)
return FALSE;
pscr->shadow = vesa_shadow;
+ pscr->origDepth = screen->fb[0].depth;
if (vesa_linear_fb)
pscr->mapping = VESA_LINEAR;
else
@@ -334,7 +335,7 @@ vesaScreenInitialize (KdScreenInfo *screen, VesaScreenPrivPtr pscr)
vmib = &pscr->mode->vmib;
- depth = vesaDepth (vmib);;
+ depth = vesaDepth (vmib);
bpp = vmib->BitsPerPixel;
switch (vmib->MemoryModel) {
@@ -793,6 +794,8 @@ vesaScreenFini(KdScreenInfo *screen)
if (pscr->fb)
VbeUnmapFramebuffer(priv->vi, &pscr->mode->vmib, pscr->fb);
+
+ screen->fb[0].depth = pscr->origDepth;
return;
}
diff --git a/hw/kdrive/vesa/vesa.h b/hw/kdrive/vesa/vesa.h
index add8706d4..8ded2ab67 100644
--- a/hw/kdrive/vesa/vesa.h
+++ b/hw/kdrive/vesa/vesa.h
@@ -19,7 +19,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
*/
-/* $XFree86$ */
+/* $XFree86: xc/programs/Xserver/hw/kdrive/vesa/vesa.h,v 1.5 2000/09/15 07:25:13 keithp Exp $ */
#ifndef _VESA_H_
#define _VESA_H_
@@ -51,6 +51,7 @@ typedef struct _VesaScreenPriv {
Bool shadow;
Bool rotate;
int mapping;
+ int origDepth;
void *fb;
} VesaScreenPrivRec, *VesaScreenPrivPtr;