962,8 → 962,6 |
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) |
977,6 → 975,7 |
struct fb_con2fbmap con2fb; |
#endif |
struct fb_cmap cmap; |
struct fb_fillrect rect; |
int i; |
|
if (!fb) |
992,6 → 991,23 |
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, |
1174,8 → 1190,7 |
module_put(info->fbops->owner); |
} |
|
if (info->fbops->fb_set_par) |
info->fbops->fb_set_par(info); |
info->fbops->fb_set_par(info); |
fb_pan_display(info, &info->var); |
|
rect.dx = 0; |
1382,10 → 1397,19 |
|
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; |
1393,34 → 1417,13 |
var.xres_virtual = var.xres; |
var.yres_virtual = var.yres; |
|
if (info->fbops->fb_check_var) |
info->fbops->fb_check_var(&var, info); |
|
memcpy(&(info->var),&var,sizeof(struct fb_var_screeninfo)); |
if (fb_ioctl(i, NULL, FBIOPUT_VSCREENINFO, (unsigned long)&var)) { |
kfree(i); |
return -1; |
} |
|
if (info->fbops->fb_set_par) |
info->fbops->fb_set_par(info); |
fb_pan_display(info, &info->var); |
kfree(i); |
|
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); |
|
} |
|
return 0; |
|
} |