added mga_top_reserved module parameter to skip a configurable amount

of space at the top of video memory. this is needed to prevent
corruption of the kernel's console font when using the "fastfont"
option with matroxfb.


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@4560 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
rfelker 2002-02-07 02:07:29 +00:00
parent 3cf588d2c6
commit c1977c9ed5
1 changed files with 4 additions and 1 deletions

View File

@ -246,9 +246,12 @@ static int mga_src_base = 0; // YUV buffer position in video memory
static uint32_t mga_ram_size = 0; // how much megabytes videoram we have static uint32_t mga_ram_size = 0; // how much megabytes videoram we have
static uint32_t mga_top_reserved = 0; // reserved space for console font (matroxfb + fastfont)
//static int mga_force_memsize = 0; //static int mga_force_memsize = 0;
MODULE_PARM(mga_ram_size, "i"); MODULE_PARM(mga_ram_size, "i");
MODULE_PARM(mga_top_reserved, "i");
static struct pci_dev *pci_dev; static struct pci_dev *pci_dev;
@ -1167,7 +1170,7 @@ static int mga_vid_ioctl(struct inode *inode, struct file *file, unsigned int cm
return(-EFAULT); return(-EFAULT);
} }
mga_src_base = (mga_ram_size*0x100000-mga_config.num_frames*mga_config.frame_size); mga_src_base = (mga_ram_size*0x100000-mga_config.num_frames*mga_config.frame_size-mga_top_reserved);
if(mga_src_base<0){ if(mga_src_base<0){
printk(KERN_ERR "mga_vid: not enough memory for frames!\n"); printk(KERN_ERR "mga_vid: not enough memory for frames!\n");
return(-EFAULT); return(-EFAULT);