Commit 02777941 authored by Keith Packard's avatar Keith Packard
Browse files

kdrive: fix bug in vesa 4plane in 8bpp mode

parent 5b9f49f6
...@@ -19,7 +19,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, ...@@ -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 OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE. 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" #include "vesa.h"
...@@ -327,6 +327,7 @@ vesaScreenInitialize (KdScreenInfo *screen, VesaScreenPrivPtr pscr) ...@@ -327,6 +327,7 @@ vesaScreenInitialize (KdScreenInfo *screen, VesaScreenPrivPtr pscr)
return FALSE; return FALSE;
pscr->shadow = vesa_shadow; pscr->shadow = vesa_shadow;
pscr->origDepth = screen->fb[0].depth;
if (vesa_linear_fb) if (vesa_linear_fb)
pscr->mapping = VESA_LINEAR; pscr->mapping = VESA_LINEAR;
else else
...@@ -334,7 +335,7 @@ vesaScreenInitialize (KdScreenInfo *screen, VesaScreenPrivPtr pscr) ...@@ -334,7 +335,7 @@ vesaScreenInitialize (KdScreenInfo *screen, VesaScreenPrivPtr pscr)
vmib = &pscr->mode->vmib; vmib = &pscr->mode->vmib;
depth = vesaDepth (vmib);; depth = vesaDepth (vmib);
bpp = vmib->BitsPerPixel; bpp = vmib->BitsPerPixel;
switch (vmib->MemoryModel) { switch (vmib->MemoryModel) {
...@@ -793,6 +794,8 @@ vesaScreenFini(KdScreenInfo *screen) ...@@ -793,6 +794,8 @@ vesaScreenFini(KdScreenInfo *screen)
if (pscr->fb) if (pscr->fb)
VbeUnmapFramebuffer(priv->vi, &pscr->mode->vmib, pscr->fb); VbeUnmapFramebuffer(priv->vi, &pscr->mode->vmib, pscr->fb);
screen->fb[0].depth = pscr->origDepth;
return; return;
} }
......
...@@ -19,7 +19,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, ...@@ -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 OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE. 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_ #ifndef _VESA_H_
#define _VESA_H_ #define _VESA_H_
...@@ -51,6 +51,7 @@ typedef struct _VesaScreenPriv { ...@@ -51,6 +51,7 @@ typedef struct _VesaScreenPriv {
Bool shadow; Bool shadow;
Bool rotate; Bool rotate;
int mapping; int mapping;
int origDepth;
void *fb; void *fb;
} VesaScreenPrivRec, *VesaScreenPrivPtr; } VesaScreenPrivRec, *VesaScreenPrivPtr;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment