summaryrefslogtreecommitdiff
path: root/src/mga_dac3026.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/mga_dac3026.c')
-rw-r--r--src/mga_dac3026.c17
1 files changed, 9 insertions, 8 deletions
diff --git a/src/mga_dac3026.c b/src/mga_dac3026.c
index 7cbec19..220ef1a 100644
--- a/src/mga_dac3026.c
+++ b/src/mga_dac3026.c
@@ -1,4 +1,4 @@
-/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/mga/mga_dac3026.c,v 1.58tsi Exp $ */
+/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/mga/mga_dac3026.c,v 1.56 2001/04/05 21:29:14 dawes Exp $ */
/*
* Copyright 1994 by Robin Cutshaw <robin@XFree86.org>
*
@@ -277,12 +277,16 @@ MGATi3026CalcClock (
static void
MGATi3026SetMCLK( ScrnInfoPtr pScrn, long f_out )
{
+ double f_pll;
int mclk_m, mclk_n, mclk_p;
int pclk_m, pclk_n, pclk_p;
int mclk_ctl;
MGAPtr pMga = MGAPTR(pScrn);
- MGATi3026CalcClock(f_out, TI_MAX_MCLK_FREQ, &mclk_m, &mclk_n, &mclk_p);
+ f_pll = MGATi3026CalcClock(
+ f_out, TI_MAX_MCLK_FREQ,
+ & mclk_m, & mclk_n, & mclk_p
+ );
/* Save PCLK settings */
outTi3026( TVP3026_PLL_ADDR, 0, 0xfc );
@@ -984,8 +988,7 @@ MGA3026_ddc1Read(ScrnInfoPtr pScrn)
static void
MGA3026_I2CGetBits(I2CBusPtr b, int *clock, int *data)
{
- ScrnInfoPtr pScrn = xf86Screens[b->scrnIndex];
- MGAPtr pMga = MGAPTR(pScrn);
+ MGAPtr pMga = MGAPTR(xf86Screens[b->scrnIndex]);
unsigned char val;
/* Get the result. */
@@ -1006,8 +1009,7 @@ MGA3026_I2CGetBits(I2CBusPtr b, int *clock, int *data)
static void
MGA3026_I2CPutBits(I2CBusPtr b, int clock, int data)
{
- ScrnInfoPtr pScrn = xf86Screens[b->scrnIndex];
- MGAPtr pMga = MGAPTR(pScrn);
+ MGAPtr pMga = MGAPTR(xf86Screens[b->scrnIndex]);
unsigned char val,drv;
/* Write the values */
@@ -1077,8 +1079,7 @@ MGA3026RamdacInit(ScrnInfoPtr pScrn)
HARDWARE_CURSOR_SOURCE_MASK_NOT_INTERLEAVED;
MGAdac->LoadPalette = MGA3026LoadPalette;
- MGAdac->RestorePalette = MGA3026RestorePalette;
-
+
MGAdac->ClockFrom = X_PROBED;
if ( pMga->Chipset == PCI_CHIP_MGA2064 && pMga->Bios2.PinID == 0 )
{