On Mon, 4 Nov 2002, Luugi Marsan wrote:

> >>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.

> apertureSize is indeed in bytes, but in xf86Modes.c,
> xf86InitialCheckModeForDriver() has this check. This is in XFree86 4.2.0.

> --

> if (mode->HDisplay * mode->VDisplay * scrp->fbFormat.bitsPerPixel >
> scrp->videoRam * (1024 * 8))
>         return MODE_MEM;
> --

> where:
>     scrp ->videoRam  = 256 * 1024 ( since videoRam is in Kbytes)

> When calculating the right hand side of the comparison, the right hand
> side  is equal to 256*1024*1024*8 = 2^31. The left hand side is also
> calculated in bits, since it multiplies the display by the number of
> bits per pixel.

I stand corrected.  I'll take care of this.  Thanks for pointing it out.

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

Reply via email to