From: Franz S. <fs...@us...> - 2001-11-22 12:56:54
|
Update of /cvsroot/linuxconsole/ruby/linux/drivers/video In directory usw-pr-cvs1:/tmp/cvs-serv8040 Modified Files: Config.in aty128fb.c macmodes.c offb.c Log Message: Delete CONFIG_FB_COMPAT_XPMAC, so it doesn't leak into 2.5.\naty128fb gcc3 fix. Index: Config.in =================================================================== RCS file: /cvsroot/linuxconsole/ruby/linux/drivers/video/Config.in,v retrieving revision 1.53 retrieving revision 1.54 diff -u -d -r1.53 -r1.54 --- Config.in 2001/10/29 00:11:00 1.53 +++ Config.in 2001/11/22 12:56:48 1.54 @@ -76,7 +76,6 @@ fi fi if [ "$CONFIG_PPC" = "y" ]; then - bool 'Backward compatibility mode for Xpmac' CONFIG_FB_COMPAT_XPMAC bool ' Open Firmware frame buffer device support' CONFIG_FB_OF bool ' Apple "control" display support' CONFIG_FB_CONTROL bool ' Apple "platinum" display support' CONFIG_FB_PLATINUM Index: aty128fb.c =================================================================== RCS file: /cvsroot/linuxconsole/ruby/linux/drivers/video/aty128fb.c,v retrieving revision 1.15 retrieving revision 1.16 diff -u -d -r1.15 -r1.16 --- aty128fb.c 2001/11/21 00:49:48 1.15 +++ aty128fb.c 2001/11/22 12:56:48 1.16 @@ -62,10 +62,6 @@ #include <asm/backlight.h> #endif -#ifdef CONFIG_FB_COMPAT_XPMAC -#include <asm/vc_ioctl.h> -#endif - #ifdef CONFIG_MTRR #include <asm/mtrr.h> #endif @@ -141,7 +137,7 @@ }; /* supported Rage128 chipsets */ -static const struct aty128_chip_info aty128_pci_probe_list[] __initdata = +static struct aty128_chip_info aty128_pci_probe_list[] __initdata = { {"Rage128 RE (PCI)", PCI_DEVICE_ID_ATI_RAGE128_RE, rage_128}, {"Rage128 RF (AGP)", PCI_DEVICE_ID_ATI_RAGE128_RF, rage_128}, @@ -1062,26 +1058,6 @@ info->fix.line_length = (info->var.xres_virtual * par->crtc.bpp) >> 3; info->fix.visual = par->crtc.bpp <= 8 ? FB_VISUAL_PSEUDOCOLOR : FB_VISUAL_DIRECTCOLOR; -#ifdef CONFIG_FB_COMPAT_XPMAC - if (!console_fb_info || console_fb_info == &info) { - struct fb_var_screeninfo var; - int cmode, vmode; - - display_info.height = ((par->crtc.v_total >> 16) & 0x7ff) + 1; - display_info.width = (((par->crtc.h_total >> 16) & 0xff) + 1) << 3; - display_info.depth = par->crtc.bpp; - display_info.pitch = (info->var.xres_virtual * par->crtc.bpp) >> 3; - if (mac_var_to_vmode(&var, &vmode, &cmode)) - display_info.mode = 0; - else - display_info.mode = vmode; - strcpy(display_info.name, info->fix.id); - display_info.fb_address = info->fix.smem_start; - display_info.cmap_adr_address = 0; - display_info.cmap_data_address = 0; - display_info.disp_reg_address = info->mmio_start; - } -#endif /* CONFIG_FB_COMPAT_XPMAC */ return 0; } @@ -1412,11 +1388,6 @@ printk(KERN_INFO "aty128fb: Rage128 MTRR set to ON\n"); } #endif /* CONFIG_MTRR */ - -#ifdef CONFIG_FB_COMPAT_XPMAC - if (!console_fb_info) - console_fb_info = info; -#endif return 0; Index: macmodes.c =================================================================== RCS file: /cvsroot/linuxconsole/ruby/linux/drivers/video/macmodes.c,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- macmodes.c 2001/07/16 21:36:46 1.1 +++ macmodes.c 2001/11/22 12:56:49 1.2 @@ -20,10 +20,6 @@ #include <linux/fb.h> #include <linux/string.h> -#ifdef CONFIG_FB_COMPAT_XPMAC -#include <asm/vc_ioctl.h> -#endif - #include "fbcon.h" #include <video/macmodes.h> @@ -206,170 +202,6 @@ { 0xBEEF, VMODE_1600_1024_60 }, /* 22" Apple Cinema Display */ { -1, VMODE_640_480_60 }, /* catch-all, must be last */ }; - -#ifdef CONFIG_FB_COMPAT_XPMAC -struct fb_info *console_fb_info = NULL; -struct vc_mode display_info; - -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 -}; - - -/** - * console_getmode - get current mode - * @mode: virtual console mode structure - * - * Populates @mode with the current mode held in the global - * display_info structure. - * - * Note, this function is only for XPMAC compatibility. - * - * Returns zero. - */ - -int console_getmode(struct vc_mode *mode) -{ - *mode = display_info; - return 0; -} - - -/** - * console_setmode - sets current console mode - * @mode: virtual console mode structure - * @doit: boolean, 0 test mode, 1 test and activate mode - * - * Sets @mode for all virtual consoles if @doit is non-zero, - * otherwise, test a mode for validity. - * - * Note, this function is only for XPMAC compatibility. - * - * Returns negative errno on error, or zero for success. - * - */ - -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 0: - case 8: - 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; -} - - -/** - * console_setcmap - sets palette color map for console - * @n_entries: number of entries in the palette (max 16) - * @red: value for red component of palette - * @green: value for green component of palette - * @blue: value for blue component of palette - * - * Sets global palette_cmap structure and activates the palette - * on the current console. - * - * Note, this function is only for XPMAC compatibility. - * - * Returns negative errno on error, or zero for success. - * - */ - -int console_setcmap(int n_entries, unsigned char *red, unsigned char *green, - unsigned char *blue) -{ - int i, j, n = 0, 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; -} - - -/** - * console_powermode - sets monitor power mode - * @mode: power state to set - * - * Sets power state as dictated by @mode. - * - * Note that this function is only for XPMAC compatibility and - * doesn't do much. - * - * Returns 0 for %VC_POWERMODE_INQUIRY, -EINVAL for VESA power - * settings, or -ENIXIO on failure. - * - */ - -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 */ /** Index: offb.c =================================================================== RCS file: /cvsroot/linuxconsole/ruby/linux/drivers/video/offb.c,v retrieving revision 1.13 retrieving revision 1.14 diff -u -d -r1.13 -r1.14 --- offb.c 2001/10/15 01:13:17 1.13 +++ offb.c 2001/11/22 12:56:49 1.14 @@ -26,9 +26,6 @@ #include <linux/fb.h> #include <linux/init.h> #include <linux/ioport.h> -#ifdef CONFIG_FB_COMPAT_XPMAC -#include <asm/vc_ioctl.h> -#endif #include <asm/io.h> #include <asm/prom.h> #ifdef CONFIG_BOOTX_TEXT @@ -388,28 +385,6 @@ printk(KERN_INFO "fb%d: Open Firmware frame buffer device on %s\n", GET_FB_IDX(info->node), full_name); -#ifdef CONFIG_FB_COMPAT_XPMAC - if (!console_fb_info) { - display_info.height = var->yres; - display_info.width = var->xres; - display_info.depth = depth; - display_info.pitch = fix->line_length; - display_info.mode = 0; - strncpy(display_info.name, name, sizeof(display_info.name)); - display_info.fb_address = address; - display_info.cmap_adr_address = 0; - display_info.cmap_data_address = 0; - display_info.disp_reg_address = 0; - /* XXX kludge for ati */ - if (par->cmap_type == cmap_m64) { - unsigned long base = address & 0xff000000UL; - display_info.disp_reg_address = base + 0x7ffc00; - display_info.cmap_adr_address = base + 0x7ffcc0; - display_info.cmap_data_address = base + 0x7ffcc1; - } - console_fb_info = info; - } -#endif /* CONFIG_FB_COMPAT_XPMAC) */ } /* |