[Bug 2176] New: Radeon DGA mode detection does not set imageWidth correctly

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Thu Dec 30 12:07:18 PST 2004


Please do not reply to this email: if you want to comment on the bug, go to          
the URL shown below and enter yourcomments there.   
 
https://bugs.freedesktop.org/show_bug.cgi?id=2176        
   
           Summary: Radeon DGA mode detection does not set imageWidth
                    correctly
           Product: xorg
           Version: unspecified
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Driver/Radeon
        AssignedTo: xorg-bugzilla-noise at freedesktop.org
        ReportedBy: james at jigsawdezign.com


"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 the current 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.        
   
   
--         
Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email       
   
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.


More information about the xorg-bugzilla-noise mailing list