xserver default modes and arcade monitors

Chris Kennedy ivtv at groovy.org
Tue Nov 2 07:30:26 PDT 2010


I am trying to work out an issue with supporting arcade
monitors with the xserver in the best way possible.  There
is one issue I have come across which seems like a general
issue with how the xserver acts when a monitor has no EDID
information (and arcade monitor doesn't) and how it adds
default modes.  These default modes are currently not able
to be overridden by any kind of user modeline input, either
through xorg.conf modelines or xrandr adding modelines.  The
xrandr program gets back an error when trying to replace one
of the default modes.  So when a person wants to use an arcade
capable 320x240 resolution for example that has a specific 
vertical refresh rate they can't.  They can be pruned with the
Vert/Horz range settings but there's ones that will slip through.
When emulating arcade games it's important to get the correct
refresh rate, else the game runs at the wrong speed.

I currently have gotten things to "work" ok, with this change:

diff --git a/hw/xfree86/modes/xf86Crtc.c b/hw/xfree86/modes/xf86Crtc.c
index b2daec7..ff5ca2c 100644
--- a/hw/xfree86/modes/xf86Crtc.c
+++ b/hw/xfree86/modes/xf86Crtc.c
@@ -1633,6 +1633,10 @@ xf86ProbeOutputModes (ScrnInfoPtr scrn, int maxX, int maxY)
            xf86ForEachDetailedBlock(edid_monitor,
                                     handle_detailed_monrec,
                                     &p);
+       } else {
+           xf86DrvMsg(scrn->scrnIndex, X_INFO,
+                  "No EDID on output %s\n", output->name);
+           add_default_modes = FALSE;
        }

        if (xf86GetOptValFreq (output->options, OPTION_MIN_CLOCK,


Though I don't know if this is the best way to do it, basically
when a monitor doesn't have an EDID this prevents adding the 
default modes.  Maybe if a user has also added modelines to the
xorg.conf file then it should do this and otherwise use the
default modes.  

Like this:

diff --git a/hw/xfree86/modes/xf86Crtc.c b/hw/xfree86/modes/xf86Crtc.c
index b2daec7..722f12b 100644
--- a/hw/xfree86/modes/xf86Crtc.c
+++ b/hw/xfree86/modes/xf86Crtc.c
@@ -1633,6 +1633,10 @@ xf86ProbeOutputModes (ScrnInfoPtr scrn, int maxX, int maxY)
            xf86ForEachDetailedBlock(edid_monitor,
                                     handle_detailed_monrec,
                                     &p);
+       } else if (config_modes) {
+           xf86DrvMsg(scrn->scrnIndex, X_INFO,
+                  "No EDID on output %s\n", output->name);
+           add_default_modes = FALSE;
        }

        if (xf86GetOptValFreq (output->options, OPTION_MIN_CLOCK,


My thought is that when a monitor doesn't have an EDID, and also
a user has put modelines into xorg.conf, they don't want any
stray odd modelines added and know what they are doing.  This is
very important for arcade monitors since they run at fixed frequencies
and are sensitive to any odd resolutions.  They often run at a
fixed 15.750 Hfreq and use very low dotclocks down to 3-4Mhz sometimes.
So to support these types of monitors, something has to be done
about the default modes so they aren't in there when a user has
a monitor they need to completely send custom modelines to and knows
what they are.

Thanks,
Chris

-- 
Chris Kennedy
c at groovy.org


More information about the xorg-devel mailing list