#endif 
static int aty128fb_set_par(struct fb_info *info){ 	struct aty128fb_par *par = info->par;	u32 config;	int err;	if ((err = aty128_decode_var(&info->var, par)) != 0)		return err;	if (par->blitter_may_be_busy)		wait_for_idle(par);	/* clear all registers that may interfere with mode setting */	aty_st_le32(OVR_CLR, 0);	aty_st_le32(OVR_WID_LEFT_RIGHT, 0);	aty_st_le32(OVR_WID_TOP_BOTTOM, 0);	aty_st_le32(OV0_SCALE_CNTL, 0);	aty_st_le32(MPP_TB_CONFIG, 0);	aty_st_le32(MPP_GP_CONFIG, 0);	aty_st_le32(SUBPIC_CNTL, 0);	aty_st_le32(VIPH_CONTROL, 0);	aty_st_le32(I2C_CNTL_1, 0);         /* turn off i2c */	aty_st_le32(GEN_INT_CNTL, 0);	/* turn off interrupts */	aty_st_le32(CAP0_TRIG_CNTL, 0);	aty_st_le32(CAP1_TRIG_CNTL, 0);	aty_st_8(CRTC_EXT_CNTL + 1, 4);	/* turn video off */	aty128_set_crtc(&par->crtc, par);	aty128_set_pll(&par->pll, par);	aty128_set_fifo(&par->fifo_reg, par);	config = aty_ld_le32(CONFIG_CNTL) & ~3;#if defined(__BIG_ENDIAN)	if (par->crtc.bpp == 32)		config |= 2;	/* make aperture do 32 bit swapping */	else if (par->crtc.bpp == 16)		config |= 1;	/* make aperture do 16 bit swapping */#endif	aty_st_le32(CONFIG_CNTL, config);	aty_st_8(CRTC_EXT_CNTL + 1, 0);	/* turn the video back on */	info->fix.line_length = (par->crtc.vxres * par->crtc.bpp) >> 3;	info->fix.visual = par->crtc.bpp == 8 ? FB_VISUAL_PSEUDOCOLOR		: FB_VISUAL_DIRECTCOLOR;#ifdef CONFIG_PMAC_PBOOK	if (par->chip_gen == rage_M3) {		aty128_set_crt_enable(par, par->crt_on);		aty128_set_lcd_enable(par, par->lcd_on);	}#endif	if (par->accel_flags & FB_ACCELF_TEXT)		aty128_init_engine(par);#ifdef CONFIG_BOOTX_TEXT	btext_update_display(info->fix.smem_start,			     (((par->crtc.h_total>>16) & 0xff)+1)*8,			     ((par->crtc.v_total>>16) & 0x7ff)+1,			     par->crtc.bpp,			     par->crtc.vxres*par->crtc.bpp/8);#endif /* CONFIG_BOOTX_TEXT */	return 0;}
10457	/local/tlutelli/issta_data/temp/c/2005_temp/2005/10457/8c8709334cec803368a432a33e0f2e116d48fe07/aty128fb.c/buggy/drivers/video/aty/aty128fb.c