Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 26842
b: refs/heads/master
c: 6d39bed
h: refs/heads/master
v: v3
  • Loading branch information
Paul A. Clarke authored and Linus Torvalds committed May 21, 2006
1 parent 9a79464 commit 1971fc1
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 3 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: d64b1c878fc1e384ae53d1d40034239bc33848f4
refs/heads/master: 6d39bedc47fbf18a940f5843981767c221d22cfe
23 changes: 21 additions & 2 deletions trunk/drivers/video/matrox/g450_pll.c
Original file line number Diff line number Diff line change
Expand Up @@ -316,14 +316,24 @@ static int __g450_setclk(WPMINFO unsigned int fout, unsigned int pll,
case M_PIXEL_PLL_B:
case M_PIXEL_PLL_C:
{
u_int8_t tmp;
u_int8_t tmp, xpwrctrl;
unsigned long flags;

matroxfb_DAC_lock_irqsave(flags);

xpwrctrl = matroxfb_DAC_in(PMINFO M1064_XPWRCTRL);
matroxfb_DAC_out(PMINFO M1064_XPWRCTRL, xpwrctrl & ~M1064_XPWRCTRL_PANELPDN);
mga_outb(M_SEQ_INDEX, M_SEQ1);
mga_outb(M_SEQ_DATA, mga_inb(M_SEQ_DATA) | M_SEQ1_SCROFF);
tmp = matroxfb_DAC_in(PMINFO M1064_XPIXCLKCTRL);
tmp |= M1064_XPIXCLKCTRL_DIS;
if (!(tmp & M1064_XPIXCLKCTRL_PLL_UP)) {
matroxfb_DAC_out(PMINFO M1064_XPIXCLKCTRL, tmp | M1064_XPIXCLKCTRL_PLL_UP);
tmp |= M1064_XPIXCLKCTRL_PLL_UP;
}
matroxfb_DAC_out(PMINFO M1064_XPIXCLKCTRL, tmp);
matroxfb_DAC_out(PMINFO M1064_XDVICLKCTRL, 0);
matroxfb_DAC_out(PMINFO M1064_XPWRCTRL, xpwrctrl);

matroxfb_DAC_unlock_irqrestore(flags);
}
{
Expand Down Expand Up @@ -418,6 +428,15 @@ static int __g450_setclk(WPMINFO unsigned int fout, unsigned int pll,
frequency to higher - with <= lowest wins, while
with < highest one wins */
if (delta <= deltaarray[idx-1]) {
/* all else being equal except VCO,
* choose VCO not near (within 1/16th or so) VCOmin
* (freqs near VCOmin aren't as stable)
*/
if (delta == deltaarray[idx-1]
&& vco != g450_mnp2vco(PMINFO mnparray[idx-1])
&& vco < (pi->vcomin * 17 / 16)) {
break;
}
mnparray[idx] = mnparray[idx-1];
deltaarray[idx] = deltaarray[idx-1];
} else {
Expand Down
2 changes: 2 additions & 0 deletions trunk/drivers/video/matrox/matroxfb_DAC1064.h
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ void DAC1064_global_restore(WPMINFO2);
#define M1064_XCURCOL1RED 0x0C
#define M1064_XCURCOL1GREEN 0x0D
#define M1064_XCURCOL1BLUE 0x0E
#define M1064_XDVICLKCTRL 0x0F
#define M1064_XCURCOL2RED 0x10
#define M1064_XCURCOL2GREEN 0x11
#define M1064_XCURCOL2BLUE 0x12
Expand Down Expand Up @@ -144,6 +145,7 @@ void DAC1064_global_restore(WPMINFO2);
#define M1064_XVIDPLLN 0x8F

#define M1064_XPWRCTRL 0xA0
#define M1064_XPWRCTRL_PANELPDN 0x04

#define M1064_XPANMODE 0xA2

Expand Down
2 changes: 2 additions & 0 deletions trunk/drivers/video/matrox/matroxfb_base.h
Original file line number Diff line number Diff line change
Expand Up @@ -672,6 +672,8 @@ void matroxfb_unregister_driver(struct matroxfb_driver* drv);

#define M_SEQ_INDEX 0x1FC4
#define M_SEQ_DATA 0x1FC5
#define M_SEQ1 0x01
#define M_SEQ1_SCROFF 0x20

#define M_MISC_REG_READ 0x1FCC

Expand Down

0 comments on commit 1971fc1

Please sign in to comment.