patch-2.1.17 linux/arch/m68k/amiga/amifb.c
Next file: linux/arch/m68k/amiga/amiints.c
Previous file: linux/arch/m68k/Makefile
Back to the patch index
Back to the overall index
- Lines: 108
- Date:
Fri Dec 20 11:19:57 1996
- Orig file:
v2.1.16/linux/arch/m68k/amiga/amifb.c
- Orig date:
Fri Nov 22 18:28:13 1996
diff -u --recursive --new-file v2.1.16/linux/arch/m68k/amiga/amifb.c linux/arch/m68k/amiga/amifb.c
@@ -50,7 +50,6 @@
#include <linux/delay.h>
#include <linux/config.h>
#include <linux/interrupt.h>
-#include <asm/setup.h>
#include <asm/uaccess.h>
#include <asm/system.h>
#include <asm/irq.h>
@@ -606,6 +605,8 @@
#define SPRITEMEMSIZE (64*64/4) /* max 64*64*4 */
#define DUMMYSPRITEMEMSIZE (8)
+#define CHIPRAM_SAFETY_LIMIT (16384)
+
static u_long videomemory, spritememory;
static u_long videomemorysize;
@@ -639,7 +640,7 @@
u_short w[2];
} copins;
-struct copdisplay {
+static struct copdisplay {
copins *init;
copins *wait;
copins *list[2][2];
@@ -662,7 +663,7 @@
* Current Video Mode
*/
-struct amiga_fb_par {
+static struct amiga_fb_par {
/* General Values */
@@ -835,7 +836,7 @@
"user0", "user1", "user2", "user3", "user4", "user5", "user6", "user7"
};
-struct fb_var_screeninfo amiga_fb_predefined[] = {
+static struct fb_var_screeninfo amiga_fb_predefined[] = {
/*
* Autodetect (Default) Video Mode
@@ -1814,7 +1815,7 @@
custom.dmacon = DMAF_ALL | DMAF_MASTER;
- switch (boot_info.bi_amiga.chipset) {
+ switch (amiga_chipset) {
#ifdef CONFIG_AMIFB_OCS
case CS_OCS:
strcat(amiga_fb_name, "OCS");
@@ -1825,7 +1826,7 @@
maxdepth[TAG_LORES] = 6;
maxfmode = TAG_FMODE_1;
if (!amifb_usermode) /* Set the Default Video Mode */
- get_video_mode(boot_info.bi_un.bi_ami.vblank == 50 ?
+ get_video_mode(amiga_vblank == 50 ?
DEFMODE_PAL : DEFMODE_NTSC);
videomemorysize = VIDEOMEMSIZE_OCS;
break;
@@ -1841,13 +1842,14 @@
maxfmode = TAG_FMODE_1;
if (!amifb_usermode) { /* Set the Default Video Mode */
if (AMIGAHW_PRESENT(AMBER_FF))
- get_video_mode(boot_info.bi_un.bi_ami.vblank == 50 ?
+ get_video_mode(amiga_vblank == 50 ?
DEFMODE_AMBER_PAL : DEFMODE_AMBER_NTSC);
else
- get_video_mode(boot_info.bi_un.bi_ami.vblank == 50 ?
+ get_video_mode(amiga_vblank == 50 ?
DEFMODE_PAL : DEFMODE_NTSC);
}
- if (boot_info.bi_amiga.chip_size > 1048576)
+ if (amiga_chip_avail()-CHIPRAM_SAFETY_LIMIT >
+ VIDEOMEMSIZE_ECS_1M)
videomemorysize = VIDEOMEMSIZE_ECS_2M;
else
videomemorysize = VIDEOMEMSIZE_ECS_1M;
@@ -1864,7 +1866,8 @@
maxfmode = TAG_FMODE_4;
if (!amifb_usermode) /* Set the Default Video Mode */
get_video_mode(DEFMODE_AGA);
- if (boot_info.bi_amiga.chip_size > 1048576)
+ if (amiga_chip_avail()-CHIPRAM_SAFETY_LIMIT >
+ VIDEOMEMSIZE_AGA_1M)
videomemorysize = VIDEOMEMSIZE_AGA_2M;
else
videomemorysize = VIDEOMEMSIZE_AGA_1M;
@@ -2504,7 +2507,7 @@
AMIGAHW_PRESENT(AGNUS_HR_NTSC)) {
par->beamcon0 = BMC0_PAL;
par->hsstop = 1;
- } else if (boot_info.bi_un.bi_ami.vblank != 50)
+ } else if (amiga_vblank != 50)
return -EINVAL;
} else {
/* NTSC video mode
@@ -2526,7 +2529,7 @@
AMIGAHW_PRESENT(AGNUS_HR_NTSC)) {
par->beamcon0 = 0;
par->hsstop = 1;
- } else if (boot_info.bi_un.bi_ami.vblank != 60)
+ } else if (amiga_vblank != 60)
return -EINVAL;
}
if (IS_OCS) {
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov