From xfree86-devel Thu Oct 30 11:06:45 2003 From: Alan Hourihane Date: Thu, 30 Oct 2003 11:06:45 +0000 To: xfree86-devel Subject: Re: Linear Allocator (Was Re: Alan H's new linear allocator and Neomagic Xv) X-MARC-Message: https://marc.info/?l=xfree86-devel&m=106751224526753 On Thu, Oct 30, 2003 at 10:07:13AM +0000, Alan Hourihane wrote: > 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. Actually, Due to the neomagic driver having different use of NeoFbMapSize, here's a new followup. 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 11:05:23 -0000 @@ -1685,11 +1685,21 @@ 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; + int totalmapsize = (pScrn->videoRam * 1024); + + xf86DrvMsg(pScrn->scrnIndex, X_INFO, + "Using %i scanlines of offscreen memory for area's \n", lines - pScrn->virtualY); + + if ( xf86InitFBManagerLinear(pScreen, area, (totalmapsize - area))) { + xf86DrvMsg(scrnIndex, X_INFO, + "Using the rest of offscreen memory for linear (offset=0x%x,size=%3.1fMB)\n", areaoffset, (float)(totalmapsize - (areaoffset/(1024*1024)))); + } + } } /* Setup the acceleration primitives */ _______________________________________________ Devel mailing list Devel@XFree86.Org http://XFree86.Org/mailman/listinfo/devel