xf86-video-intel: Branch 'modesetting' - 2 commits - src/i830_xf86Crtc.c
Keith Packard
keithp at kemper.freedesktop.org
Wed Dec 13 08:54:40 EET 2006
src/i830_xf86Crtc.c | 27 +++++++++++++++++++++++++++
1 files changed, 27 insertions(+)
New commits:
diff-tree 9dd1520421dcb8c7f36a684f3d2ffb6b42a6671a (from parents)
Merge: d57a25815398ae83eae8bdcb3a1b607760aa30b6 63bf48481d4e5e285fdfe7037ea4150283163a54
Author: Keith Packard <keithp at guitar.keithp.com>
Date: Tue Dec 12 22:52:59 2006 -0800
Merge branch 'modesetting-origin' into modesetting
diff-tree d57a25815398ae83eae8bdcb3a1b607760aa30b6 (from 41444183b59ed84c09749ca89afbef036d42ec5f)
Author: Keith Packard <keithp at guitar.keithp.com>
Date: Tue Dec 12 22:48:21 2006 -0800
Elide duplicate modes in pScrn->monitor.
xf86DDCMonitorSet dumps all of the DDC-discovered modes
into the monitor mode list without checking to see if they
are already present. This provides an ever-changing list of
modes for outputs which have no DDC and which simply duplicate the monitor
mode list.
diff --git a/src/i830_xf86Crtc.c b/src/i830_xf86Crtc.c
index a222382..6f96d44 100644
--- a/src/i830_xf86Crtc.c
+++ b/src/i830_xf86Crtc.c
@@ -337,6 +337,30 @@ xf86DefaultScreenLimits (ScrnInfoPtr pSc
*heightp = height;
}
+/*
+ * XXX walk the monitor mode list and prune out duplicates that
+ * are inserted by xf86DDCMonitorSet. In an ideal world, that
+ * function would do this work by itself.
+ */
+
+static void
+xf86PruneDuplicateMonitorModes (MonPtr Monitor)
+{
+ DisplayModePtr master, clone, next;
+
+ for (master = Monitor->Modes;
+ master && master != Monitor->Last;
+ master = master->next)
+ {
+ for (clone = master->next; clone && clone != Monitor->Modes; clone = next)
+ {
+ next = clone->next;
+ if (xf86ModesEqual (master, clone))
+ xf86DeleteMode (&Monitor->Modes, clone);
+ }
+ }
+}
+
void
xf86ProbeOutputModes (ScrnInfoPtr pScrn)
{
@@ -344,6 +368,9 @@ xf86ProbeOutputModes (ScrnInfoPtr pScrn)
Bool properties_set = FALSE;
int o;
+ /* Elide duplicate modes before defaulting code uses them */
+ xf86PruneDuplicateMonitorModes (pScrn->monitor);
+
/* Probe the list of modes for each output. */
for (o = 0; o < config->num_output; o++)
{
More information about the xorg-commit
mailing list