u32 pindex; unsigned int i;  if (regno > 255) return 1;  red >>= 8; green >>= 8; blue >>= 8; rinfo->palette[regno].red = red; rinfo->palette[regno].green = green; rinfo->palette[regno].blue = blue;  /* default */ pindex = regno; 
u32 dac_cntl2, vclk_cntl = 0; int rc; 
static int radeonfb_setcolreg (unsigned regno, unsigned red, unsigned green,                             unsigned blue, unsigned transp, struct fb_info *info){        struct radeonfb_info *rinfo = info->par;	u32 pindex;	unsigned int i;		if (regno > 255)		return 1;	red >>= 8;	green >>= 8;	blue >>= 8;	rinfo->palette[regno].red = red;	rinfo->palette[regno].green = green;	rinfo->palette[regno].blue = blue;        /* default */        pindex = regno;        if (!rinfo->asleep) {        	u32 dac_cntl2, vclk_cntl = 0;        			radeon_fifo_wait(9);		if (rinfo->is_mobility) {			vclk_cntl = INPLL(VCLK_ECP_CNTL);			OUTPLL(VCLK_ECP_CNTL, vclk_cntl & ~PIXCLK_DAC_ALWAYS_ONb);		}		/* Make sure we are on first palette */		if (rinfo->has_CRTC2) {			dac_cntl2 = INREG(DAC_CNTL2);			dac_cntl2 &= ~DAC2_PALETTE_ACCESS_CNTL;			OUTREG(DAC_CNTL2, dac_cntl2);		}		if (rinfo->bpp == 16) {			pindex = regno * 8;			if (rinfo->depth == 16 && regno > 63)				return 1;			if (rinfo->depth == 15 && regno > 31)				return 1;			/* For 565, the green component is mixed one order below */			if (rinfo->depth == 16) {		                OUTREG(PALETTE_INDEX, pindex>>1);	       	         	OUTREG(PALETTE_DATA, (rinfo->palette[regno>>1].red << 16) |	                        	(green << 8) | (rinfo->palette[regno>>1].blue));	                	green = rinfo->palette[regno<<1].green;	        	}		}		if (rinfo->depth != 16 || regno < 32) {			OUTREG(PALETTE_INDEX, pindex);			OUTREG(PALETTE_DATA, (red << 16) | (green << 8) | blue);		}		if (rinfo->is_mobility)			OUTPLL(VCLK_ECP_CNTL, vclk_cntl);	} 	if (regno < 16) {		u32 *pal = info->pseudo_palette;        	switch (rinfo->depth) {		case 15:			pal[regno] = (regno << 10) | (regno << 5) | regno;			break;		case 16:			pal[regno] = (regno << 11) | (regno << 5) | regno;			break;		case 24:			pal[regno] = (regno << 16) | (regno << 8) | regno;			break;		case 32:			i = (regno << 8) | regno;			pal[regno] = (i << 16) | i;			break;		}        }	return 0;}
10457	/local/tlutelli/issta_data/temp/c/2005_temp/2005/10457/7149437669f79b497830e643a2b13d26a017b038/radeon_base.c/buggy/drivers/video/aty/radeon_base.c