[xorg-bugzilla-noise] [Bug 1386] New: Wrong code in r128_driver.c
--> no modes found
bugzilla-daemon at freedesktop.org
bugzilla-daemon at freedesktop.org
Wed Sep 15 00:33:41 PDT 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://freedesktop.org/bugzilla/show_bug.cgi?id=1386
Summary: Wrong code in r128_driver.c --> no modes found
Product: xorg
Version: 6.7.0
Platform: PC
OS/Version: Linux
Status: NEW
Severity: major
Priority: P2
Component: Driver/ATI Rage128
AssignedTo: xorg-bugzilla-noise at freedesktop.org
ReportedBy: Klaus.Kusche at inode.at
The following piece of code in r128_driver.c does the wrong thing on my system:
(I use 6.7.0, but the code is the same in 6.8.0)
/* return TRUE is a DFP is indeed connected to a DVI port */
static Bool R128GetDFPInfo(ScrnInfoPtr pScrn)
{
...
for(i=0; i<4; i++)
{
if(ddc->det_mon[i].type == 0)
{
info->PanelXRes =
ddc->det_mon[i].section.d_timings.h_active;
info->PanelYRes =
ddc->det_mon[i].section.d_timings.v_active;
info->HOverPlus =
ddc->det_mon[i].section.d_timings.h_sync_off;
info->HSyncWidth =
ddc->det_mon[i].section.d_timings.h_sync_width;
info->HBlank =
ddc->det_mon[i].section.d_timings.h_blanking;
info->VOverPlus =
ddc->det_mon[i].section.d_timings.v_sync_off;
info->VSyncWidth =
ddc->det_mon[i].section.d_timings.v_sync_width;
info->VBlank =
ddc->det_mon[i].section.d_timings.v_blanking;
}
}
...
}
I've a Rage 128 Pro GL PF AGP card with a DVI flat panel (but no VGA monitor)
connected.
Of the four DDC results tested by the for loop above, the first one contains the
correct values for my display. However, the second and the third one are all 0
(including .type), and hence also get copied. The fourth has .type > 0.
Hence, after the call to this function, my info->PanelXRes and info->PanelYRes
are 0! (and all the other timings, too). Consequently, the function choosing
modes accepts only modes with XRes and YRes <= 0 and of course finds no such modes.
I fixed this by adding two more tests to the if condition:
... && (ddc->...h_active > 0) && (ddc->...v_active > 0))
I've no idea if this fix is correct and useful, but it solved the problem for me.
--
Configure bugmail: https://freedesktop.org/bugzilla/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