diff options
-rw-r--r-- | drivers/video/aty/atyfb_base.c | 64 |
1 files changed, 0 insertions, 64 deletions
diff --git a/drivers/video/aty/atyfb_base.c b/drivers/video/aty/atyfb_base.c index d775eb6590b6..62f9c6e387cc 100644 --- a/drivers/video/aty/atyfb_base.c +++ b/drivers/video/aty/atyfb_base.c | |||
@@ -1913,61 +1913,6 @@ static int atyfb_mmap(struct fb_info *info, struct vm_area_struct *vma) | |||
1913 | par->mmaped = 1; | 1913 | par->mmaped = 1; |
1914 | return 0; | 1914 | return 0; |
1915 | } | 1915 | } |
1916 | |||
1917 | static struct { | ||
1918 | u32 yoffset; | ||
1919 | u8 r[2][256]; | ||
1920 | u8 g[2][256]; | ||
1921 | u8 b[2][256]; | ||
1922 | } atyfb_save; | ||
1923 | |||
1924 | static void atyfb_save_palette(struct atyfb_par *par, int enter) | ||
1925 | { | ||
1926 | int i, tmp; | ||
1927 | |||
1928 | for (i = 0; i < 256; i++) { | ||
1929 | tmp = aty_ld_8(DAC_CNTL, par) & 0xfc; | ||
1930 | if (M64_HAS(EXTRA_BRIGHT)) | ||
1931 | tmp |= 0x2; | ||
1932 | aty_st_8(DAC_CNTL, tmp, par); | ||
1933 | aty_st_8(DAC_MASK, 0xff, par); | ||
1934 | |||
1935 | aty_st_8(DAC_R_INDEX, i, par); | ||
1936 | atyfb_save.r[enter][i] = aty_ld_8(DAC_DATA, par); | ||
1937 | atyfb_save.g[enter][i] = aty_ld_8(DAC_DATA, par); | ||
1938 | atyfb_save.b[enter][i] = aty_ld_8(DAC_DATA, par); | ||
1939 | aty_st_8(DAC_W_INDEX, i, par); | ||
1940 | aty_st_8(DAC_DATA, atyfb_save.r[1 - enter][i], par); | ||
1941 | aty_st_8(DAC_DATA, atyfb_save.g[1 - enter][i], par); | ||
1942 | aty_st_8(DAC_DATA, atyfb_save.b[1 - enter][i], par); | ||
1943 | } | ||
1944 | } | ||
1945 | |||
1946 | static void atyfb_palette(int enter) | ||
1947 | { | ||
1948 | struct atyfb_par *par; | ||
1949 | struct fb_info *info; | ||
1950 | int i; | ||
1951 | |||
1952 | for (i = 0; i < FB_MAX; i++) { | ||
1953 | info = registered_fb[i]; | ||
1954 | if (info && info->fbops == &atyfb_ops) { | ||
1955 | par = (struct atyfb_par *) info->par; | ||
1956 | |||
1957 | atyfb_save_palette(par, enter); | ||
1958 | if (enter) { | ||
1959 | atyfb_save.yoffset = info->var.yoffset; | ||
1960 | info->var.yoffset = 0; | ||
1961 | set_off_pitch(par, info); | ||
1962 | } else { | ||
1963 | info->var.yoffset = atyfb_save.yoffset; | ||
1964 | set_off_pitch(par, info); | ||
1965 | } | ||
1966 | aty_st_le32(CRTC_OFF_PITCH, par->crtc.off_pitch, par); | ||
1967 | break; | ||
1968 | } | ||
1969 | } | ||
1970 | } | ||
1971 | #endif /* __sparc__ */ | 1916 | #endif /* __sparc__ */ |
1972 | 1917 | ||
1973 | 1918 | ||
@@ -2670,10 +2615,6 @@ static int __devinit aty_init(struct fb_info *info) | |||
2670 | goto aty_init_exit; | 2615 | goto aty_init_exit; |
2671 | } | 2616 | } |
2672 | 2617 | ||
2673 | #ifdef __sparc__ | ||
2674 | atyfb_save_palette(par, 0); | ||
2675 | #endif | ||
2676 | |||
2677 | #ifdef CONFIG_FB_ATY_CT | 2618 | #ifdef CONFIG_FB_ATY_CT |
2678 | if (!noaccel && M64_HAS(INTEGRATED)) | 2619 | if (!noaccel && M64_HAS(INTEGRATED)) |
2679 | aty_init_cursor(info); | 2620 | aty_init_cursor(info); |
@@ -2900,8 +2841,6 @@ static int atyfb_setcolreg(u_int regno, u_int red, u_int green, u_int blue, | |||
2900 | 2841 | ||
2901 | #ifdef __sparc__ | 2842 | #ifdef __sparc__ |
2902 | 2843 | ||
2903 | extern void (*prom_palette) (int); | ||
2904 | |||
2905 | static int __devinit atyfb_setup_sparc(struct pci_dev *pdev, | 2844 | static int __devinit atyfb_setup_sparc(struct pci_dev *pdev, |
2906 | struct fb_info *info, unsigned long addr) | 2845 | struct fb_info *info, unsigned long addr) |
2907 | { | 2846 | { |
@@ -3536,9 +3475,6 @@ static int __devinit atyfb_pci_probe(struct pci_dev *pdev, const struct pci_devi | |||
3536 | goto err_release_io; | 3475 | goto err_release_io; |
3537 | 3476 | ||
3538 | #ifdef __sparc__ | 3477 | #ifdef __sparc__ |
3539 | if (!prom_palette) | ||
3540 | prom_palette = atyfb_palette; | ||
3541 | |||
3542 | /* | 3478 | /* |
3543 | * Add /dev/fb mmap values. | 3479 | * Add /dev/fb mmap values. |
3544 | */ | 3480 | */ |