On Thu, Oct 30, 2003 at 08:09:05AM +0000, Andrew C Aitchison wrote:
> On Wed, 29 Oct 2003, Alan Hourihane wrote:
> 
> > On Wed, Oct 29, 2003 at 12:26:45PM -0800, Alex Deucher wrote:
> > > As I recall we had problems with allocating additional memory for Xv on
> > > neomagic chips (hence the overly_mem option).  As I recall there was an
> > > issue with allocating memory beyond the limits of the blitter, similar
> > > to the problems with Xv on via (bug 525).  Could this issue be resolved
> > > with Alan H's new linear allocator?
> > 
> > >From looking at the driver. Yes it can. But I don't have a neomagic
> > chipset to test.
> 
> I have a chipset, if someone can can give me pointers to what to look at.
> 
> I wont be able to look for a week or two, since the hard disk on the 
> laptop has died, and needs to be replaced.

Well, if someone else has a chip, or wants to update and test other
drivers (but be careful with DRI enabled drivers as it needs more work
in the driver). Here's a patch to the neomagic that should work, and
could be used as a template for the other drivers.

That's all. Most Xv (if not all) use linear allocation already and will
take advantage of it straight away without any furthur modifications.

Alan.

Index: neo_driver.c
===================================================================
RCS file: /X11R6/x-cvs/xc/programs/Xserver/hw/xfree86/drivers/neomagic/neo_driver.c,v
retrieving revision 1.71
diff -u -r1.71 neo_driver.c
--- neo_driver.c        24 Sep 2003 03:16:55 -0000      1.71
+++ neo_driver.c        30 Oct 2003 10:05:04 -0000
@@ -1685,11 +1685,20 @@
            AvailFBArea.y1 = 0;
            AvailFBArea.x2 = pScrn->displayWidth;
            AvailFBArea.y2 = lines;
-           xf86InitFBManager(pScreen, &AvailFBArea); 
-           
-           xf86DrvMsg(pScrn->scrnIndex, X_INFO, 
-                      "Using %i scanlines of offscreen memory \n",
+           if (xf86InitFBManager(pScreen, &AvailFBArea)) {
+               int cpp = pScrn->bitsPerPixel / 8;
+               int area = lines * pScrn->displayWidth;
+               int areaoffset = area * cpp;
+
+               xf86DrvMsg(pScrn->scrnIndex, X_INFO, 
+                      "Using %i scanlines of offscreen memory for area's \n",
                       lines - pScrn->virtualY);
+
+               if ( xf86InitFBManagerLinear(pScreen, area, (nPtr->NeoFbMapSize - 
area))) {
+                       xf86DrvMsg(scrnIndex, X_INFO, 
+                               "Using the rest of offscreen memory for linear 
(offset=0x%x,size=%3.1fMB)\n", areaoffset, (float)(nPtr->NeoFbMapSize - 
(areaoffset/(1024*1024))));
+               }
+           }
        }
 
        /* Setup the acceleration primitives */
_______________________________________________
Devel mailing list
[EMAIL PROTECTED]
http://XFree86.Org/mailman/listinfo/devel

Reply via email to