Subversion Repositories shark

Compare Revisions

Ignore whitespace Rev 483 → Rev 484

/shark/trunk/drivers/fb/fbmem.c
962,6 → 962,8
return fb_set_cmap(&cmap, 1, info);
}
 
int debx,deby,debb;
 
int
fb_ioctl(struct inode *inode, struct file *file, unsigned int cmd,
unsigned long arg)
975,7 → 977,6
struct fb_con2fbmap con2fb;
#endif
struct fb_cmap cmap;
struct fb_fillrect rect;
int i;
if (!fb)
991,23 → 992,6
if (i) return i;
if (copy_to_user((void *) arg, &var, sizeof(var)))
return -EFAULT;
 
rect.dx = 0;
rect.dy = 0;
rect.width = info->var.xres;
rect.height = info->var.yres;
rect.color = 0;
rect.rop = ROP_COPY;
cfb_fillrect(info,&rect);
if (info->var.bits_per_pixel >= 8) {
fb_prepare_logo(info);
fb_show_logo(info);
}
 
return 0;
case FBIOGET_FSCREENINFO:
return copy_to_user((void *) arg, &info->fix,
1190,7 → 1174,8
module_put(info->fbops->owner);
}
 
info->fbops->fb_set_par(info);
if (info->fbops->fb_set_par)
info->fbops->fb_set_par(info);
fb_pan_display(info, &info->var);
 
rect.dx = 0;
1397,19 → 1382,10
 
int fb_set_mode_inode(int num, unsigned char *modeopt) {
 
struct inode *i;
struct fb_var_screeninfo var;
struct fb_info *info = registered_fb[num];
struct fb_fillrect rect;
 
i = (struct inode *)kmalloc(sizeof(struct inode),GFP_KERNEL);
 
linuxcomp_setfd(i,num);
 
if (fb_ioctl(i, NULL, FBIOGET_VSCREENINFO, (unsigned long)&var)) {
kfree(i);
return -1;
}
 
fb_find_mode(&var,info,modeopt,NULL,0,NULL,0);
 
var.xoffset = 0;
1417,13 → 1393,34
var.xres_virtual = var.xres;
var.yres_virtual = var.yres;
 
if (fb_ioctl(i, NULL, FBIOPUT_VSCREENINFO, (unsigned long)&var)) {
kfree(i);
return -1;
if (info->fbops->fb_check_var)
info->fbops->fb_check_var(&var, info);
memcpy(&(info->var),&var,sizeof(struct fb_var_screeninfo));
 
if (info->fbops->fb_set_par)
info->fbops->fb_set_par(info);
fb_pan_display(info, &info->var);
 
if (info->var.bits_per_pixel > 8)
info->fix.visual = FB_VISUAL_TRUECOLOR;
 
rect.dx = 0;
rect.dy = 0;
rect.width = info->var.xres;
rect.height = info->var.yres;
rect.color = 0;
rect.rop = ROP_COPY;
cfb_fillrect(info,&rect);
if (info->var.bits_per_pixel >= 8) {
fb_prepare_logo(info);
fb_show_logo(info);
}
 
kfree(i);
 
return 0;
}