diff options
Diffstat (limited to 'src/r128_driver.c')
-rw-r--r-- | src/r128_driver.c | 43 |
1 files changed, 34 insertions, 9 deletions
diff --git a/src/r128_driver.c b/src/r128_driver.c index cd8b995..8167d00 100644 --- a/src/r128_driver.c +++ b/src/r128_driver.c @@ -67,6 +67,7 @@ #ifdef XF86DRI #define _XF86DRI_SERVER_ #include "r128_dri.h" +#include "r128_common.h" #include "r128_sarea.h" #endif @@ -90,6 +91,8 @@ #include "vgaHW.h" #include "dixstruct.h" +#include "r128_chipset.h" + #ifndef MAX #define MAX(a,b) ((a)>(b)?(a):(b)) #endif @@ -137,7 +140,7 @@ typedef enum { OPTION_SHOW_CACHE } R128Opts; -const OptionInfoRec R128Options[] = { +static const OptionInfoRec R128Options[] = { { OPTION_NOACCEL, "NoAccel", OPTV_BOOLEAN, {0}, FALSE }, { OPTION_SW_CURSOR, "SWcursor", OPTV_BOOLEAN, {0}, FALSE }, { OPTION_DAC_6BIT, "Dac6Bit", OPTV_BOOLEAN, {0}, FALSE }, @@ -164,6 +167,8 @@ const OptionInfoRec R128Options[] = { { -1, NULL, OPTV_NONE, {0}, FALSE } }; +const OptionInfoRec *R128OptionsWeak(void) { return R128Options; } + R128RAMRec R128RAM[] = { /* Memory Specifications From RAGE 128 Software Development Manual (Technical Reference Manual P/N @@ -192,19 +197,23 @@ static const char *fbdevHWSymbols[] = { "fbdevHWGetVidmem", "fbdevHWDPMSSet", + "fbdevHWDPMSSetWeak", /* colormap */ "fbdevHWLoadPalette", + "fbdevHWLoadPaletteWeak", /* ScrnInfo hooks */ "fbdevHWAdjustFrame", + "fbdevHWAdjustFrameWeak", "fbdevHWEnterVT", "fbdevHWLeaveVT", "fbdevHWModeInit", "fbdevHWRestore", "fbdevHWSave", "fbdevHWSwitchMode", - "fbdevHWValidMode", + "fbdevHWSwitchModeWeak", + "fbdevHWValidModeWeak", "fbdevHWMapMMIO", "fbdevHWMapVidmem", @@ -296,6 +305,7 @@ static const char *driSymbols[] = { "DRIScreenInit", "DRIUnlock", "GlxSetVisualConfigs", + "DRICreatePCIBusID", NULL }; @@ -1917,9 +1927,9 @@ Bool R128PreInit(ScrnInfoPtr pScrn, int flags) if (!xf86LoadSubModule(pScrn, "fbdevhw")) return FALSE; xf86LoaderReqSymLists(fbdevHWSymbols, NULL); if (!fbdevHWInit(pScrn, info->PciInfo, NULL)) return FALSE; - pScrn->SwitchMode = fbdevHWSwitchMode; - pScrn->AdjustFrame = fbdevHWAdjustFrame; - pScrn->ValidMode = fbdevHWValidMode; + pScrn->SwitchMode = fbdevHWSwitchModeWeak(); + pScrn->AdjustFrame = fbdevHWAdjustFrameWeak(); + pScrn->ValidMode = fbdevHWValidModeWeak(); } if (!info->FBDev) @@ -1957,7 +1967,7 @@ Bool R128PreInit(ScrnInfoPtr pScrn, int flags) xf86FreeInt10(pInt10); xf86DrvMsg(pScrn->scrnIndex, X_NOTICE, - "For information on using the multimedia capabilities\n of this" + "For information on using the multimedia capabilities\n\tof this" " adapter, please see http://gatos.sf.net.\n"); return TRUE; @@ -2423,7 +2433,7 @@ Bool R128ScreenInit(int scrnIndex, ScreenPtr pScreen, int argc, char **argv) /* Colormap setup */ if (!miCreateDefColormap(pScreen)) return FALSE; if (!xf86HandleColormaps(pScreen, 256, info->dac6bits ? 6 : 8, - (info->FBDev ? fbdevHWLoadPalette : + (info->FBDev ? fbdevHWLoadPaletteWeak() : R128LoadPalette), NULL, CMAP_PALETTED_TRUECOLOR | CMAP_RELOAD_ON_MODE_SWITCH @@ -2434,7 +2444,7 @@ Bool R128ScreenInit(int scrnIndex, ScreenPtr pScreen, int argc, char **argv) /* DPMS setup - FIXME: also for mirror mode in non-fbdev case? - Michel */ if (info->FBDev) - xf86DPMSInit(pScreen, fbdevHWDPMSSet, 0); + xf86DPMSInit(pScreen, fbdevHWDPMSSetWeak(), 0); else { if (!info->HasPanelRegs || info->BIOSDisplay == R128_BIOS_DISPLAY_CRT) xf86DPMSInit(pScreen, R128DisplayPowerManagementSet, 0); @@ -3672,4 +3682,19 @@ static int r128_set_backlight_enable(ScrnInfoPtr pScrn, int on) OUTREG(R128_LVDS_GEN_CNTL, lvds_gen_cntl); return 0; - } +} + +void R128FillInScreenInfo(ScrnInfoPtr pScrn) +{ + pScrn->driverVersion = R128_VERSION_CURRENT; + pScrn->driverName = R128_DRIVER_NAME; + pScrn->name = R128_NAME; + pScrn->PreInit = R128PreInit; + pScrn->ScreenInit = R128ScreenInit; + pScrn->SwitchMode = R128SwitchMode; + pScrn->AdjustFrame = R128AdjustFrame; + pScrn->EnterVT = R128EnterVT; + pScrn->LeaveVT = R128LeaveVT; + pScrn->FreeScreen = R128FreeScreen; + pScrn->ValidMode = R128ValidMode; +} |