patch-2.3.99-pre3 linux/drivers/video/offb.c
Next file: linux/drivers/video/riva/fbdev.c
Previous file: linux/drivers/video/modedb.c
Back to the patch index
Back to the overall index
- Lines: 120
- Date:
Thu Mar 23 10:07:42 2000
- Orig file:
v2.3.99-pre2/linux/drivers/video/offb.c
- Orig date:
Fri Mar 10 16:40:46 2000
diff -u --recursive --new-file v2.3.99-pre2/linux/drivers/video/offb.c linux/drivers/video/offb.c
@@ -94,15 +94,6 @@
static int offb_ioctl(struct inode *inode, struct file *file, u_int cmd,
u_long arg, int con, struct fb_info *info);
-#ifdef CONFIG_FB_COMPAT_XPMAC
-int console_getmode(struct vc_mode *);
-int console_setmode(struct vc_mode *, int);
-int console_setcmap(int, unsigned char *, unsigned char *, unsigned char *);
-int console_powermode(int);
-struct fb_info *console_fb_info = NULL;
-struct vc_mode display_info;
-#endif /* CONFIG_FB_COMPAT_XPMAC */
-
extern boot_infos_t *boot_infos;
static int offb_init_driver(struct device_node *);
@@ -898,103 +889,3 @@
fb_set_cmap(fb_default_cmap(size), 1, offb_setcolreg, info);
}
}
-
-
-#ifdef CONFIG_FB_COMPAT_XPMAC
-
- /*
- * Backward compatibility mode for Xpmac
- */
-
-int console_getmode(struct vc_mode *mode)
-{
- *mode = display_info;
- return 0;
-}
-
-int console_setmode(struct vc_mode *mode, int doit)
-{
- struct fb_var_screeninfo var;
- int cmode, err;
-
- if (!console_fb_info)
- return -EOPNOTSUPP;
- switch (mode->depth) {
- case 8:
- case 0: /* default */
- cmode = CMODE_8;
- break;
- case 16:
- cmode = CMODE_16;
- break;
- case 24:
- case 32:
- cmode = CMODE_32;
- break;
- default:
- return -EINVAL;
- }
- if ((err = mac_vmode_to_var(mode->mode, cmode, &var)))
- return err;
- var.activate = FB_ACTIVATE_TEST;
- err = console_fb_info->fbops->fb_set_var(&var, fg_console,
- console_fb_info);
- if (err || !doit)
- return err;
- else {
- int unit;
- var.activate = FB_ACTIVATE_NOW;
- for (unit = 0; unit < MAX_NR_CONSOLES; unit++)
- if (fb_display[unit].conp &&
- (GET_FB_IDX(console_fb_info->node) == con2fb_map[unit]))
- console_fb_info->fbops->fb_set_var(&var, unit,
- console_fb_info);
- }
- return 0;
-}
-
-static u16 palette_red[16];
-static u16 palette_green[16];
-static u16 palette_blue[16];
-
-static struct fb_cmap palette_cmap = {
- 0, 16, palette_red, palette_green, palette_blue, NULL
-};
-
-int console_setcmap(int n_entries, unsigned char *red, unsigned char *green,
- unsigned char *blue)
-{
- int i, j, n, err;
-
- if (!console_fb_info)
- return -EOPNOTSUPP;
- for (i = 0; i < n_entries; i += n) {
- n = n_entries-i;
- if (n > 16)
- n = 16;
- palette_cmap.start = i;
- palette_cmap.len = n;
- for (j = 0; j < n; j++) {
- palette_cmap.red[j] = (red[i+j] << 8) | red[i+j];
- palette_cmap.green[j] = (green[i+j] << 8) | green[i+j];
- palette_cmap.blue[j] = (blue[i+j] << 8) | blue[i+j];
- }
- err = console_fb_info->fbops->fb_set_cmap(&palette_cmap, 1, fg_console,
- console_fb_info);
- if (err)
- return err;
- }
- return 0;
-}
-
-int console_powermode(int mode)
-{
- if (mode == VC_POWERMODE_INQUIRY)
- return 0;
- if (mode < VESA_NO_BLANKING || mode > VESA_POWERDOWN)
- return -EINVAL;
- /* Not supported */
- return -ENXIO;
-}
-
-#endif /* CONFIG_FB_COMPAT_XPMAC */
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)