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.
This commit is contained in:
parent
41444183b5
commit
d57a258153
|
|
@ -337,6 +337,30 @@ xf86DefaultScreenLimits (ScrnInfoPtr pScrn, int *widthp, int *heightp)
|
|||
*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++)
|
||||
{
|
||||
|
|
|
|||
Loading…
Reference in New Issue