On Mon, 2002-01-28 at 17:15, Keith Packard wrote: 
> 
> Around 13 o'clock on Jan 28, Michel =?ISO-8859-1?Q?D=E4nzer?= wrote:
> 
> > So it seems there's a time window when the framebuffer isn't mapped but
> > the mishadow code tries to access it. Any ideas, Keith?
> 
> fbdev isn't telling the shadow code that there's no frame buffer available 
> -- FBDevWindowLinear should return NULL when the VT isn't active.

Roland, please try the attached patch.


-- 
Earthling Michel D�nzer (MrCooper)/ Debian GNU/Linux (powerpc) developer
XFree86 and DRI project member   /  CS student, Free Software enthusiast
Index: fbdev.c
===================================================================
RCS file: /cvs/xc/programs/Xserver/hw/xfree86/drivers/fbdev/fbdev.c,v
retrieving revision 1.38
diff -u -r1.38 fbdev.c
--- fbdev.c     2001/10/28 03:33:29     1.38
+++ fbdev.c     2002/01/29 12:23:55
@@ -909,12 +915,15 @@
     ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum];
     FBDevPtr fPtr = FBDEVPTR(pScrn);
 
+    if (!pScrn->vtSema)
+      return NULL;
+
     if (fPtr->lineLength)
       *size = fPtr->lineLength;
     else
       *size = fPtr->lineLength = fbdevHWGetLineLength(pScrn);
 
-    return ((CARD8 *)fPtr->fbmem + fPtr->fboff + row * fPtr->lineLength + offset);
+    return ((CARD8 *)fPtr->fbmem + pScrn->fbOffset + row * fPtr->lineLength + offset);
 }
 
 static void

Reply via email to