 if(chip_id == CYBERBLADEi1) output("*** Please do use cyblafb, Cyberblade/i1 support " "will soon be removed from tridentfb!\n");  
static int __devinit trident_pci_probe(struct pci_dev * dev, const struct pci_device_id * id){	int err;	unsigned char revision;	err = pci_enable_device(dev);	if (err)		return err;	chip_id = id->device;	/* If PCI id is 0x9660 then further detect chip type */		if (chip_id == TGUI9660) {		outb(RevisionID,0x3C4);		revision = inb(0x3C5);				switch (revision) {			case 0x22:			case 0x23: chip_id = CYBER9397;break;			case 0x2A: chip_id = CYBER9397DVD;break;			case 0x30:			case 0x33:			case 0x34:			case 0x35:			case 0x38:			case 0x3A:			case 0xB3: chip_id = CYBER9385;break;			case 0x40 ... 0x43: chip_id = CYBER9382;break;			case 0x4A: chip_id = CYBER9388;break;			default:break;			}	}	chip3D = is3Dchip(chip_id);	chipcyber = iscyber(chip_id);	if (is_xp(chip_id)) {		acc = &accel_xp;	} else 	if (is_blade(chip_id)) {		acc = &accel_blade;	} else {		acc = &accel_image;	}	/* acceleration is on by default for 3D chips */	defaultaccel = chip3D && !noaccel;	fb_info.par = &default_par;	/* setup MMIO region */	tridentfb_fix.mmio_start = pci_resource_start(dev,1);	tridentfb_fix.mmio_len = chip3D ? 0x20000:0x10000;	if (!request_mem_region(tridentfb_fix.mmio_start, tridentfb_fix.mmio_len, "tridentfb")) {		debug("request_region failed!\n");		return -1;	}	default_par.io_virt = ioremap_nocache(tridentfb_fix.mmio_start, tridentfb_fix.mmio_len);	if (!default_par.io_virt) {		release_region(tridentfb_fix.mmio_start, tridentfb_fix.mmio_len);		debug("ioremap failed\n");		return -1;	}	enable_mmio();		/* setup framebuffer memory */	tridentfb_fix.smem_start = pci_resource_start(dev,0);	tridentfb_fix.smem_len = get_memsize();		if (!request_mem_region(tridentfb_fix.smem_start, tridentfb_fix.smem_len, "tridentfb")) {		debug("request_mem_region failed!\n");		return -1;	}	fb_info.screen_base = ioremap_nocache(tridentfb_fix.smem_start,		       			tridentfb_fix.smem_len);	if (!fb_info.screen_base) {		release_mem_region(tridentfb_fix.smem_start, tridentfb_fix.smem_len);		debug("ioremap failed\n");		return -1;	}	output("%s board found\n", pci_name(dev));#if 0		output("Trident board found : mem = %X,io = %X, mem_v = %X, io_v = %X\n",		tridentfb_fix.smem_start, tridentfb_fix.mmio_start, fb_info.screen_base, default_par.io_virt);#endif	displaytype = get_displaytype();	if(flatpanel)		nativex = get_nativex();	fb_info.fix = tridentfb_fix;	fb_info.fbops = &tridentfb_ops;	fb_info.flags = FBINFO_DEFAULT | FBINFO_HWACCEL_YPAN;#ifdef CONFIG_FB_TRIDENT_ACCEL	fb_info.flags |= FBINFO_HWACCEL_COPYAREA | FBINFO_HWACCEL_FILLRECT;#endif	fb_info.pseudo_palette = pseudo_pal;	if (!fb_find_mode(&default_var,&fb_info,mode,NULL,0,NULL,bpp))		return -EINVAL;	fb_alloc_cmap(&fb_info.cmap,256,0);	if (defaultaccel && acc)		default_var.accel_flags |= FB_ACCELF_TEXT;	else		default_var.accel_flags &= ~FB_ACCELF_TEXT;	default_var.activate |= FB_ACTIVATE_NOW;	fb_info.var = default_var;	fb_info.device = &dev->dev;	if (register_framebuffer(&fb_info) < 0) {		printk(KERN_ERR "tridentfb: could not register Trident framebuffer\n");		return -EINVAL;	}	output("fb%d: %s frame buffer device %dx%d-%dbpp\n",	   fb_info.node, fb_info.fix.id,default_var.xres,	   default_var.yres,default_var.bits_per_pixel);	return 0;}
10457	/local/tlutelli/issta_data/temp/c/2005_temp/2005/10457/9fa68eae9f8291a98bfe00b94b78f72eb253165a/tridentfb.c/buggy/drivers/video/tridentfb.c