mirror of
https://github.com/torvalds/linux.git
synced 2024-11-23 20:51:44 +00:00
[ATYFB]: Kill 'prom_palette' sparc code.
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
101788b0ab
commit
30b3cfe1f6
@ -1913,61 +1913,6 @@ static int atyfb_mmap(struct fb_info *info, struct vm_area_struct *vma)
|
||||
par->mmaped = 1;
|
||||
return 0;
|
||||
}
|
||||
|
||||
static struct {
|
||||
u32 yoffset;
|
||||
u8 r[2][256];
|
||||
u8 g[2][256];
|
||||
u8 b[2][256];
|
||||
} atyfb_save;
|
||||
|
||||
static void atyfb_save_palette(struct atyfb_par *par, int enter)
|
||||
{
|
||||
int i, tmp;
|
||||
|
||||
for (i = 0; i < 256; i++) {
|
||||
tmp = aty_ld_8(DAC_CNTL, par) & 0xfc;
|
||||
if (M64_HAS(EXTRA_BRIGHT))
|
||||
tmp |= 0x2;
|
||||
aty_st_8(DAC_CNTL, tmp, par);
|
||||
aty_st_8(DAC_MASK, 0xff, par);
|
||||
|
||||
aty_st_8(DAC_R_INDEX, i, par);
|
||||
atyfb_save.r[enter][i] = aty_ld_8(DAC_DATA, par);
|
||||
atyfb_save.g[enter][i] = aty_ld_8(DAC_DATA, par);
|
||||
atyfb_save.b[enter][i] = aty_ld_8(DAC_DATA, par);
|
||||
aty_st_8(DAC_W_INDEX, i, par);
|
||||
aty_st_8(DAC_DATA, atyfb_save.r[1 - enter][i], par);
|
||||
aty_st_8(DAC_DATA, atyfb_save.g[1 - enter][i], par);
|
||||
aty_st_8(DAC_DATA, atyfb_save.b[1 - enter][i], par);
|
||||
}
|
||||
}
|
||||
|
||||
static void atyfb_palette(int enter)
|
||||
{
|
||||
struct atyfb_par *par;
|
||||
struct fb_info *info;
|
||||
int i;
|
||||
|
||||
for (i = 0; i < FB_MAX; i++) {
|
||||
info = registered_fb[i];
|
||||
if (info && info->fbops == &atyfb_ops) {
|
||||
par = (struct atyfb_par *) info->par;
|
||||
|
||||
atyfb_save_palette(par, enter);
|
||||
if (enter) {
|
||||
atyfb_save.yoffset = info->var.yoffset;
|
||||
info->var.yoffset = 0;
|
||||
set_off_pitch(par, info);
|
||||
} else {
|
||||
info->var.yoffset = atyfb_save.yoffset;
|
||||
set_off_pitch(par, info);
|
||||
}
|
||||
aty_st_le32(CRTC_OFF_PITCH, par->crtc.off_pitch, par);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif /* __sparc__ */
|
||||
|
||||
|
||||
@ -2670,10 +2615,6 @@ static int __devinit aty_init(struct fb_info *info)
|
||||
goto aty_init_exit;
|
||||
}
|
||||
|
||||
#ifdef __sparc__
|
||||
atyfb_save_palette(par, 0);
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_FB_ATY_CT
|
||||
if (!noaccel && M64_HAS(INTEGRATED))
|
||||
aty_init_cursor(info);
|
||||
@ -2900,8 +2841,6 @@ static int atyfb_setcolreg(u_int regno, u_int red, u_int green, u_int blue,
|
||||
|
||||
#ifdef __sparc__
|
||||
|
||||
extern void (*prom_palette) (int);
|
||||
|
||||
static int __devinit atyfb_setup_sparc(struct pci_dev *pdev,
|
||||
struct fb_info *info, unsigned long addr)
|
||||
{
|
||||
@ -3536,9 +3475,6 @@ static int __devinit atyfb_pci_probe(struct pci_dev *pdev, const struct pci_devi
|
||||
goto err_release_io;
|
||||
|
||||
#ifdef __sparc__
|
||||
if (!prom_palette)
|
||||
prom_palette = atyfb_palette;
|
||||
|
||||
/*
|
||||
* Add /dev/fb mmap values.
|
||||
*/
|
||||
|
Loading…
Reference in New Issue
Block a user