On Mon, 4 Nov 2002, Luugi Marsan wrote: > > > There's a problem when validating a given mode. The board I > > > have has 256 > > > megs and it fails crying that it has insufficient memory for > > > the given > > > mode. This happens because the videoRam in bits is equal to > > > 2^31 ( 256 > > > megs). The number passes the numerical limit of an "int". I believe > > > that the videoRam should be an "unsigned int" instead of a > > > signed "int". > > > What do you think? Will this change create other problems?
> > > Y2K all over again. :) > > sorry, but your number theory has some error. > > 2^1 = 2 (1 bit, counting from 0 to 1 => 2 values) > > 2^2 = 4 (2 bits, counting from 0 to 3 => 4 values) > > 2^4 = 8 (3 bits counting from 0 to 7 => 8 values) > > [...] > > 2^31 = 2 GB > > 2^32 = 4 GB > > an integer with 32 bits has 1 bit sign and 31 bits for numeric value. > > this is (-2GB) to (+2GB-1). > > so your 256 MB limit must arise from somewhere else. > > for your case you should better starting the printf debugger > > or real debugging. maybe PCI or AGP config caps, or MTRR caps > > are the limiting factor, or its just a driver bug. (wild guessing) > I understand, but 256 megs = 256 * 1024 * 1024* 8 bits = 2^ 31 bits= > 2147483648. The Xserver calculates the memory in bits when validating > the mode. No, it doesn't. apertureSize is in bytes. Marc. +----------------------------------+-----------------------------------+ | Marc Aurele La France | work: 1-780-492-9310 | | Computing and Network Services | fax: 1-780-492-1729 | | 352 General Services Building | email: [EMAIL PROTECTED] | | University of Alberta +-----------------------------------+ | Edmonton, Alberta | | | T6G 2H1 | Standard disclaimers apply | | CANADA | | +----------------------------------+-----------------------------------+ XFree86 Core Team member. ATI driver and X server internals. _______________________________________________ Xpert mailing list [EMAIL PROTECTED] http://XFree86.Org/mailman/listinfo/xpert
