"Depth requested: %d\n",pScrn->depth);
"Depth requested: %d\n", pScrn->depth); #endif
PnozzPreInit(ScrnInfoPtr pScrn, int flags){    PnozzPtr pPnozz;    sbusDevicePtr psdp;    MessageType from;    int i;    if (flags & PROBE_DETECT) return FALSE;    /*     * Note: This function is only called once at server startup, and     * not at the start of each server generation.  This means that     * only things that are persistent across server generations can     * be initialised here.  xf86Screens[] is (pScrn is a pointer to one     * of these).  Privates allocated using xf86AllocateScrnInfoPrivateIndex()       * are too, and should be used for data that must persist across     * server generations.     *     * Per-generation data should be allocated with     * AllocateScreenPrivateIndex() from the ScreenInit() function.     */    /* Allocate the PnozzRec driverPrivate */    if (!PnozzGetRec(pScrn)) {	return FALSE;    }    pPnozz = GET_PNOZZ_FROM_SCRN(pScrn);        /* Set pScrn->monitor */    pScrn->monitor = pScrn->confScreen->monitor;    /* This driver doesn't expect more than one entity per screen */    if (pScrn->numEntities > 1)	return FALSE;    /* This is the general case */    for (i = 0; i < pScrn->numEntities; i++) {	EntityInfoPtr pEnt = xf86GetEntityInfo(pScrn->entityList[i]);	/* PNOZZ is purely SBUS */	if (pEnt->location.type == BUS_SBUS) {	    psdp = xf86GetSbusInfoForEntity(pEnt->index);	    pPnozz->psdp = psdp;	} else	    return FALSE;    }    /*********************    deal with depth    *********************/        if (!xf86SetDepthBpp(pScrn, 0, 0, 0, Support32bppFb /*| Support24bppFb*/)) {	return FALSE;    } else {	/* Check that the returned depth is one we support */	xf86DrvMsg(pScrn->scrnIndex, X_CONFIG, 	    "Depth requested: %d\n",pScrn->depth);	switch (pScrn->depth) {	case 8:	case 16:	case 24:	    /* OK */	    break;	default:	    xf86DrvMsg(pScrn->scrnIndex, X_ERROR,		       "Given depth (%d) is not supported by this driver\n",		       pScrn->depth);	    return FALSE;	}    }    xf86PrintDepthBpp(pScrn);    /* We use a programmable clock */    pScrn->progClock = TRUE;    /* Set the bits per RGB for 8bpp mode */    if (pScrn->depth == 8)	pScrn->rgbBits = 8;/*    if (pScrn->depth>8) {      if (!xf86SetWeight(pScrn, defaultWeight, defaultWeight))        return FALSE;    }*/    if (!xf86SetDefaultVisual(pScrn, -1)) {      return FALSE;    } else {      /* We don't currently support DirectColor at > 8bpp */      if (pScrn->depth > 8 && pScrn->defaultVisual != TrueColor) {        xf86DrvMsg(pScrn->scrnIndex, X_ERROR, "Given default visual"		 " (%s) is not supported at depth %d\n",		 xf86GetVisualName(pScrn->defaultVisual), pScrn->depth);        return FALSE;      }    }    /* Collect all of the relevant option flags (fill in pScrn->options) */    xf86CollectOptions(pScrn, NULL);    /* Process the options */    if (!(pPnozz->Options = xalloc(sizeof(PnozzOptions))))	return FALSE;    memcpy(pPnozz->Options, PnozzOptions, sizeof(PnozzOptions));    xf86ProcessOptions(pScrn->scrnIndex, pScrn->options, pPnozz->Options);        /*     * The new cmap code requires this to be initialised.     */    {	Gamma zeros = {0.0, 0.0, 0.0};	if (!xf86SetGamma(pScrn, zeros)) {	    return FALSE;	}    }    /* Set the bits per RGB for 8bpp mode */    from = X_DEFAULT;    /* determine whether we use hardware or software cursor */        pPnozz->HWCursor = TRUE;    if (xf86GetOptValBool(pPnozz->Options, OPTION_HW_CURSOR, &pPnozz->HWCursor))	from = X_CONFIG;    if (xf86ReturnOptValBool(pPnozz->Options, OPTION_SW_CURSOR, FALSE)) {	from = X_CONFIG;	pPnozz->HWCursor = FALSE;    }       xf86DrvMsg(pScrn->scrnIndex, from, "Using %s cursor\n",		pPnozz->HWCursor ? "HW" : "SW");    if (xf86ReturnOptValBool(pPnozz->Options, OPTION_NOACCEL, FALSE)) {	pPnozz->NoAccel = TRUE;	xf86DrvMsg(pScrn->scrnIndex, X_CONFIG, "Acceleration disabled\n");    }            if (xf86LoadSubModule(pScrn, "fb") == NULL) {	PnozzFreeRec(pScrn);	return FALSE;    }    if (pPnozz->HWCursor && xf86LoadSubModule(pScrn, "ramdac") == NULL) {	PnozzFreeRec(pScrn);	return FALSE;    }    xf86LoaderReqSymLists(ramdacSymbols, NULL);    if (pPnozz->HWCursor && xf86LoadSubModule(pScrn, "xaa") == NULL) {	PnozzFreeRec(pScrn);	return FALSE;    }    xf86LoaderReqSymLists(xaaSymbols, NULL);    //return FALSE;    /*********************    set up clock and mode stuff    *********************/        pScrn->progClock = TRUE;    if(pScrn->display->virtualX || pScrn->display->virtualY) {	xf86DrvMsg(pScrn->scrnIndex, X_WARNING,		   "Pnozz does not support a virtual desktop\n");	pScrn->display->virtualX = 0;	pScrn->display->virtualY = 0;    }    xf86SbusUseBuiltinMode(pScrn, pPnozz->psdp);    pScrn->currentMode = pScrn->modes;    pScrn->displayWidth = pScrn->virtualX;    /* Set display resolution */    xf86SetDpi(pScrn, 0, 0);    return TRUE;}