diff options
Diffstat (limited to 'hw/xfree86/common/xf86sbusBus.c')
-rw-r--r-- | hw/xfree86/common/xf86sbusBus.c | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/hw/xfree86/common/xf86sbusBus.c b/hw/xfree86/common/xf86sbusBus.c index fe3f0a84a..d7c928b4c 100644 --- a/hw/xfree86/common/xf86sbusBus.c +++ b/hw/xfree86/common/xf86sbusBus.c @@ -685,3 +685,32 @@ xf86SbusHandleColormaps(ScreenPtr pScreen, sbusDevicePtr psdp) return xf86HandleColormaps(pScreen, 256, 8, xf86SbusCmapLoadPalette, NULL, 0); } + +Bool +xf86SbusConfigure(void *busData, sbusDevicePtr sBus) +{ + if (sBus && sBus->fbNum == ((sbusDevicePtr) busData)->fbNum) + return 0; + return 1; +} + +void +xf86SbusConfigureNewDev(void *busData, sbusDevicePtr sBus, GDevRec *GDev) +{ + char *promPath = NULL; + + sBus = (sbusDevicePtr) busData; + GDev->identifier = sBus->descr; + if (sparcPromInit() >= 0) { + promPath = sparcPromNode2Pathname(&sBus->node); + sparcPromClose(); + } + if (promPath) { + GDev->busID = xnfalloc(strlen(promPath) + 6); + sprintf(GDev->busID, "SBUS:%s", promPath); + free(promPath); + } else { + GDev->busID = xnfalloc(12); + sprintf(GDev->busID, "SBUS:fb%d", sBus->fbNum); + } +} |