Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 63846
b: refs/heads/master
c: e798bd9
h: refs/heads/master
v: v3
  • Loading branch information
Paul A. Clarke authored and Linus Torvalds committed Aug 11, 2007
1 parent ce15ba6 commit ee86195
Show file tree
Hide file tree
Showing 5 changed files with 31 additions and 11 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: acb73865328bd6211a1452f39a4f660d26658918
refs/heads/master: e798bd95b61918e653f3d28f9176237236f2d103
23 changes: 13 additions & 10 deletions trunk/drivers/video/matrox/g450_pll.c
Original file line number Diff line number Diff line change
Expand Up @@ -331,16 +331,19 @@ static int __g450_setclk(WPMINFO unsigned int fout, unsigned int pll,
tmp |= M1064_XPIXCLKCTRL_PLL_UP;
}
matroxfb_DAC_out(PMINFO M1064_XPIXCLKCTRL, tmp);
#ifdef __powerpc__
/* This is necessary to avoid jitter on PowerPC
* (OpenFirmware) systems, but apparently
* introduces jitter, at least on a x86-64
* using DVI.
* A simple workaround is disable for non-PPC.
*/
matroxfb_DAC_out(PMINFO M1064_XDVICLKCTRL, 0);
#endif /* __powerpc__ */
matroxfb_DAC_out(PMINFO M1064_XPWRCTRL, xpwrctrl);
/* DVI PLL preferred for frequencies up to
panel link max, standard PLL otherwise */
if (fout >= MINFO->max_pixel_clock_panellink)
tmp = 0;
else tmp =
M1064_XDVICLKCTRL_DVIDATAPATHSEL |
M1064_XDVICLKCTRL_C1DVICLKSEL |
M1064_XDVICLKCTRL_C1DVICLKEN |
M1064_XDVICLKCTRL_DVILOOPCTL |
M1064_XDVICLKCTRL_P1LOOPBWDTCTL;
matroxfb_DAC_out(PMINFO M1064_XDVICLKCTRL,tmp);
matroxfb_DAC_out(PMINFO M1064_XPWRCTRL,
xpwrctrl);

matroxfb_DAC_unlock_irqrestore(flags);
}
Expand Down
15 changes: 15 additions & 0 deletions trunk/drivers/video/matrox/matroxfb_DAC1064.h
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,21 @@ void DAC1064_global_restore(WPMINFO2);
#define M1064_XCURCTRL_3COLOR 0x01 /* transparent, 0, 1, 2 */
#define M1064_XCURCTRL_XGA 0x02 /* 0, 1, transparent, complement */
#define M1064_XCURCTRL_XWIN 0x03 /* transparent, transparent, 0, 1 */
/* drive DVI by standard(0)/DVI(1) PLL */
/* if set(1), C?DVICLKEN and C?DVICLKSEL must be set(1) */
#define M1064_XDVICLKCTRL_DVIDATAPATHSEL 0x01
/* drive CRTC1 by standard(0)/DVI(1) PLL */
#define M1064_XDVICLKCTRL_C1DVICLKSEL 0x02
/* drive CRTC2 by standard(0)/DVI(1) PLL */
#define M1064_XDVICLKCTRL_C2DVICLKSEL 0x04
/* pixel clock allowed to(0)/blocked from(1) driving CRTC1 */
#define M1064_XDVICLKCTRL_C1DVICLKEN 0x08
/* DVI PLL loop filter bandwidth selection bits */
#define M1064_XDVICLKCTRL_DVILOOPCTL 0x30
/* CRTC2 pixel clock allowed to(0)/blocked from(1) driving CRTC2 */
#define M1064_XDVICLKCTRL_C2DVICLKEN 0x40
/* P1PLL loop filter bandwith selection */
#define M1064_XDVICLKCTRL_P1LOOPBWDTCTL 0x80
#define M1064_XCURCOL0RED 0x08
#define M1064_XCURCOL0GREEN 0x09
#define M1064_XCURCOL0BLUE 0x0A
Expand Down
1 change: 1 addition & 0 deletions trunk/drivers/video/matrox/matroxfb_base.h
Original file line number Diff line number Diff line change
Expand Up @@ -424,6 +424,7 @@ struct matrox_fb_info {
} mmio;

unsigned int max_pixel_clock;
unsigned int max_pixel_clock_panellink;

struct matrox_switch* hw_switch;

Expand Down
1 change: 1 addition & 0 deletions trunk/drivers/video/matrox/matroxfb_misc.c
Original file line number Diff line number Diff line change
Expand Up @@ -658,6 +658,7 @@ static int parse_pins5(WPMINFO const struct matrox_bios* bd) {
MINFO->values.reg.mctlwtst_core = (MINFO->values.reg.mctlwtst & ~7) |
wtst_xlat[MINFO->values.reg.mctlwtst & 7];
}
MINFO->max_pixel_clock_panellink = bd->pins[47] * 4000;
return 0;
}

Expand Down

0 comments on commit ee86195

Please sign in to comment.