Bug 12676 - Xserver hangs during start when PreferredMode is used (endless loop)
Summary: Xserver hangs during start when PreferredMode is used (endless loop)
Status: RESOLVED FIXED
Alias: None
Product: xorg
Classification: Unclassified
Component: Server/DDX/Xorg (show other bugs)
Version: git
Hardware: Other All
: medium normal
Assignee: Eric Anholt
QA Contact: Xorg Project Team
URL:
Whiteboard:
Keywords:
: 14713 (view as bug list)
Depends on:
Blocks:
 
Reported: 2007-10-04 06:34 UTC by Stefan Dirsch
Modified: 2008-02-28 04:15 UTC (History)
2 users (show)

See Also:
i915 platform:
i915 features:


Attachments
xorg.conf (6.21 KB, text/plain)
2007-10-04 06:36 UTC, Stefan Dirsch
no flags Details

Description Stefan Dirsch 2007-10-04 06:34:00 UTC
The hangup occurs if PreferredMode is used. Otherwise it comes up fine.

/hw/xfree86/modes/xf86Crtc.c:xf86ProbeOutputModes()
[...]
preferred_mode = xf86GetOptValString (output->options,
                                      OPTION_PREFERRED_MODE);
if (preferred_mode) { ...} ==> endless loop in this block.

The following patch is responsible for this. Reverting it or adding the break
again 'fixes' the issue.

commit dc9c5196282ba61bd542e198dfe0d53d93181591
Author: Keith Packard <keithp@neko.keithp.com>
Date:   Thu Jul 19 13:28:00 2007 -0700

    Make PreferredMode option in config file override EDID mode preferences.

    When the PreferredMode option is selected in the config file, remove the
    M_T_PREFERRED bit from all other preferred modes to force the config file
    mode to be selected.

diff --git a/hw/xfree86/modes/xf86Crtc.c b/hw/xfree86/modes/xf86Crtc.c
index 1899d7f..170c921 100644
--- a/hw/xfree86/modes/xf86Crtc.c
+++ b/hw/xfree86/modes/xf86Crtc.c
@@ -1414,8 +1414,9 @@ xf86ProbeOutputModes (ScrnInfoPtr scrn, int maxX, int
maxY)
                        output->probed_modes = mode;
                    }
                    mode->type |= M_T_PREFERRED;
-                   break;
                }
+               else
+                   mode->type &= ~M_T_PREFERRED;
            }
        }
Comment 1 Stefan Dirsch 2007-10-04 06:36:03 UTC
Created attachment 11899 [details]
xorg.conf
Comment 3 Matthias Hopf 2007-10-09 10:09:09 UTC
Seems to fit.
Comment 4 Eric Anholt 2007-10-18 16:10:07 UTC
A related patch got committed by keithp.  Is this still an issue on master?
Comment 5 Stefan Dirsch 2007-10-18 17:20:32 UTC
I can't see this commit on master.
Comment 6 Jesse Barnes 2007-10-31 15:29:46 UTC
Sounds like a server bug, not an Intel problem.
Comment 7 Stefan Dirsch 2007-11-01 00:57:41 UTC
commit 29e0e180729a4f0cc020985a4de4c8bc4b9c7f5f
Author: Keith Packard <keithp@koto.keithp.com>
Date:   Mon Oct 22 13:38:16 2007 -0700

    Leave hardware-specified preferred modes alone when user preference
    exists.
    
    Instead of removing the preference bit marking the hardware declared mode
    preference, leave it in place and just move the user preferred mode to the
    front of the list while marking it with the USERPREF bit which will cause it
    to be selected by the initial mode selection code.

diff --git a/hw/xfree86/modes/xf86Crtc.c b/hw/xfree86/modes/xf86Crtc.c
index 0a48d5b..bb416fd 100644
--- a/hw/xfree86/modes/xf86Crtc.c
+++ b/hw/xfree86/modes/xf86Crtc.c
@@ -1417,9 +1417,8 @@ xf86ProbeOutputModes (ScrnInfoPtr scrn, int maxX, int maxY)
                        output->probed_modes = mode;
                    }
                    mode->type |= (M_T_PREFERRED|M_T_USERPREF);
+                   break;
                }
-               else
-                   mode->type &= ~M_T_PREFERRED;
            }
        }
Comment 8 Julien Cristau 2008-02-28 04:15:40 UTC
*** Bug 14713 has been marked as a duplicate of this bug. ***


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.