diff options
Diffstat (limited to 'xorg-server/hw/xfree86/modes/xf86EdidModes.c')
-rw-r--r-- | xorg-server/hw/xfree86/modes/xf86EdidModes.c | 47 |
1 files changed, 30 insertions, 17 deletions
diff --git a/xorg-server/hw/xfree86/modes/xf86EdidModes.c b/xorg-server/hw/xfree86/modes/xf86EdidModes.c index 6256fda0e..6e11f9a3d 100644 --- a/xorg-server/hw/xfree86/modes/xf86EdidModes.c +++ b/xorg-server/hw/xfree86/modes/xf86EdidModes.c @@ -160,6 +160,11 @@ static Bool quirk_detailed_v_in_cm (int scrnIndex, xf86MonPtr DDC) DDC->vendor.prod_id == 47360) return TRUE; + /* Bug #21750: Samsung Syncmaster 2333HD */ + if (memcmp (DDC->vendor.name, "SAM", 4) == 0 && + DDC->vendor.prod_id == 1157) + return TRUE; + return FALSE; } @@ -333,7 +338,7 @@ DDCModesFromEstablished(int scrnIndex, struct established_timings *timing, } /* Autogenerated from the DMT spec */ -static const DisplayModeRec DMTModes[] = { +const DisplayModeRec DMTModes[] = { { MODEPREFIX, 31500, 640, 672, 736, 832, 0, 350, 382, 385, 445, 0, V_PHSYNC | V_NVSYNC, MODESUFFIX }, /* 640x350@85Hz */ { MODEPREFIX, 31500, 640, 672, 736, 832, 0, 400, 401, 404, 445, 0, V_NHSYNC | V_PVSYNC, MODESUFFIX }, /* 640x400@85Hz */ { MODEPREFIX, 35500, 720, 756, 828, 936, 0, 400, 401, 404, 446, 0, V_NHSYNC | V_PVSYNC, MODESUFFIX }, /* 720x400@85Hz */ @@ -443,7 +448,7 @@ ModeRefresh(const DisplayModeRec *mode) * part of the DMT pool. For the 'standard' EDID mode descriptor there's * no way to specify whether the mode should be RB or not. */ -static DisplayModePtr +DisplayModePtr FindDMTMode(int hsize, int vsize, int refresh, Bool rb) { int i; @@ -486,29 +491,37 @@ DDCModesFromStandardTiming(struct std_timings *timing, ddc_quirk_t quirks, int timing_level, Bool rb) { DisplayModePtr Modes = NULL, Mode = NULL; - int i; + int i, hsize, vsize, refresh; for (i = 0; i < STD_TIMINGS; i++) { - if (timing[i].hsize && timing[i].vsize && timing[i].refresh) { - Mode = FindDMTMode(timing[i].hsize, timing[i].vsize, - timing[i].refresh, rb); + hsize = timing[i].hsize; + vsize = timing[i].vsize; + refresh = timing[i].refresh; + + /* HDTV hack. Hooray. */ + if (hsize == 1360 && vsize == 765 && refresh == 60) { + Mode = xf86CVTMode(1366, 768, 60, FALSE, FALSE); + Mode->HDisplay = 1366; + Mode->VSyncStart--; + Mode->VSyncEnd--; + } else if (hsize && vsize && refresh) { + Mode = FindDMTMode(hsize, vsize, refresh, rb); if (!Mode) { if (timing_level == LEVEL_CVT) /* pass rb here too? */ - Mode = xf86CVTMode(timing[i].hsize, timing[i].vsize, - timing[i].refresh, FALSE, FALSE); + Mode = xf86CVTMode(hsize, vsize, refresh, FALSE, FALSE); else if (timing_level == LEVEL_GTF) - Mode = xf86GTFMode(timing[i].hsize, timing[i].vsize, - timing[i].refresh, FALSE, FALSE); + Mode = xf86GTFMode(hsize, vsize, refresh, FALSE, FALSE); } - if (!Mode) - continue; + } + if (Mode) { Mode->type = M_T_DRIVER; - Modes = xf86ModesAdd(Modes, Mode); - } + Modes = xf86ModesAdd(Modes, Mode); + } + Mode = NULL; } return Modes; @@ -853,7 +866,7 @@ xf86DDCSetPreferredRefresh(int scrnIndex, DisplayModePtr modes, best->type |= M_T_PREFERRED; } -_X_EXPORT DisplayModePtr +DisplayModePtr xf86DDCGetModes(int scrnIndex, xf86MonPtr DDC) { int i; @@ -929,8 +942,8 @@ xf86DDCGetModes(int scrnIndex, xf86MonPtr DDC) /* * Fill out MonPtr with xf86MonPtr information. */ -_X_EXPORT void -xf86DDCMonitorSet(int scrnIndex, MonPtr Monitor, xf86MonPtr DDC) +void +xf86EdidMonitorSet(int scrnIndex, MonPtr Monitor, xf86MonPtr DDC) { DisplayModePtr Modes = NULL, Mode; int i, clock; |