]>
Commit | Line | Data |
---|---|---|
a450cc71 JB |
1 | --- XFree86-4.2.1/xc/programs/Xserver/hw/xfree86/drivers/tdfx/tdfxdefs.h.orig Thu Apr 5 23:29:17 2001 |
2 | +++ XFree86-4.2.1/xc/programs/Xserver/hw/xfree86/drivers/tdfx/tdfxdefs.h Thu Sep 5 21:46:01 2002 | |
3 | @@ -45,6 +45,7 @@ | |
4 | #define SST_DESKTOP_EN BIT(7) | |
5 | #define SST_DESKTOP_PIXEL_FORMAT_SHIFT 18 | |
6 | #define SST_DESKTOP_CLUT_BYPASS BIT(10) | |
7 | +#define SST_INTERLACE BIT(3) | |
8 | #define SST_HALF_MODE BIT(4) | |
9 | #define SST_CURSOR_EN BIT(27) | |
10 | #define SST_FBI_BUSY BIT(7) | |
11 | --- XFree86-4.2.1/xc/programs/Xserver/hw/xfree86/drivers/tdfx/tdfx_driver.c.orig Wed Sep 18 03:02:14 2002 | |
12 | +++ XFree86-4.2.1/xc/programs/Xserver/hw/xfree86/drivers/tdfx/tdfx_driver.c Wed Sep 18 13:41:20 2002 | |
13 | @@ -960,7 +960,18 @@ | |
14 | clockRanges->minClock= 12000; /* !!! What's the min clock? !!! */ | |
15 | clockRanges->maxClock=pTDFX->MaxClock; | |
16 | clockRanges->clockIndex = -1; | |
17 | - clockRanges->interlaceAllowed = FALSE; | |
18 | + switch (pTDFX->ChipType) { | |
19 | + case PCI_CHIP_BANSHEE: | |
20 | + clockRanges->interlaceAllowed = FALSE; | |
21 | + break; | |
22 | + case PCI_CHIP_VOODOO3: | |
23 | + case PCI_CHIP_VOODOO5: | |
24 | + clockRanges->interlaceAllowed = TRUE; | |
25 | + break; | |
26 | + default: | |
27 | + clockRanges->interlaceAllowed = FALSE; | |
28 | + break; | |
29 | + } | |
30 | clockRanges->doubleScanAllowed = TRUE; | |
31 | ||
32 | /* | |
33 | @@ -990,7 +1001,7 @@ | |
34 | return FALSE; | |
35 | } | |
36 | ||
37 | - xf86SetCrtcForModes(pScrn, INTERLACE_HALVE_V); | |
38 | + xf86SetCrtcForModes(pScrn, 0); | |
39 | ||
40 | pScrn->currentMode = pScrn->modes; | |
41 | ||
42 | @@ -1666,6 +1677,10 @@ | |
43 | tdfxReg->screensize=mode->HDisplay|(mode->VDisplay<<12); | |
44 | tdfxReg->vidcfg &= ~SST_HALF_MODE; | |
45 | } | |
46 | + if (mode->Flags&V_INTERLACE) { | |
47 | + tdfxReg->vidcfg|=SST_INTERLACE; | |
48 | + } else | |
49 | + tdfxReg->vidcfg&=~SST_INTERLACE; | |
50 | ||
51 | TDFXTRACEREG("cpp=%d Hdisplay=%d Vdisplay=%d stride=%d screensize=%x\n", | |
52 | pTDFX->cpp, mode->HDisplay, mode->VDisplay, tdfxReg->stride, | |
53 | @@ -2394,12 +2409,29 @@ | |
54 | ||
55 | static int | |
56 | TDFXValidMode(int scrnIndex, DisplayModePtr mode, Bool verbose, int flags) { | |
57 | + ScrnInfoPtr pScrn; | |
58 | + TDFXPtr pTDFX; | |
59 | + | |
60 | TDFXTRACE("TDFXValidMode start\n"); | |
61 | if ((mode->HDisplay>2048) || (mode->VDisplay>1536)) | |
62 | return MODE_BAD; | |
63 | - /* Banshee doesn't support interlace. Does V3? */ | |
64 | - if (mode->Flags&V_INTERLACE) | |
65 | - return MODE_BAD; | |
66 | + /* Banshee doesn't support interlace, but Voodoo 3 and higher do. */ | |
67 | + pScrn = xf86Screens[scrnIndex]; | |
68 | + pTDFX = TDFXPTR(pScrn); | |
69 | + if (mode->Flags&V_INTERLACE) { | |
70 | + switch (pTDFX->ChipType) { | |
71 | + case PCI_CHIP_BANSHEE: | |
72 | + return MODE_BAD; | |
73 | + break; | |
74 | + case PCI_CHIP_VOODOO3: | |
75 | + case PCI_CHIP_VOODOO5: | |
76 | + return MODE_OK; | |
77 | + break; | |
78 | + default: | |
79 | + return MODE_BAD; | |
80 | + break; | |
81 | + } | |
82 | + } | |
83 | /* In clock doubled mode widths must be divisible by 16 instead of 8 */ | |
84 | if ((mode->Clock>TDFX2XCUTOFF) && (mode->HDisplay%16)) | |
85 | return MODE_BAD; |