fb->fb_type.fb_width = def_width; fb->fb_type.fb_height = def_height;
fb_setsize(fb, depth, def_width, def_height, node, bustype)	struct fbdevice *fb;	int depth, def_width, def_height, node, bustype;{	/*	 * The defaults below match my screen, but are not guaranteed	 * to be correct as defaults go...	 */	switch (bustype) {	case BUS_PFOUR:		fb->fb_linebytes = (fb->fb_type.fb_width * depth) / 8;		break;	case BUS_VME16:	case BUS_VME32:	case BUS_OBIO:#if defined(SUN4M)		if (cputyp == CPU_SUN4M) {   /* 4m has framebuffer on obio */		        fb->fb_type.fb_width = getpropint(node, "width",			    def_width);			fb->fb_type.fb_height = getpropint(node, "height",			    def_height);			fb->fb_linebytes = getpropint(node, "linebytes",			    (fb->fb_type.fb_width * depth) / 8);			break;		}#endif		/* Set up some defaults. */		fb->fb_type.fb_width = def_width;		fb->fb_type.fb_height = def_height;		/*		 * This is not particularly useful on Sun 4 VME framebuffers.		 * The EEPROM only contains info about the built-in.		 */		if (cputyp == CPU_SUN4 && (bustype == BUS_VME16 ||		    bustype == BUS_VME32))			goto donesize;#if defined(SUN4)		if (cputyp==CPU_SUN4) {			struct eeprom *eep = (struct eeprom *)eeprom_va;			if (eep != NULL) {				switch (eep->ee_diag.eed_scrsize) {				case EED_SCR_1152X900:					fb->fb_type.fb_width = 1152;					fb->fb_type.fb_height = 900;					break;				case EED_SCR_1024X1024:					fb->fb_type.fb_width = 1024;					fb->fb_type.fb_height = 1024;					break;				case EED_SCR_1600X1280:					fb->fb_type.fb_width = 1600;					fb->fb_type.fb_height = 1280;					break;				case EED_SCR_1440X1440:					fb->fb_type.fb_width = 1440;					fb->fb_type.fb_height = 1440;					break;				case EED_SCR_640X480:					fb->fb_type.fb_width = 640;					fb->fb_type.fb_height = 480;					break;				case EED_SCR_1280X1024:					fb->fb_type.fb_width = 1280;					fb->fb_type.fb_height = 1024;					break;				default:					/*					 * XXX: Do nothing, I guess.					 * Should we print a warning about					 * an unknown value? --thorpej					 */					break;				}			}		}#endif /* SUN4 */#if defined(SUN4M)		if (cputyp==CPU_SUN4M) {			/* XXX: need code to find 4/600 vme screen size */		}#endif /* SUN4M */donesize:		fb->fb_linebytes = (fb->fb_type.fb_width * depth) / 8;		break;	case BUS_SBUS:		fb->fb_type.fb_width = getpropint(node, "width", 1152);		fb->fb_type.fb_height = getpropint(node, "height", 900);		fb->fb_linebytes = getpropint(node, "linebytes",		    (fb->fb_type.fb_width * depth) / 8);		break;	default:		panic("fb_setsize: inappropriate bustype");		/* NOTREACHED */	}}