View | Details | Raw Unified | Return to bug 12215
Collapse All | Expand All

(-)xf86-video-vesa-1.3.0/src/vesa.c.jx (-2 / +34 lines)
Lines 638-645 Link Here
638
	xf86UnloadSubModule(pDDCModule);
638
	xf86UnloadSubModule(pDDCModule);
639
    }
639
    }
640
640
641
    if ((pScrn->monitor->DDC = pVesa->monitor) != NULL)
641
    /* UNCLEAN */
642
	xf86SetDDCproperties(pScrn, pVesa->monitor);
642
    do {
643
	Bool had_cfg_ranges, have_ddc_ranges;
644
645
	had_cfg_ranges = (pScrn->monitor->nHsync || pScrn->monitor->nVrefresh);
646
	if ((pScrn->monitor->DDC = pVesa->monitor) != NULL)
647
	    xf86SetDDCproperties(pScrn, pVesa->monitor);
648
	have_ddc_ranges = (pScrn->monitor->nHsync || pScrn->monitor->nVrefresh);
649
650
	if (have_ddc_ranges && !had_cfg_ranges) {
651
	    int i;
652
	    for (i = 0; i < DET_TIMINGS; i++) {
653
		if (pVesa->monitor->det_mon[i].type == DS_RANGES)
654
		    break;
655
	    }
656
	    if (i < DET_TIMINGS)
657
		break;
658
659
	    /*
660
	     * DDC added ranges, but they're inferred from the modes, not
661
	     * copied from a range section.  So in the worst case, where it's
662
	     * not a range but a single frequency, stretch things out to be
663
	     * a range.  Panels with only one mode listed in DDC will
664
	     * otherwise probably not match any VESA modes.  Hooray for
665
	     * conformance.
666
	     */
667
	    if (pScrn->monitor->hsync[0].lo == pScrn->monitor->hsync[0].hi
668
		 && pScrn->monitor->hsync[0].lo > 31.5)
669
		pScrn->monitor->hsync[0].lo = 31.5;
670
	    if (pScrn->monitor->vrefresh[0].lo == pScrn->monitor->vrefresh[0].hi
671
		 && pScrn->monitor->vrefresh[0].lo > 50.0)
672
		pScrn->monitor->vrefresh[0].lo = 50;
673
	}
674
    } while (0);
643
675
644
    xf86DrvMsgVerb(pScrn->scrnIndex, X_INFO, DEBUG_VERB,
676
    xf86DrvMsgVerb(pScrn->scrnIndex, X_INFO, DEBUG_VERB,
645
			"Searching for matching VESA mode(s):\n");
677
			"Searching for matching VESA mode(s):\n");

Return to bug 12215