Commit 6a82aae9 authored by James Simmons's avatar James Simmons

Removed old FB_COMPAT_XPMAC stuff. Ported over the Riva framebuffer driver...

Removed old FB_COMPAT_XPMAC stuff. Ported over the Riva framebuffer driver over to the new api. Updated the Voodoo 1 driver.
parent 75977a47
...@@ -241,12 +241,6 @@ CONFIG_FB ...@@ -241,12 +241,6 @@ CONFIG_FB
and strongly recommended if you are compiling a kernel for an Apple and strongly recommended if you are compiling a kernel for an Apple
machine. machine.
CONFIG_FB_COMPAT_XPMAC
If you use the Xpmac X server (common with mklinux), you'll need to
say Y here to use X. You should consider changing to XFree86 which
includes a server that supports the frame buffer device directly
(XF68_FBDev).
CONFIG_SCSI CONFIG_SCSI
If you want to use a SCSI hard disk, SCSI tape drive, SCSI CD-ROM or If you want to use a SCSI hard disk, SCSI tape drive, SCSI CD-ROM or
any other SCSI device under Linux, say Y and make sure that you know any other SCSI device under Linux, say Y and make sure that you know
......
...@@ -481,9 +481,6 @@ if [ "$CONFIG_4xx" != "y" -a "$CONFIG_8xx" != "y" ]; then ...@@ -481,9 +481,6 @@ if [ "$CONFIG_4xx" != "y" -a "$CONFIG_8xx" != "y" ]; then
bool 'Support for VGA Console' CONFIG_VGA_CONSOLE bool 'Support for VGA Console' CONFIG_VGA_CONSOLE
fi fi
source drivers/video/Config.in source drivers/video/Config.in
if [ "$CONFIG_FB" = "y" -a "$CONFIG_ALL_PPC" = "y" ]; then
bool 'Backward compatibility mode for Xpmac' CONFIG_FB_COMPAT_XPMAC
fi
endmenu endmenu
......
...@@ -33,10 +33,6 @@ ...@@ -33,10 +33,6 @@
#include <linux/kbd_diacr.h> #include <linux/kbd_diacr.h>
#include <linux/selection.h> #include <linux/selection.h>
#ifdef CONFIG_FB_COMPAT_XPMAC
#include <asm/vc_ioctl.h>
#endif /* CONFIG_FB_COMPAT_XPMAC */
char vt_dont_switch; char vt_dont_switch;
extern struct tty_driver console_driver; extern struct tty_driver console_driver;
...@@ -1047,68 +1043,6 @@ int vt_ioctl(struct tty_struct *tty, struct file * file, ...@@ -1047,68 +1043,6 @@ int vt_ioctl(struct tty_struct *tty, struct file * file,
return -EPERM; return -EPERM;
vt_dont_switch = 0; vt_dont_switch = 0;
return 0; return 0;
#ifdef CONFIG_FB_COMPAT_XPMAC
case VC_GETMODE:
{
struct vc_mode mode;
i = verify_area(VERIFY_WRITE, (void *) arg,
sizeof(struct vc_mode));
if (i == 0)
i = console_getmode(&mode);
if (i)
return i;
if (copy_to_user((void *) arg, &mode, sizeof(mode)))
return -EFAULT;
return 0;
}
case VC_SETMODE:
case VC_INQMODE:
{
struct vc_mode mode;
if (!perm)
return -EPERM;
if (copy_from_user(&mode, (void *) arg, sizeof(mode)))
return -EFAULT;
return console_setmode(&mode, cmd == VC_SETMODE);
}
case VC_SETCMAP:
{
unsigned char cmap[3][256], *p;
int n_entries, cmap_size, i, j;
if (!perm)
return -EPERM;
if (arg == (unsigned long) VC_POWERMODE_INQUIRY
|| arg <= VESA_POWERDOWN) {
/* compatibility hack: VC_POWERMODE
was changed from 0x766a to 0x766c */
return console_powermode((int) arg);
}
if (get_user(cmap_size, (int *) arg))
return -EFAULT;
if (cmap_size % 3)
return -EINVAL;
n_entries = cmap_size / 3;
if ((unsigned) n_entries > 256)
return -EINVAL;
p = (unsigned char *) (arg + sizeof(int));
for (j = 0; j < n_entries; ++j)
for (i = 0; i < 3; ++i)
if (get_user(cmap[i][j], p++))
return -EFAULT;
return console_setcmap(n_entries, cmap[0],
cmap[1], cmap[2]);
}
case VC_GETCMAP:
/* not implemented yet */
return -ENOIOCTLCMD;
case VC_POWERMODE:
if (!perm)
return -EPERM;
return console_powermode((int) arg);
#endif /* CONFIG_FB_COMPAT_XPMAC */
default: default:
return -ENOIOCTLCMD; return -ENOIOCTLCMD;
} }
......
...@@ -271,9 +271,8 @@ if [ "$CONFIG_FB" = "y" ]; then ...@@ -271,9 +271,8 @@ if [ "$CONFIG_FB" = "y" ]; then
"$CONFIG_FB_IGA" = "y" -o "$CONFIG_FB_MATROX" = "y" -o \ "$CONFIG_FB_IGA" = "y" -o "$CONFIG_FB_MATROX" = "y" -o \
"$CONFIG_FB_CT65550" = "y" -o "$CONFIG_FB_PM2" = "y" -o \ "$CONFIG_FB_CT65550" = "y" -o "$CONFIG_FB_PM2" = "y" -o \
"$CONFIG_FB_P9100" = "y" -o "$CONFIG_FB_ATY128" = "y" -o \ "$CONFIG_FB_P9100" = "y" -o "$CONFIG_FB_ATY128" = "y" -o \
"$CONFIG_FB_RIVA" = "y" -o "$CONFIG_FB_RADEON" = "y" -o \ "$CONFIG_FB_SA1100" = "y" -o "$CONFIG_FB_RADEON" = "y" -o \
"$CONFIG_FB_SGIVW" = "y" -o "$CONFIG_FB_CYBER2000" = "y" -o \ "$CONFIG_FB_SGIVW" = "y" -o "$CONFIG_FB_CYBER2000" = "y" ]; then
"$CONFIG_FB_SA1100" = "y" ]; then
define_tristate CONFIG_FBCON_CFB8 y define_tristate CONFIG_FBCON_CFB8 y
else else
if [ "$CONFIG_FB_ACORN" = "m" -o "$CONFIG_FB_ATARI" = "m" -o \ if [ "$CONFIG_FB_ACORN" = "m" -o "$CONFIG_FB_ATARI" = "m" -o \
...@@ -288,9 +287,8 @@ if [ "$CONFIG_FB" = "y" ]; then ...@@ -288,9 +287,8 @@ if [ "$CONFIG_FB" = "y" ]; then
"$CONFIG_FB_IGA" = "m" -o "$CONFIG_FB_MATROX" = "m" -o \ "$CONFIG_FB_IGA" = "m" -o "$CONFIG_FB_MATROX" = "m" -o \
"$CONFIG_FB_CT65550" = "m" -o "$CONFIG_FB_PM2" = "m" -o \ "$CONFIG_FB_CT65550" = "m" -o "$CONFIG_FB_PM2" = "m" -o \
"$CONFIG_FB_P9100" = "m" -o "$CONFIG_FB_ATY128" = "m" -o \ "$CONFIG_FB_P9100" = "m" -o "$CONFIG_FB_ATY128" = "m" -o \
"$CONFIG_FB_RIVA" = "m" -o "$CONFIG_FB_RADEON" = "m" -o \ "$CONFIG_FB_SA1100" = "m" -o "$CONFIG_FB_RADEON" = "m" -o \
"$CONFIG_FB_SGIVW" = "m" -o "$CONFIG_FB_CYBER2000" = "m" -o \ "$CONFIG_FB_SGIVW" = "m" -o "$CONFIG_FB_CYBER2000" = "m" ]; then
"$CONFIG_FB_SA1100" = "m" ]; then
define_tristate CONFIG_FBCON_CFB8 m define_tristate CONFIG_FBCON_CFB8 m
fi fi
fi fi
...@@ -303,9 +301,9 @@ if [ "$CONFIG_FB" = "y" ]; then ...@@ -303,9 +301,9 @@ if [ "$CONFIG_FB" = "y" ]; then
"$CONFIG_FB_VALKYRIE" = "y" -o "$CONFIG_FB_PLATINUM" = "y" -o \ "$CONFIG_FB_VALKYRIE" = "y" -o "$CONFIG_FB_PLATINUM" = "y" -o \
"$CONFIG_FB_CT65550" = "y" -o "$CONFIG_FB_MATROX" = "y" -o \ "$CONFIG_FB_CT65550" = "y" -o "$CONFIG_FB_MATROX" = "y" -o \
"$CONFIG_FB_PM2" = "y" -o "$CONFIG_FB_SGIVW" = "y" -o \ "$CONFIG_FB_PM2" = "y" -o "$CONFIG_FB_SGIVW" = "y" -o \
"$CONFIG_FB_RIVA" = "y" -o "$CONFIG_FB_ATY128" = "y" -o \ "$CONFIG_FB_SA1100" = "y" -o "$CONFIG_FB_ATY128" = "y" -o \
"$CONFIG_FB_CYBER2000" = "y" -o "$CONFIG_FB_PM3" = "y" -o \ "$CONFIG_FB_CYBER2000" = "y" -o "$CONFIG_FB_PM3" = "y" -o \
"$CONFIG_FB_SIS" = "y" -o "$CONFIG_FB_SA1100" = "y" ]; then "$CONFIG_FB_SIS" = "y" ]; then
define_tristate CONFIG_FBCON_CFB16 y define_tristate CONFIG_FBCON_CFB16 y
else else
if [ "$CONFIG_FB_ATARI" = "m" -o "$CONFIG_FB_ATY" = "m" -o \ if [ "$CONFIG_FB_ATARI" = "m" -o "$CONFIG_FB_ATY" = "m" -o \
...@@ -317,9 +315,9 @@ if [ "$CONFIG_FB" = "y" ]; then ...@@ -317,9 +315,9 @@ if [ "$CONFIG_FB" = "y" ]; then
"$CONFIG_FB_VALKYRIE" = "m" -o "$CONFIG_FB_PLATINUM" = "m" -o \ "$CONFIG_FB_VALKYRIE" = "m" -o "$CONFIG_FB_PLATINUM" = "m" -o \
"$CONFIG_FB_CT65550" = "m" -o "$CONFIG_FB_MATROX" = "m" -o \ "$CONFIG_FB_CT65550" = "m" -o "$CONFIG_FB_MATROX" = "m" -o \
"$CONFIG_FB_PM2" = "m" -o "$CONFIG_FB_SGIVW" = "m" -o \ "$CONFIG_FB_PM2" = "m" -o "$CONFIG_FB_SGIVW" = "m" -o \
"$CONFIG_FB_RIVA" = "m" -o "$CONFIG_FB_ATY128" = "m" -o \ "$CONFIG_FB_SA1100" = "m" -o "$CONFIG_FB_ATY128" = "m" -o \
"$CONFIG_FB_CYBER2000" = "m" -o "$CONFIG_FB_SIS" = "m" -o \ "$CONFIG_FB_CYBER2000" = "m" -o "$CONFIG_FB_SIS" = "m" -o \
"$CONFIG_FB_SA1100" = "m" -o "$CONFIG_FB_RADEON" = "m" ]; then "$CONFIG_FB_RADEON" = "m" ]; then
define_tristate CONFIG_FBCON_CFB16 m define_tristate CONFIG_FBCON_CFB16 m
fi fi
fi fi
...@@ -345,10 +343,9 @@ if [ "$CONFIG_FB" = "y" ]; then ...@@ -345,10 +343,9 @@ if [ "$CONFIG_FB" = "y" ]; then
"$CONFIG_FB_CONTROL" = "y" -o "$CONFIG_FB_CLGEN" = "y" -o \ "$CONFIG_FB_CONTROL" = "y" -o "$CONFIG_FB_CLGEN" = "y" -o \
"$CONFIG_FB_TGA" = "y" -o "$CONFIG_FB_PLATINUM" = "y" -o \ "$CONFIG_FB_TGA" = "y" -o "$CONFIG_FB_PLATINUM" = "y" -o \
"$CONFIG_FB_MATROX" = "y" -o "$CONFIG_FB_PM2" = "y" -o \ "$CONFIG_FB_MATROX" = "y" -o "$CONFIG_FB_PM2" = "y" -o \
"$CONFIG_FB_RIVA" = "y" -o "$CONFIG_FB_ATY128" = "y" -o \ "$CONFIG_FB_PVR2" = "y" -o "$CONFIG_FB_ATY128" = "y" -o \
"$CONFIG_FB_SIS" = "y" -o "$CONFIG_FB_SGIVW" = "y" -o \ "$CONFIG_FB_SIS" = "y" -o "$CONFIG_FB_SGIVW" = "y" -o \
"$CONFIG_FB_RADEON" = "y" -o "$CONFIG_FB_PVR2" = "y" -o \ "$CONFIG_FB_RADEON" = "y" -o "$CONFIG_FB_PM3" = "y" ]; then
"$CONFIG_FB_PM3" = "y" ]; then
define_tristate CONFIG_FBCON_CFB32 y define_tristate CONFIG_FBCON_CFB32 y
else else
if [ "$CONFIG_FB_ATARI" = "m" -o "$CONFIG_FB_ATY" = "m" -o \ if [ "$CONFIG_FB_ATARI" = "m" -o "$CONFIG_FB_ATY" = "m" -o \
...@@ -356,10 +353,9 @@ if [ "$CONFIG_FB" = "y" ]; then ...@@ -356,10 +353,9 @@ if [ "$CONFIG_FB" = "y" ]; then
"$CONFIG_FB_CONTROL" = "m" -o "$CONFIG_FB_CLGEN" = "m" -o \ "$CONFIG_FB_CONTROL" = "m" -o "$CONFIG_FB_CLGEN" = "m" -o \
"$CONFIG_FB_TGA" = "m" -o "$CONFIG_FB_PLATINUM" = "m" -o \ "$CONFIG_FB_TGA" = "m" -o "$CONFIG_FB_PLATINUM" = "m" -o \
"$CONFIG_FB_MATROX" = "m" -o "$CONFIG_FB_PM2" = "m" -o \ "$CONFIG_FB_MATROX" = "m" -o "$CONFIG_FB_PM2" = "m" -o \
"$CONFIG_FB_RIVA" = "m" -o "$CONFIG_FB_ATY128" = "m" -o \ "$CONFIG_FB_PVR2" = "m" -o "$CONFIG_FB_ATY128" = "m" -o \
"$CONFIG_FB_PM3" = "m" -o "$CONFIG_FB_RADEON" = "m" -o \ "$CONFIG_FB_PM3" = "m" -o "$CONFIG_FB_RADEON" = "m" -o \
"$CONFIG_FB_SGIVW" = "m" -o "$CONFIG_FB_SIS" = "m" -o \ "$CONFIG_FB_SGIVW" = "m" -o "$CONFIG_FB_SIS" = "m" ]; then
"$CONFIG_FB_PVR2" = "m" ]; then
define_tristate CONFIG_FBCON_CFB32 m define_tristate CONFIG_FBCON_CFB32 m
fi fi
fi fi
...@@ -370,12 +366,14 @@ if [ "$CONFIG_FB" = "y" ]; then ...@@ -370,12 +366,14 @@ if [ "$CONFIG_FB" = "y" ]; then
"$CONFIG_FB_VIRTUAL" = "y" -o "$CONFIG_FB_CLPS711X" = "y" -o \ "$CONFIG_FB_VIRTUAL" = "y" -o "$CONFIG_FB_CLPS711X" = "y" -o \
"$CONFIG_FB_PMAG_BA" = "y" -o "$CONFIG_FB_PMAGB_B" = "y" -o \ "$CONFIG_FB_PMAG_BA" = "y" -o "$CONFIG_FB_PMAGB_B" = "y" -o \
"$CONFIG_FB_3DFX" = "y" -o "$CONFIG_FB_TX3912" = "y" -o \ "$CONFIG_FB_3DFX" = "y" -o "$CONFIG_FB_TX3912" = "y" -o \
"$CONFIG_FB_MAXINE" = "y" -o "$CONFIG_FB_APOLLO" = "y" ]; then "$CONFIG_FB_MAXINE" = "y" -o "$CONFIG_FB_APOLLO" = "y" -o \
"$CONFIG_FB_RIVA" = "y" ]; then
define_tristate CONFIG_FBCON_ACCEL y define_tristate CONFIG_FBCON_ACCEL y
else else
if [ "$CONFIG_FB_NEOMAGIC" = "m" -o "$CONFIG_FB_HIT" = "m" -o \ if [ "$CONFIG_FB_NEOMAGIC" = "m" -o "$CONFIG_FB_HIT" = "m" -o \
"$CONFIG_FB_G364" = "m" -o "$CONFIG_FB_VIRTUAL" = "m" -o \ "$CONFIG_FB_G364" = "m" -o "$CONFIG_FB_VIRTUAL" = "m" -o \
"$CONFIG_FB_CLPS711X" = "m" -o "$CONFIG_FB_3DFX" = "m" ]; then "$CONFIG_FB_CLPS711X" = "m" -o "$CONFIG_FB_3DFX" = "m" -o \
"$CONFIG_FB_RIVA" = "m" ]; then
define_tristate CONFIG_FBCON_ACCEL m define_tristate CONFIG_FBCON_ACCEL m
fi fi
fi fi
......
...@@ -41,9 +41,6 @@ ...@@ -41,9 +41,6 @@
#include <asm/prom.h> #include <asm/prom.h>
#include <asm/pci-bridge.h> #include <asm/pci-bridge.h>
#include <linux/pci.h> #include <linux/pci.h>
#ifdef CONFIG_FB_COMPAT_XPMAC
#include <asm/vc_ioctl.h>
#endif
#include <video/fbcon.h> #include <video/fbcon.h>
#include <video/fbcon-cfb8.h> #include <video/fbcon-cfb8.h>
...@@ -540,22 +537,6 @@ static void __init s3triofb_of_init(struct device_node *dp) ...@@ -540,22 +537,6 @@ static void __init s3triofb_of_init(struct device_node *dp)
fb_info.setcmap = &s3triofbcon_setcmap; fb_info.setcmap = &s3triofbcon_setcmap;
#endif #endif
#ifdef CONFIG_FB_COMPAT_XPMAC
if (!console_fb_info) {
display_info.height = fb_var.yres;
display_info.width = fb_var.xres;
display_info.depth = 8;
display_info.pitch = fb_fix.line_length;
display_info.mode = 0;
strncpy(display_info.name, dp->name, sizeof(display_info.name));
display_info.fb_address = (unsigned long)fb_fix.smem_start;
display_info.disp_reg_address = address + 0x1008000;
display_info.cmap_adr_address = address + 0x1008000 + 0x3c8;
display_info.cmap_data_address = address + 0x1008000 + 0x3c9;
console_fb_info = &fb_info;
}
#endif /* CONFIG_FB_COMPAT_XPMAC) */
fb_info.flags = FBINFO_FLAG_DEFAULT; fb_info.flags = FBINFO_FLAG_DEFAULT;
if (register_framebuffer(&fb_info) < 0) if (register_framebuffer(&fb_info) < 0)
return; return;
......
...@@ -93,9 +93,6 @@ ...@@ -93,9 +93,6 @@
#ifdef CONFIG_NVRAM #ifdef CONFIG_NVRAM
#include <linux/nvram.h> #include <linux/nvram.h>
#endif #endif
#ifdef CONFIG_FB_COMPAT_XPMAC
#include <asm/vc_ioctl.h>
#endif
#ifdef CONFIG_PMAC_BACKLIGHT #ifdef CONFIG_PMAC_BACKLIGHT
#include <asm/backlight.h> #include <asm/backlight.h>
#endif #endif
...@@ -798,26 +795,6 @@ static void atyfb_set_par(const struct atyfb_par *par, ...@@ -798,26 +795,6 @@ static void atyfb_set_par(const struct atyfb_par *par,
if (par->accel_flags & FB_ACCELF_TEXT) if (par->accel_flags & FB_ACCELF_TEXT)
aty_init_engine(par, info); aty_init_engine(par, info);
#ifdef CONFIG_FB_COMPAT_XPMAC
if (!console_fb_info || console_fb_info == &info->fb_info) {
struct fb_var_screeninfo var;
int vmode, cmode;
display_info.height = ((par->crtc.v_tot_disp>>16) & 0x7ff)+1;
display_info.width = (((par->crtc.h_tot_disp>>16) & 0xff)+1)*8;
display_info.depth = par->crtc.bpp;
display_info.pitch = par->crtc.vxres*par->crtc.bpp/8;
atyfb_encode_var(&var, par, info);
if (mac_var_to_vmode(&var, &vmode, &cmode))
display_info.mode = 0;
else
display_info.mode = vmode;
strcpy(display_info.name, atyfb_name);
display_info.fb_address = info->frame_buffer_phys;
display_info.cmap_adr_address = info->ati_regbase_phys+0xc0;
display_info.cmap_data_address = info->ati_regbase_phys+0xc1;
display_info.disp_reg_address = info->ati_regbase_phys;
}
#endif /* CONFIG_FB_COMPAT_XPMAC */
#ifdef CONFIG_BOOTX_TEXT #ifdef CONFIG_BOOTX_TEXT
btext_update_display(info->frame_buffer_phys, btext_update_display(info->frame_buffer_phys,
(((par->crtc.h_tot_disp>>16) & 0xff)+1)*8, (((par->crtc.h_tot_disp>>16) & 0xff)+1)*8,
...@@ -2454,11 +2431,6 @@ int __init atyfb_init(void) ...@@ -2454,11 +2431,6 @@ int __init atyfb_init(void)
info->next = first_display; info->next = first_display;
first_display = info; first_display = info;
#endif #endif
#ifdef CONFIG_FB_COMPAT_XPMAC
if (!console_fb_info)
console_fb_info = &info->fb_info;
#endif /* CONFIG_FB_COMPAT_XPMAC */
} }
} }
......
...@@ -67,9 +67,6 @@ ...@@ -67,9 +67,6 @@
#include <asm/backlight.h> #include <asm/backlight.h>
#endif #endif
#ifdef CONFIG_FB_COMPAT_XPMAC
#include <asm/vc_ioctl.h>
#endif
#ifdef CONFIG_BOOTX_TEXT #ifdef CONFIG_BOOTX_TEXT
#include <asm/btext.h> #include <asm/btext.h>
#endif /* CONFIG_BOOTX_TEXT */ #endif /* CONFIG_BOOTX_TEXT */
...@@ -1231,27 +1228,6 @@ aty128_set_par(struct aty128fb_par *par, ...@@ -1231,27 +1228,6 @@ aty128_set_par(struct aty128fb_par *par,
if (par->accel_flags & FB_ACCELF_TEXT) if (par->accel_flags & FB_ACCELF_TEXT)
aty128_init_engine(par, info); aty128_init_engine(par, info);
#ifdef CONFIG_FB_COMPAT_XPMAC
if (!console_fb_info || console_fb_info == &info->fb_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 = (par->crtc.vxres * par->crtc.bpp) >> 3;
aty128_encode_var(&var, par, info);
if (mac_var_to_vmode(&var, &vmode, &cmode))
display_info.mode = 0;
else
display_info.mode = vmode;
strcpy(display_info.name, aty128fb_name);
display_info.fb_address = info->frame_buffer_phys;
display_info.cmap_adr_address = 0;
display_info.cmap_data_address = 0;
display_info.disp_reg_address = info->regbase_phys;
}
#endif /* CONFIG_FB_COMPAT_XPMAC */
#if defined(CONFIG_BOOTX_TEXT) #if defined(CONFIG_BOOTX_TEXT)
btext_update_display(info->frame_buffer_phys, btext_update_display(info->frame_buffer_phys,
(((par->crtc.h_total>>16) & 0xff)+1)*8, (((par->crtc.h_total>>16) & 0xff)+1)*8,
...@@ -1928,11 +1904,6 @@ aty128_pci_register(struct pci_dev *pdev, ...@@ -1928,11 +1904,6 @@ aty128_pci_register(struct pci_dev *pdev,
} }
#endif /* CONFIG_MTRR */ #endif /* CONFIG_MTRR */
#ifdef CONFIG_FB_COMPAT_XPMAC
if (!console_fb_info)
console_fb_info = &info->fb_info;
#endif
return 0; return 0;
err_out: err_out:
......
...@@ -31,10 +31,6 @@ ...@@ -31,10 +31,6 @@
#include <linux/pci.h> #include <linux/pci.h>
#include <asm/io.h> #include <asm/io.h>
#ifdef CONFIG_FB_COMPAT_XPMAC
#include <asm/vc_ioctl.h>
#include <asm/pci-bridge.h>
#endif
#ifdef CONFIG_PMAC_BACKLIGHT #ifdef CONFIG_PMAC_BACKLIGHT
#include <asm/backlight.h> #include <asm/backlight.h>
#endif #endif
...@@ -359,11 +355,6 @@ static void chips_set_bitdepth(struct fb_info_chips *p, struct display* disp, in ...@@ -359,11 +355,6 @@ static void chips_set_bitdepth(struct fb_info_chips *p, struct display* disp, in
disp->visual = fix->visual; disp->visual = fix->visual;
disp->var = *var; disp->var = *var;
#ifdef CONFIG_FB_COMPAT_XPMAC
display_info.depth = bpp;
display_info.pitch = fix->line_length;
#endif
if (p->info.changevar) if (p->info.changevar)
(*p->info.changevar)(con); (*p->info.changevar)(con);
...@@ -575,26 +566,6 @@ static void __init init_chips(struct fb_info_chips *p) ...@@ -575,26 +566,6 @@ static void __init init_chips(struct fb_info_chips *p)
chips_hw_init(p); chips_hw_init(p);
#ifdef CONFIG_FB_COMPAT_XPMAC
if (!console_fb_info) {
unsigned long iobase;
display_info.height = p->var.yres;
display_info.width = p->var.xres;
display_info.depth = 8;
display_info.pitch = p->fix.line_length;
display_info.mode = VMODE_800_600_60;
strncpy(display_info.name, "chips65550",
sizeof(display_info.name));
display_info.fb_address = p->frame_buffer_phys;
iobase = pci_bus_io_base_phys(p->pdev->bus->number);
display_info.cmap_adr_address = iobase + 0x3c8;
display_info.cmap_data_address = iobase + 0x3c9;
display_info.disp_reg_address = p->blitter_regs_phys;
console_fb_info = &p->info;
}
#endif /* CONFIG_FB_COMPAT_XPMAC */
#ifdef CONFIG_PMAC_PBOOK #ifdef CONFIG_PMAC_PBOOK
if (all_chips == NULL) if (all_chips == NULL)
pmu_register_sleep_notifier(&chips_sleep_notifier); pmu_register_sleep_notifier(&chips_sleep_notifier);
......
...@@ -43,9 +43,6 @@ ...@@ -43,9 +43,6 @@
#include <linux/init.h> #include <linux/init.h>
#include <linux/pci.h> #include <linux/pci.h>
#include <linux/nvram.h> #include <linux/nvram.h>
#ifdef CONFIG_FB_COMPAT_XPMAC
#include <asm/vc_ioctl.h>
#endif
#include <linux/adb.h> #include <linux/adb.h>
#include <linux/cuda.h> #include <linux/cuda.h>
#include <asm/io.h> #include <asm/io.h>
...@@ -707,24 +704,6 @@ static void control_set_hardware(struct fb_info_control *p, struct fb_par_contro ...@@ -707,24 +704,6 @@ static void control_set_hardware(struct fb_info_control *p, struct fb_par_contro
/* Turn on display */ /* Turn on display */
out_le32(CNTRL_REG(p,ctrl), par->ctrl); out_le32(CNTRL_REG(p,ctrl), par->ctrl);
#ifdef CONFIG_FB_COMPAT_XPMAC
/* And let the world know the truth. */
if (!console_fb_info || console_fb_info == &p->info) {
display_info.height = p->par.yres;
display_info.width = p->par.xres;
display_info.depth = (cmode == CMODE_32) ? 32 :
((cmode == CMODE_16) ? 16 : 8);
display_info.pitch = p->par.pitch;
display_info.mode = p->par.vmode;
strncpy(display_info.name, "control",
sizeof(display_info.name));
display_info.fb_address = p->frame_buffer_phys + CTRLFB_OFF;
display_info.cmap_adr_address = p->cmap_regs_phys;
display_info.cmap_data_address = p->cmap_regs_phys + 0x30;
display_info.disp_reg_address = p->control_regs_phys;
console_fb_info = &p->info;
}
#endif /* CONFIG_FB_COMPAT_XPMAC */
#ifdef CONFIG_BOOTX_TEXT #ifdef CONFIG_BOOTX_TEXT
btext_update_display(p->frame_buffer_phys + CTRLFB_OFF, btext_update_display(p->frame_buffer_phys + CTRLFB_OFF,
p->par.xres, p->par.yres, p->par.xres, p->par.yres,
......
...@@ -1177,48 +1177,6 @@ static struct display_switch fbcon_imstt32 = { ...@@ -1177,48 +1177,6 @@ static struct display_switch fbcon_imstt32 = {
}; };
#endif #endif
#ifdef CONFIG_FB_COMPAT_XPMAC
#include <asm/vc_ioctl.h>
extern struct vc_mode display_info;
extern struct fb_info *console_fb_info;
static void
set_display_info (struct display *disp)
{
display_info.width = disp->var.xres;
display_info.height = disp->var.yres;
display_info.depth = disp->var.bits_per_pixel;
display_info.pitch = disp->line_length;
switch (disp->var.xres) {
case 512:
display_info.mode = 2;
break;
case 640:
display_info.mode = 6;
break;
case 800:
display_info.mode = 12;
break;
case 832:
display_info.mode = 13;
break;
case 1024:
display_info.mode = 17;
break;
case 1152:
display_info.mode = 18;
break;
case 1280:
display_info.mode = disp->var.yres == 960 ? 19 : 20;
break;
default:
display_info.mode = 0;
}
}
#endif
static int static int
imsttfb_getcolreg (u_int regno, u_int *red, u_int *green, imsttfb_getcolreg (u_int regno, u_int *red, u_int *green,
u_int *blue, u_int *transp, struct fb_info *info) u_int *blue, u_int *transp, struct fb_info *info)
...@@ -1385,10 +1343,6 @@ set_dispsw (struct display *disp, struct fb_info_imstt *p) ...@@ -1385,10 +1343,6 @@ set_dispsw (struct display *disp, struct fb_info_imstt *p)
p->dispsw.cursor = 0; p->dispsw.cursor = 0;
p->dispsw.set_font = 0; p->dispsw.set_font = 0;
} }
#ifdef CONFIG_FB_COMPAT_XPMAC
set_display_info(disp);
#endif
} }
static void static void
...@@ -1864,16 +1818,6 @@ init_imstt(struct fb_info_imstt *p) ...@@ -1864,16 +1818,6 @@ init_imstt(struct fb_info_imstt *p)
tmp = (in_le32(&p->dc_regs[SSTATUS]) & 0x0f00) >> 8; tmp = (in_le32(&p->dc_regs[SSTATUS]) & 0x0f00) >> 8;
printk("fb%u: %s frame buffer; %uMB vram; chip version %u\n", printk("fb%u: %s frame buffer; %uMB vram; chip version %u\n",
i, p->fix.id, p->total_vram >> 20, tmp); i, p->fix.id, p->total_vram >> 20, tmp);
#ifdef CONFIG_FB_COMPAT_XPMAC
strncpy(display_info.name, "IMS,tt128mb", sizeof(display_info.name));
display_info.fb_address = p->frame_buffer_phys;
display_info.cmap_adr_address = p->cmap_regs_phys + PADDRW;
display_info.cmap_data_address = p->cmap_regs_phys + PDATA;
display_info.disp_reg_address = p->dc_regs_phys;
if (!console_fb_info)
console_fb_info = &p->info;
#endif /* CONFIG_FB_COMPAT_XPMAC */
} }
static int __devinit static int __devinit
......
...@@ -20,14 +20,9 @@ ...@@ -20,14 +20,9 @@
#include <linux/fb.h> #include <linux/fb.h>
#include <linux/string.h> #include <linux/string.h>
#ifdef CONFIG_FB_COMPAT_XPMAC
#include <asm/vc_ioctl.h>
#endif
#include <video/fbcon.h> #include <video/fbcon.h>
#include <video/macmodes.h> #include <video/macmodes.h>
/* /*
* MacOS video mode definitions * MacOS video mode definitions
* *
...@@ -207,171 +202,6 @@ static const struct monitor_map { ...@@ -207,171 +202,6 @@ static const struct monitor_map {
{ -1, VMODE_640_480_60 }, /* catch-all, must be last */ { -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 */
/** /**
* mac_vmode_to_var - converts vmode/cmode pair to var structure * mac_vmode_to_var - converts vmode/cmode pair to var structure
* @vmode: MacOS video mode * @vmode: MacOS video mode
...@@ -548,6 +378,7 @@ int __init mac_find_mode(struct fb_var_screeninfo *var, struct fb_info *info, ...@@ -548,6 +378,7 @@ int __init mac_find_mode(struct fb_var_screeninfo *var, struct fb_info *info,
unsigned int dbsize = 0; unsigned int dbsize = 0;
if (mode_option && !strncmp(mode_option, "mac", 3)) { if (mode_option && !strncmp(mode_option, "mac", 3)) {
mode_option += 3;
db = mac_modedb; db = mac_modedb;
dbsize = sizeof(mac_modedb)/sizeof(*mac_modedb); dbsize = sizeof(mac_modedb)/sizeof(*mac_modedb);
} }
......
...@@ -870,25 +870,6 @@ static int matroxfb_set_var(struct fb_var_screeninfo *var, int con, ...@@ -870,25 +870,6 @@ static int matroxfb_set_var(struct fb_var_screeninfo *var, int con,
} }
matrox_cfbX_init(PMINFO display); matrox_cfbX_init(PMINFO display);
do_install_cmap(ACCESS_FBINFO(fbcon.currcon),&ACCESS_FBINFO(fbcon)); do_install_cmap(ACCESS_FBINFO(fbcon.currcon),&ACCESS_FBINFO(fbcon));
#if defined(CONFIG_FB_COMPAT_XPMAC)
if (console_fb_info == &ACCESS_FBINFO(fbcon)) {
int vmode, cmode;
display_info.width = var->xres;
display_info.height = var->yres;
display_info.depth = var->bits_per_pixel;
display_info.pitch = (var->xres_virtual)*(var->bits_per_pixel)/8;
if (mac_var_to_vmode(var, &vmode, &cmode))
display_info.mode = 0;
else
display_info.mode = vmode;
strcpy(display_info.name, ACCESS_FBINFO(matrox_name));
display_info.fb_address = ACCESS_FBINFO(video.base);
display_info.cmap_adr_address = 0;
display_info.cmap_data_address = 0;
display_info.disp_reg_address = ACCESS_FBINFO(mmio.base);
}
#endif /* CONFIG_FB_COMPAT_XPMAC */
} }
} }
return 0; return 0;
...@@ -1835,12 +1816,6 @@ static int initMatrox2(WPMINFO struct display* d, struct board* b){ ...@@ -1835,12 +1816,6 @@ static int initMatrox2(WPMINFO struct display* d, struct board* b){
/* FIXME: Where to move this?! */ /* FIXME: Where to move this?! */
#if defined(CONFIG_ALL_PPC) #if defined(CONFIG_ALL_PPC)
#if defined(CONFIG_FB_COMPAT_XPMAC)
strcpy(ACCESS_FBINFO(matrox_name), "MTRX,"); /* OpenFirmware naming convension */
strncat(ACCESS_FBINFO(matrox_name), b->name, 26);
if (!console_fb_info)
console_fb_info = &ACCESS_FBINFO(fbcon);
#endif
#ifndef MODULE #ifndef MODULE
if (_machine == _MACH_Pmac) { if (_machine == _MACH_Pmac) {
struct fb_var_screeninfo var; struct fb_var_screeninfo var;
......
...@@ -56,9 +56,6 @@ ...@@ -56,9 +56,6 @@
#include <video/fbcon-cfb24.h> #include <video/fbcon-cfb24.h>
#include <video/fbcon-cfb32.h> #include <video/fbcon-cfb32.h>
#if defined(CONFIG_FB_COMPAT_XPMAC)
#include <asm/vc_ioctl.h>
#endif
#if defined(CONFIG_PPC) #if defined(CONFIG_PPC)
#include <asm/prom.h> #include <asm/prom.h>
#include <asm/pci-bridge.h> #include <asm/pci-bridge.h>
...@@ -591,9 +588,6 @@ struct matrox_fb_info { ...@@ -591,9 +588,6 @@ struct matrox_fb_info {
} memory; } memory;
} values; } values;
struct { unsigned red, green, blue, transp; } palette[256]; struct { unsigned red, green, blue, transp; } palette[256];
#if defined(CONFIG_FB_COMPAT_XPMAC)
char matrox_name[32];
#endif
/* These ifdefs must be last! They differ for module & non-module compiles */ /* These ifdefs must be last! They differ for module & non-module compiles */
#if defined(FBCON_HAS_CFB16) || defined(FBCON_HAS_CFB24) || defined(FBCON_HAS_CFB32) #if defined(FBCON_HAS_CFB16) || defined(FBCON_HAS_CFB24) || defined(FBCON_HAS_CFB32)
union { union {
......
...@@ -27,9 +27,6 @@ ...@@ -27,9 +27,6 @@
#include <linux/selection.h> #include <linux/selection.h>
#include <linux/init.h> #include <linux/init.h>
#include <linux/ioport.h> #include <linux/ioport.h>
#ifdef CONFIG_FB_COMPAT_XPMAC
#include <asm/vc_ioctl.h>
#endif
#include <asm/io.h> #include <asm/io.h>
#include <asm/prom.h> #include <asm/prom.h>
#ifdef CONFIG_BOOTX_TEXT #ifdef CONFIG_BOOTX_TEXT
...@@ -660,29 +657,6 @@ static void __init offb_init_fb(const char *name, const char *full_name, ...@@ -660,29 +657,6 @@ static void __init offb_init_fb(const char *name, const char *full_name,
printk(KERN_INFO "fb%d: Open Firmware frame buffer device on %s\n", printk(KERN_INFO "fb%d: Open Firmware frame buffer device on %s\n",
GET_FB_IDX(info->info.node), full_name); GET_FB_IDX(info->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 (info->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->info;
}
#endif /* CONFIG_FB_COMPAT_XPMAC) */
} }
static int offbcon_switch(int con, struct fb_info *info) static int offbcon_switch(int con, struct fb_info *info)
......
...@@ -33,9 +33,6 @@ ...@@ -33,9 +33,6 @@
#include <linux/init.h> #include <linux/init.h>
#include <linux/pci.h> #include <linux/pci.h>
#include <linux/nvram.h> #include <linux/nvram.h>
#ifdef CONFIG_FB_COMPAT_XPMAC
#include <asm/vc_ioctl.h>
#endif
#include <asm/io.h> #include <asm/io.h>
#include <asm/prom.h> #include <asm/prom.h>
#include <asm/pgtable.h> #include <asm/pgtable.h>
...@@ -510,24 +507,6 @@ static void platinum_set_par(const struct fb_par_platinum *par, struct fb_info_p ...@@ -510,24 +507,6 @@ static void platinum_set_par(const struct fb_par_platinum *par, struct fb_info_p
set_platinum_clock(info); set_platinum_clock(info);
out_be32(&platinum_regs->reg[24].r, 0); /* turn display on */ out_be32(&platinum_regs->reg[24].r, 0); /* turn display on */
#ifdef CONFIG_FB_COMPAT_XPMAC
if (console_fb_info == &info->fb_info) {
display_info.height = par->yres;
display_info.width = par->xres;
display_info.depth = ( (cmode == CMODE_32) ? 32 :
((cmode == CMODE_16) ? 16 : 8));
display_info.pitch = vmode_attrs[vmode-1].hres * (1<<cmode) + 0x20;
display_info.mode = vmode;
strncpy(display_info.name, "platinum",
sizeof(display_info.name));
display_info.fb_address = info->frame_buffer_phys + init->fb_offset + 0x20;
display_info.cmap_adr_address = info->cmap_regs_phys;
display_info.cmap_data_address = info->cmap_regs_phys + 0x30;
display_info.disp_reg_address = info->platinum_regs_phys;
}
#endif /* CONFIG_FB_COMPAT_XPMAC */
} }
...@@ -705,11 +684,6 @@ static void __init platinum_of_init(struct device_node *dp) ...@@ -705,11 +684,6 @@ static void __init platinum_of_init(struct device_node *dp)
kfree(info); kfree(info);
return; return;
} }
#ifdef CONFIG_FB_COMPAT_XPMAC
if (!console_fb_info)
console_fb_info = &info->fb_info;
#endif
} }
/* /*
......
...@@ -4,6 +4,6 @@ ...@@ -4,6 +4,6 @@
obj-$(CONFIG_FB_RIVA) += rivafb.o obj-$(CONFIG_FB_RIVA) += rivafb.o
rivafb-objs := fbdev.o riva_hw.o accel.o rivafb-objs := fbdev.o riva_hw.o
include $(TOPDIR)/Rules.make include $(TOPDIR)/Rules.make
This diff is collapsed.
This diff is collapsed.
...@@ -3,6 +3,7 @@ ...@@ -3,6 +3,7 @@
#include <linux/config.h> #include <linux/config.h>
#include <linux/fb.h> #include <linux/fb.h>
#include <linux/timer.h>
#include <video/fbcon.h> #include <video/fbcon.h>
#include <video/fbcon-cfb4.h> #include <video/fbcon-cfb4.h>
#include <video/fbcon-cfb8.h> #include <video/fbcon-cfb8.h>
...@@ -27,56 +28,33 @@ struct riva_regs { ...@@ -27,56 +28,33 @@ struct riva_regs {
RIVA_HW_STATE ext; RIVA_HW_STATE ext;
}; };
typedef struct { #define MAX_CURS 32
unsigned char red, green, blue, transp;
} riva_cfb8_cmap_t; struct riva_cursor {
int enable;
struct rivafb_info; int on;
struct rivafb_info { int vbl_cnt;
struct fb_info info; /* kernel framebuffer info */ int last_move_delay;
int blink_rate;
struct {
u16 x, y;
} pos, size;
unsigned short image[MAX_CURS*MAX_CURS];
struct timer_list *timer;
};
/* describes the state of a Riva board */
struct riva_par {
RIVA_HW_INST riva; /* interface to riva_hw.c */ RIVA_HW_INST riva; /* interface to riva_hw.c */
const char *drvr_name; /* Riva hardware board type */
unsigned long ctrl_base_phys; /* physical control register base addr */
unsigned long fb_base_phys; /* physical framebuffer base addr */
caddr_t ctrl_base; /* virtual control register base addr */
caddr_t fb_base; /* virtual framebuffer base addr */
unsigned ram_amount; /* amount of RAM on card, in bytes */ unsigned ram_amount; /* amount of RAM on card, in bytes */
unsigned dclk_max; /* max DCLK */ unsigned dclk_max; /* max DCLK */
struct riva_regs initial_state; /* initial startup video mode */ struct riva_regs initial_state; /* initial startup video mode */
struct riva_regs current_state; struct riva_regs current_state;
struct display disp;
int currcon;
struct display *currcon_display;
struct rivafb_info *next;
struct pci_dev *pd; /* pointer to board's pci info */
unsigned base0_region_size; /* size of control register region */
unsigned base1_region_size; /* size of framebuffer region */
struct riva_cursor *cursor; struct riva_cursor *cursor;
caddr_t ctrl_base; /* Virtual control register base addr */
struct display_switch dispsw;
riva_cfb8_cmap_t palette[256]; /* VGA DAC palette cache */
#if defined(FBCON_HAS_CFB16) || defined(FBCON_HAS_CFB32)
union {
#ifdef FBCON_HAS_CFB16
u_int16_t cfb16[16];
#endif
#ifdef FBCON_HAS_CFB32
u_int32_t cfb32[16];
#endif
} con_cmap;
#endif /* FBCON_HAS_CFB16 | FBCON_HAS_CFB32 */
#ifdef CONFIG_MTRR #ifdef CONFIG_MTRR
struct { int vram; int vram_valid; } mtrr; struct { int vram; int vram_valid; } mtrr;
#endif #endif
......
This diff is collapsed.
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
* *
* Created 28 Aug 2001 by Ghozlane Toumi * Created 28 Aug 2001 by Ghozlane Toumi
* *
* $Id: sstfb.h,v 1.1.4.1 2001/08/29 01:30:38 ghoz Exp $ * $Id: sstfb.h,v 1.8 2002/05/10 19:35:11 ghoz Exp $
*/ */
...@@ -72,9 +72,10 @@ ...@@ -72,9 +72,10 @@
#define iprintk(X...) printk(KERN_INFO "sstfb: " X) #define iprintk(X...) printk(KERN_INFO "sstfb: " X)
#define wprintk(X...) printk(KERN_WARNING "sstfb: " X) #define wprintk(X...) printk(KERN_WARNING "sstfb: " X)
#define BIT(x) (1ul << (x)) #define BIT(x) (1ul<<(x))
#define PS2KHZ(a) (1000000000UL/(a)) /* picoseconds to KHz */ #define PS2KHZ(a) (1000000000UL/(a)) /* picoseconds to KHz */
#define KHZ2PS(a) (1000000000UL/(a)) #define KHZ2PS(a) (1000000000UL/(a))
#define POW2(x) (1ul<<(x))
#ifndef ABS #ifndef ABS
# define ABS(x) (((x)<0)?-(x):(x)) # define ABS(x) (((x)<0)?-(x):(x))
...@@ -170,9 +171,15 @@ ...@@ -170,9 +171,15 @@
#define DAC_DATA 0x022c #define DAC_DATA 0x022c
# define DAC_READ_CMD BIT(11) /* set read dacreg mode */ # define DAC_READ_CMD BIT(11) /* set read dacreg mode */
#define FBIINIT5 0x0244 /* v2 specific */ #define FBIINIT5 0x0244 /* v2 specific */
# define FBIINIT5_MASK 0xfa40ffff /* mask video bits*/
# define HDOUBLESCAN BIT(20)
# define VDOUBLESCAN BIT(21)
# define HSYNC_HIGH BIT(23)
# define VSYNC_HIGH BIT(24)
# define INTERLACE BIT(26)
#define FBIINIT6 0x0248 /* v2 specific */ #define FBIINIT6 0x0248 /* v2 specific */
#define FBIINIT7 0x024c /* v2 specific */
# define TILES_IN_X_LSB_SHIFT 30 /* v2 */ # define TILES_IN_X_LSB_SHIFT 30 /* v2 */
#define FBIINIT7 0x024c /* v2 specific */
/* Dac Registers */ /* Dac Registers */
#define DACREG_WMA 0x0 /* pixel write mode address */ #define DACREG_WMA 0x0 /* pixel write mode address */
...@@ -275,30 +282,32 @@ ...@@ -275,30 +282,32 @@
*/ */
/* used to know witch clock to set */ /* used to know witch clock to set */
#define VID_CLOCK 0 enum {
#define GFX_CLOCK 1 VID_CLOCK=0,
GFX_CLOCK=1,
};
/* freq max */ /* freq max */
#define DAC_FREF 14318 /* DAC reference freq (Khz) */ #define DAC_FREF 14318 /* DAC reference freq (Khz) */
#define VCO_MAX 260000 #define VCO_MAX 260000
/* /*
* * driver structs
* Declarations
*
*/ */
struct pll_timing { struct pll_timing {
u8 m; unsigned int m;
u8 n; unsigned int n;
u8 p; unsigned int p;
}; };
struct sstfb_info;
struct dac_switch { struct dac_switch {
char * name; char * name;
int (*detect) (void); int (*detect) (struct sstfb_info *sst_info);
int (*set_pll) (const struct pll_timing *t, const int clock); int (*set_pll) (struct sstfb_info *sst_info, const struct pll_timing *t, const int clock);
void (*set_vidmod) (const int bpp); void (*set_vidmod) (struct sstfb_info *sst_info, const int bpp);
}; };
struct sst_spec { struct sst_spec {
...@@ -317,8 +326,12 @@ struct sstfb_par { ...@@ -317,8 +326,12 @@ struct sstfb_par {
unsigned int vSyncOn; unsigned int vSyncOn;
unsigned int vSyncOff; unsigned int vSyncOff;
unsigned int vBackPorch; unsigned int vBackPorch;
unsigned int freq; /* freq in picoseconds */ unsigned int freq; /* freq in kHz */
unsigned int tiles_in_X; /* num of tiles in X res */ struct pll_timing pll;
unsigned int tiles_in_X;/* num of tiles in X res */
unsigned int vmode; /* doublescan/interlaced */
unsigned int sync; /* H/V sync polarity */
unsigned int valid; /* par is correct (fool proof) */
}; };
struct sstfb_info { struct sstfb_info {
...@@ -336,18 +349,34 @@ struct sstfb_info { ...@@ -336,18 +349,34 @@ struct sstfb_info {
unsigned long vbase; unsigned long vbase;
} mmio; /* registers memory info */ } mmio; /* registers memory info */
struct dac_switch * dac_sw; /* dac specific functions */ struct dac_switch dac_sw; /* dac specific functions */
struct sst_spec * spec;
int is_voodoo2; int type;
u8 revision; u8 revision;
/* status */ /* status */
int configured; /*XXX int configured;
/* int indexed_mode; int indexed_mode;
int vgapass; int vgapass;
int clipping; */ int clipping; */
int gfx_clock; int gfx_clock;
int currcon;
struct display disp; /* current display */
struct { u_int red, green, blue, transp; } palette[16];
union {
#ifdef FBCON_HAS_CFB16
u16 cfb16[16];
#endif
#ifdef EN_24_32_BPP
#if defined (FBCON_HAS_CFB24) || defined(FBCON_HAS_CFB32)
u32 cfb32[16];
#endif
#endif
} fbcon_cmap;
}; };
#endif /* _SSTFB_H_ */ #endif /* _SSTFB_H_ */
...@@ -53,9 +53,6 @@ ...@@ -53,9 +53,6 @@
#include <linux/init.h> #include <linux/init.h>
#include <linux/pci.h> #include <linux/pci.h>
#include <linux/nvram.h> #include <linux/nvram.h>
#ifdef CONFIG_FB_COMPAT_XPMAC
#include <asm/vc_ioctl.h>
#endif
#include <linux/adb.h> #include <linux/adb.h>
#include <linux/cuda.h> #include <linux/cuda.h>
#include <asm/io.h> #include <asm/io.h>
...@@ -370,11 +367,6 @@ static int valkyriefb_setcolreg(u_int regno, u_int red, u_int green, u_int blue, ...@@ -370,11 +367,6 @@ static int valkyriefb_setcolreg(u_int regno, u_int red, u_int green, u_int blue,
return 0; return 0;
} }
#ifdef CONFIG_FB_COMPAT_XPMAC
extern struct vc_mode display_info;
extern struct fb_info *console_fb_info;
#endif /* CONFIG_FB_COMPAT_XPMAC */
static int valkyrie_vram_reqd(int video_mode, int color_mode) static int valkyrie_vram_reqd(int video_mode, int color_mode)
{ {
int pitch; int pitch;
...@@ -492,24 +484,6 @@ static void valkyrie_set_par(const struct fb_par_valkyrie *par, ...@@ -492,24 +484,6 @@ static void valkyrie_set_par(const struct fb_par_valkyrie *par,
/* Turn on display */ /* Turn on display */
out_8(&valkyrie_regs->mode.r, init->mode); out_8(&valkyrie_regs->mode.r, init->mode);
#ifdef CONFIG_FB_COMPAT_XPMAC
/* And let the world know the truth. */
if (!console_fb_info || console_fb_info == &p->info) {
display_info.height = p->var.yres;
display_info.width = p->var.xres;
display_info.depth = (cmode == CMODE_16) ? 16 : 8;
display_info.pitch = p->fix.line_length;
display_info.mode = vmode;
strncpy(display_info.name, "valkyrie",
sizeof(display_info.name));
display_info.fb_address = p->frame_buffer_phys + 0x1000;
display_info.cmap_adr_address = p->cmap_regs_phys;
display_info.cmap_data_address = p->cmap_regs_phys + 8;
display_info.disp_reg_address = p->valkyrie_regs_phys;
console_fb_info = &p->info;
}
#endif /* CONFIG_FB_COMPAT_XPMAC */
} }
int __init valkyriefb_init(void) int __init valkyriefb_init(void)
......
/*
* BK Id: SCCS/s.vc_ioctl.h 1.5 05/17/01 18:14:26 cort
*/
#ifndef _LINUX_VC_IOCTL_H
#define _LINUX_VC_IOCTL_H
struct vc_mode {
int height;
int width;
int depth;
int pitch;
int mode;
char name[32];
unsigned long fb_address;
unsigned long cmap_adr_address;
unsigned long cmap_data_address;
unsigned long disp_reg_address;
};
#define VC_GETMODE 0x7667
#define VC_SETMODE 0x7668
#define VC_INQMODE 0x7669
#define VC_SETCMAP 0x766a
#define VC_GETCMAP 0x766b
#define VC_POWERMODE 0x766c
/* Values for the argument to the VC_POWERMODE ioctl */
#define VC_POWERMODE_INQUIRY (-1)
#define VESA_NO_BLANKING 0
#define VESA_VSYNC_SUSPEND 1
#define VESA_HSYNC_SUSPEND 2
#define VESA_POWERDOWN 3
#ifdef __KERNEL__
extern int console_getmode(struct vc_mode *);
extern int console_setmode(struct vc_mode *, int);
extern int console_setcmap(int, unsigned char *, unsigned char *,
unsigned char *);
extern int console_powermode(int);
extern struct vc_mode display_info;
extern struct fb_info *console_fb_info;
#endif
#endif /* _LINUX_VC_IOCTL_H */
#ifndef _LINUX_VC_IOCTL_H
#define _LINUX_VC_IOCTL_H
/*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version
* 2 of the License, or (at your option) any later version.
*/
struct vc_mode {
int height;
int width;
int depth;
int pitch;
int mode;
char name[32];
unsigned long fb_address;
unsigned long cmap_adr_address;
unsigned long cmap_data_address;
unsigned long disp_reg_address;
};
#define VC_GETMODE 0x7667
#define VC_SETMODE 0x7668
#define VC_INQMODE 0x7669
#define VC_SETCMAP 0x766a
#define VC_GETCMAP 0x766b
#define VC_POWERMODE 0x766c
/* Values for the argument to the VC_POWERMODE ioctl */
#define VC_POWERMODE_INQUIRY (-1)
#define VESA_NO_BLANKING 0
#define VESA_VSYNC_SUSPEND 1
#define VESA_HSYNC_SUSPEND 2
#define VESA_POWERDOWN 3
#ifdef __KERNEL__
extern int console_getmode(struct vc_mode *);
extern int console_setmode(struct vc_mode *, int);
extern int console_setcmap(int, unsigned char *, unsigned char *,
unsigned char *);
extern int console_powermode(int);
extern struct vc_mode display_info;
extern struct fb_info *console_fb_info;
#endif
#endif /* _LINUX_VC_IOCTL_H */
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment