savage_out32(0x48C18, 0); 
savage_out32(0x48C18, 0, par); 
SavageSetup2DEngine (struct savagefb_par  *par){	unsigned long GlobalBitmapDescriptor;	GlobalBitmapDescriptor = 1 | 8 | BCI_BD_BW_DISABLE;	BCI_BD_SET_BPP (GlobalBitmapDescriptor, par->depth);	BCI_BD_SET_STRIDE (GlobalBitmapDescriptor, par->vwidth);	switch(par->chip) {	case S3_SAVAGE3D:	case S3_SAVAGE_MX:		/* Disable BCI */		savage_out32(0x48C18, savage_in32(0x48C18) & 0x3FF0);		/* Setup BCI command overflow buffer */		savage_out32(0x48C14, (par->cob_offset >> 11) | (par->cob_index << 29));		/* Program shadow status update. */		savage_out32(0x48C10, 0x78207220);		savage_out32(0x48C0C, 0);		/* Enable BCI and command overflow buffer */		savage_out32(0x48C18, savage_in32(0x48C18) | 0x0C);		break;	case S3_SAVAGE4:	case S3_PROSAVAGE:	case S3_SUPERSAVAGE:		/* Disable BCI */		savage_out32(0x48C18, savage_in32(0x48C18) & 0x3FF0);		/* Program shadow status update */		savage_out32(0x48C10, 0x00700040);		savage_out32(0x48C0C, 0);		/* Enable BCI without the COB */		savage_out32(0x48C18, savage_in32(0x48C18) | 0x08);		break;	case S3_SAVAGE2000:		/* Disable BCI */		savage_out32(0x48C18, 0);		/* Setup BCI command overflow buffer */		savage_out32(0x48C18, (par->cob_offset >> 7) | (par->cob_index));		/* Disable shadow status update */		savage_out32(0x48A30, 0);		/* Enable BCI and command overflow buffer */		savage_out32(0x48C18, savage_in32(0x48C18) | 0x00280000 );		break;	    default:		break;	}	/* Turn on 16-bit register access. */	vga_out8(0x3d4, 0x31);	vga_out8(0x3d5, 0x0c);	/* Set stride to use GBD. */	vga_out8 (0x3d4, 0x50);	vga_out8 (0x3d5, vga_in8 (0x3d5 ) | 0xC1);	/* Enable 2D engine. */	vga_out8 (0x3d4, 0x40 );	vga_out8 (0x3d5, 0x01 );	savage_out32 (MONO_PAT_0, ~0);	savage_out32 (MONO_PAT_1, ~0);	/* Setup plane masks */	savage_out32 (0x8128, ~0 ); /* enable all write planes */	savage_out32 (0x812C, ~0 ); /* enable all read planes */	savage_out16 (0x8134, 0x27 );	savage_out16 (0x8136, 0x07 );	/* Now set the GBD */	par->bci_ptr = 0;	par->SavageWaitFifo (par, 4);	BCI_SEND( BCI_CMD_SETREG | (1 << 16) | BCI_GBD1 );	BCI_SEND( 0 );	BCI_SEND( BCI_CMD_SETREG | (1 << 16) | BCI_GBD2 );	BCI_SEND( GlobalBitmapDescriptor );}
10457	/local/tlutelli/issta_data/temp/c/2005_temp/2005/10457/1cc650c69f3079ce3c616c998a741bcf6ddf4f4d/savagefb_driver.c/buggy/drivers/video/savage/savagefb_driver.c