Author: attila
Date: Sun Mar 18 11:50:24 2007
New Revision: 253
Modified:
mga_vid/trunk/mga_vid.c
Log:
allow output of width larger than 1024 if we have a G550
based on a patch from Kalev Soikonen <ksop hot.ee>
Modified: mga_vid/trunk/mga_vid.c
============================================================
==================
--- mga_vid/trunk/mga_vid.c (original)
+++ mga_vid/trunk/mga_vid.c Sun Mar 18 11:50:24 2007
 -594,6
+594,11  switch(config->format){
return -1;
}
+ // disable BES vertical filter if width is greater than
1024
+ // and if we have a G550
+ if(sw > 1024 && card->card_type ==
MGA_G550)
+ card->regs.besctl &= ~(1<<11);
+
// setting black&white mode
card->regs.besctl|=(card->regs.blackie<<20);
 -699,6
+704,16  static int mga_vid_ioctl(struct inode *i
printk(KERN_ERR "mga_vid: failed copy from
userspacen");
return(-EFAULT);
}
+
+ // return some information back to user space in case we
hit an error
+ card->config.card_type = card->card_type;
+ card->config.ram_size = card->ram_size;
+ if (copy_to_user((mga_vid_config_t *) arg,
&card->config, sizeof(mga_vid_config_t)))
+ {
+ printk(KERN_ERR "mga_vid: failed copy to
userspacen");
+ return(-EFAULT);
+ }
+
if(card->config.version != MGA_VID_VERSION){
printk(KERN_ERR "mga_vid: incompatible version!
driver: %X requested:
%Xn",MGA_VID_VERSION,card->config.version);
return(-EFAULT);
 -714,8
+729,10  static int mga_vid_ioctl(struct inode *i
return(-EFAULT);
}
- if(card->config.src_width>1023 ||
card->config.src_height>1023){
- printk(KERN_ERR "mga_vid: overlay sizes bigger
than 1023x1023 are not supported, rescale the picture in
softwaren");
+ if( (card->config.src_width > 1024 ||
card->config.src_height > 1024) &&
(card->card_type != MGA_G550 &&
card->config.src_height > 1024) ){
+ printk(KERN_ERR "mga_vid: overlay sizes bigger
than 1024x1024 are not supported with this card type,
rescale the picture in softwaren");
+
+
return(-EFAULT);
}
 -728,11
+745,6  static int mga_vid_ioctl(struct inode *i
#ifdef MP_DEBUG
printk(KERN_DEBUG "mga YUV buffer base:
0x%Xn", card->src_base);
#endif
-
- card->config.card_type = card->card_type;
-
- card->config.ram_size = card->ram_size;
-
if (copy_to_user((mga_vid_config_t *) arg,
&card->config, sizeof(mga_vid_config_t)))
{
printk(KERN_ERR "mga_vid: failed copy to
userspacen");
_______________________________________________
MPlayer-matrox mailing list
MPlayer-matrox mplayerhq.hu
http://lists.mplayerhq.hu/mailman/listinfo/mplayer-matr
ox
|