Yes, my one-liner was a quick fix to get it up and running so I could continue with what I was doing...
The XDGAMode structure implies that the "imageHeight" value should be an int, and indeed it seems that it can actually hold a 32-bit integer within "radeon_dga.c" but somewhere further down the line (perhaps the dga extension library) it must be getting truncated to a 16bit integer, as XDGAQueryModes() returns it as zero on my machine. I was browsing the X11 headers and saw the "imageHeight" referred to as a "CARD16" type in the "xXDGAModeInfo" structure which makes me suspicious, I think it was in "xf86dgastr.h". Thanks, James On Mon, 17 Jan 2005 10:54:26 -0700 (MST) Marc Aurele La France <[EMAIL PROTECTED]> wrote: > On Sat, 15 Jan 2005, James Wright wrote: > > > Not sure if this is the right place to report this but anyway; > > > "xc/programs/XServer/hw/xfree86/drivers/ati/radeon_dga.c" > > > Line 114: currentMode->imageHeight = (info->FbMapSize / > > currentMode->bytesPerScanline); > > > On my Radeon IGP chipset with 64MB of VideoRam, this value is calculated as > > 65536 (0x010000). Although here the variable is a 32 bit integer, later in > > the > > dga library this value is truncated to a 16 bit integer, causing the driver > > to > > report the imageHeight as zero. I added a single line beneath Line > > 144 to clamp the value to the max a 16 bit iteger can hold; > > > if (currentMode->imageHeight > 0xFFFF) currentMode->imageHeight = 0xFFFF; > > > This fixes the problem for my radeon, but I think the other ati drivers may > > suffer from the same problem, but I do not have the hardware to test. > > This should probably be done more globally. I'll have a look (unless you > beat me to it). > > Thanks. > > 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 developer and VP. ATI driver and X server internals. > _______________________________________________ > Devel mailing list > [email protected] > http://XFree86.Org/mailman/listinfo/devel > _______________________________________________ Devel mailing list [email protected] http://XFree86.Org/mailman/listinfo/devel
