Patch by Kevin E. Martin to fix a bug in the 'radeon' driver panel timing parameter init code. Fixes bugs: https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=130888 http://freedesktop.org/bugzilla/show_bug.cgi?id=1007 Description: This patch should work around the panel timing params not being initialized. Here's the problem: Previously, the PanelXRes and PanelYRes were either read from the BIOS or were left as 0 (if no BIOS was detected). Then, in RADEONUpdatePanelSize(), the max panel size was found and the timing parameters were initialized, which worked fine for this ppc system. Now, the PanelXRes and PanelYRes are either read from the BIOS or are read from the registers. Note that the other timing parameters (in particular the DotClock) are not initialized when reading from the registers. Then, when RADEONUpdatePanelSize() is called, the max panel size is already set, so none of the other timing parameters are initialized here either (or anywhere else for that matter), which appears to be why the new code fails for this ppc system. The patch changes the test from < to <= in RADEONUpdatePanelSize() and then tests to make sure that only the first set of timings for the panel size read from the registers will be used -- this mimics the way the previous code worked. The only problem with this code occurs when the registers hold invalid panel size params, which do not match any of the monitor's DDC info. This should never happen; however, if it does, then the only solution in this case is to explicitly set the panel size in the config file. - Mike A. Harris --- xc/programs/Xserver/hw/xfree86/drivers/ati/radeon_driver.c.ORIG2 Fri Oct 15 15:42:04 2004 +++ xc/programs/Xserver/hw/xfree86/drivers/ati/radeon_driver.c Fri Oct 15 15:43:19 2004 @@ -2583,8 +2583,10 @@ if (ddc->det_mon[j].type == 0) { struct detailed_timings *d_timings = &ddc->det_mon[j].section.d_timings; - if (info->PanelXRes < d_timings->h_active && - info->PanelYRes < d_timings->v_active) { + if (info->PanelXRes <= d_timings->h_active && + info->PanelYRes <= d_timings->v_active) { + + if (info->DotClock) continue; /* Timings already inited */ info->PanelXRes = d_timings->h_active; info->PanelYRes = d_timings->v_active;