return soft_cursor(info, cursor); 
return -ENODEV; 
intelfb_cursor(struct fb_info *info, struct fb_cursor *cursor){        struct intelfb_info *dinfo = GET_DINFO(info);#if VERBOSE > 0	DBG_MSG("intelfb_cursor\n");#endif	if (!dinfo->hwcursor)		return soft_cursor(info, cursor);	intelfbhw_cursor_hide(dinfo);	/* If XFree killed the cursor - restore it */	if (INREG(CURSOR_A_BASEADDR) != dinfo->cursor.offset << 12) {		u32 fg, bg;		DBG_MSG("the cursor was killed - restore it !!\n");		DBG_MSG("size %d, %d   pos %d, %d\n",			cursor->image.width, cursor->image.height,			cursor->image.dx, cursor->image.dy);		intelfbhw_cursor_init(dinfo);		intelfbhw_cursor_reset(dinfo);		intelfbhw_cursor_setpos(dinfo, cursor->image.dx,					cursor->image.dy);		if (dinfo->depth != 8) {			fg =dinfo->pseudo_palette[cursor->image.fg_color];			bg =dinfo->pseudo_palette[cursor->image.bg_color];		} else {			fg = cursor->image.fg_color;			bg = cursor->image.bg_color;		}		intelfbhw_cursor_setcolor(dinfo, bg, fg);		intelfbhw_cursor_load(dinfo, cursor->image.width,				      cursor->image.height,				      dinfo->cursor_src);		if (cursor->enable)			intelfbhw_cursor_show(dinfo);		return 0;	}	if (cursor->set & FB_CUR_SETPOS) {		u32 dx, dy;		dx = cursor->image.dx - info->var.xoffset;		dy = cursor->image.dy - info->var.yoffset;		intelfbhw_cursor_setpos(dinfo, dx, dy);	}	if (cursor->set & FB_CUR_SETSIZE) {		if (cursor->image.width > 64 || cursor->image.height > 64)			return -ENXIO;		intelfbhw_cursor_reset(dinfo);	}	if (cursor->set & FB_CUR_SETCMAP) {		u32 fg, bg;		if (dinfo->depth != 8) {			fg = dinfo->pseudo_palette[cursor->image.fg_color];			bg = dinfo->pseudo_palette[cursor->image.bg_color];		} else {			fg = cursor->image.fg_color;			bg = cursor->image.bg_color;		}		intelfbhw_cursor_setcolor(dinfo, bg, fg);	}	if (cursor->set & (FB_CUR_SETSHAPE | FB_CUR_SETIMAGE)) {		u32 s_pitch = (ROUND_UP_TO(cursor->image.width, 8) / 8);		u32 size = s_pitch * cursor->image.height;		u8 *dat = (u8 *) cursor->image.data;		u8 *msk = (u8 *) cursor->mask;		u8 src[64];		u32 i;		if (cursor->image.depth != 1)			return -ENXIO;		switch (cursor->rop) {		case ROP_XOR:			for (i = 0; i < size; i++)				src[i] = dat[i] ^ msk[i];			break;		case ROP_COPY:		default:			for (i = 0; i < size; i++)				src[i] = dat[i] & msk[i];			break;		}		/* save the bitmap to restore it when XFree will		   make the cursor dirty */		memcpy(dinfo->cursor_src, src, size);		intelfbhw_cursor_load(dinfo, cursor->image.width,				      cursor->image.height, src);	}	if (cursor->enable)		intelfbhw_cursor_show(dinfo);	return 0;}
10457	/local/tlutelli/issta_data/temp/c/2005_temp/2005/10457/c465e05a03209651078b95686158648fd7ed84c5/intelfbdrv.c/buggy/drivers/video/intelfb/intelfbdrv.c