diff -rpu mach64.orig/mach64.c mach64/mach64.c --- mach64.orig/mach64.c Fri Jan 28 03:30:25 2000 +++ mach64/mach64.c Fri Jan 28 03:41:42 2000 @@ -32,6 +32,7 @@ */ /* $XConsortium: mach64.c /main/34 1996/10/28 04:46:47 kaleb $ */ +#define DEBUG 1 #include "X.h" #include "Xmd.h" #include "input.h" @@ -453,6 +454,8 @@ static ATIInformationBlock *GetATIInform int LCDPanelInfo; #endif /* __sparc__ */ + ErrorF("\nThis modified Mach64 X server was compiled by Steve Hsieh.\nSee http://www.eecs.umich.edu/~steveh/inspiron/ for more information. v4\n\n"); + #ifndef __sparc__ if (xf86ReadBIOS(mach64InfoRec.BIOSbase, 0x30, (unsigned char *)bios_signature, 10) != 10) { @@ -1655,6 +1658,18 @@ mach64Probe() XCONFIG_PROBED, mach64InfoRec.name, mach64LCDHorizontal, mach64LCDVertical, mach64LCDPanelID, (double)mach64LCDClock / 100.0); + + /* Original hack by Panu Outinen : force 80MHz + LCD clock on 1400x1050 Mobility-P. + Modified by Steve Hsieh + to force LCD clock to 107.85MHz if screen resolution is + 1400x1050 and LCDClock is currently less than that */ + if (mach64LCDHorizontal == 1400 && mach64LCDVertical == 1050 + && mach64LCDClock < 10785) { + mach64LCDClock = 10785; + ErrorF("1400x1050 LCD detected, forcing mach64LCDClock to %.2f MHz\n", + (double)mach64LCDClock / 100.0); + } /* * Determine porch data. The intent here is to produce stretched modes diff -rpu mach64.orig/mach64init.c mach64/mach64init.c --- mach64.orig/mach64init.c Fri Jan 28 03:30:25 2000 +++ mach64/mach64init.c Fri Jan 28 03:17:36 2000 @@ -2499,8 +2499,10 @@ void mach64InitDisplay(screen_idx) old_HORZ_STRETCHING = regr(HORZ_STRETCHING); old_VERT_STRETCHING = regr(VERT_STRETCHING); old_POWER_MANAGEMENT = regr(POWER_MANAGEMENT); - /* Disable panel's APM */ - regw(POWER_MANAGEMENT, old_POWER_MANAGEMENT & ~PWR_MGT_ON); + /* Enable panel's APM -- not sure why the stock + X server code explicitly disables this. + Steve Hsieh */ + regw(POWER_MANAGEMENT, old_POWER_MANAGEMENT | PWR_MGT_ON); } else { /* All others */ old_LCD_INDEX = inl(ioLCD_INDEX); @@ -2527,8 +2529,10 @@ void mach64InitDisplay(screen_idx) old_EXT_VERT_STRETCH = inl(ioLCD_DATA); outb(ioLCD_INDEX, LCD_POWER_MANAGEMENT); old_POWER_MANAGEMENT = inl(ioLCD_DATA); - /* Disable panel's APM */ - outl(ioLCD_DATA, old_POWER_MANAGEMENT & ~PWR_MGT_ON); + /* Enable panel's APM -- not sure why the stock + X server code explicitly disables this. + Steve Hsieh */ + outl(ioLCD_DATA, old_POWER_MANAGEMENT | PWR_MGT_ON); if ((mach64ChipType != MACH64_LB_ID) && (mach64ChipType != MACH64_LD_ID) && (mach64ChipType != MACH64_LI_ID) &&