On Wed, 19 Jan 2005, Marc Aurele La France wrote:
On Mon, 17 Jan 2005, Michel D�nzer wrote:
On Sat, 2005-01-15 at 12:12 +0000, 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.

Note that the Radeon 2D engine only supports signed 14 bit coordinates.

That's a good point, but not one against changing common code to at least clamp coordinates to the 16 bits the protocol handles.

I've just committed the "central" change for this, (Xext/xf86dga2.c).

As for lower 2D engine specific limits, they should only be enforced when the engine would actually be used for a particular DGA mode. Usually, but not always, that's when the mode's DGA_CONCURRENT_ACCESS is off.

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.

Reply via email to