[MPlayer-matrox] r257 - mga_vid/trunk/mga_vid.c

attila subversion at mplayerhq.hu
Sun Oct 21 15:58:41 CEST 2007


Author: attila
Date: Sun Oct 21 15:58:41 2007
New Revision: 257

Log:
kill some longe dead code


Modified:
   mga_vid/trunk/mga_vid.c

Modified: mga_vid/trunk/mga_vid.c
==============================================================================
--- mga_vid/trunk/mga_vid.c	(original)
+++ mga_vid/trunk/mga_vid.c	Sun Oct 21 15:58:41 2007
@@ -72,9 +72,6 @@
 #include <asm/system.h>
 #include <asm/io.h>
 
-#define TRUE 1
-#define FALSE 0
-
 #ifndef PCI_DEVICE_ID_MATROX_G200_PCI 
 #define PCI_DEVICE_ID_MATROX_G200_PCI 0x0520
 #endif
@@ -318,7 +315,6 @@ static void mga_vid_frame_sel(mga_card_t
 	card->regs.besctl = (card->regs.besctl & ~0x07000000) + (frame << 25);
 	writel( card->regs.besctl, card->mmio_base + BESCTL ); 
 
-//	writel( card->regs.besglobctl + ((readl(card->mmio_base + VCOUNT)+2)<<16),
 	writel( card->regs.besglobctl + (MGA_VSYNC_POS<<16),
 			card->mmio_base + BESGLOBCTL);
 }
@@ -549,20 +545,6 @@ switch(config->format){
                     + (1<<16)   // chroma upsampling
                     + (1<<17)   // 4:2:0 mode
                     + (1<<18);  // dither enabled
-#if 0
-	if(card->card_type != MGA_G200)
-	{
-		//zoom disabled, zoom filter disabled, 420 3 plane format, proc amp
-		//disabled, rgb mode disabled 
-		card->regs.besglobctl = (1<<5);
-	}
-	else
-	{
-		//zoom disabled, zoom filter disabled, Cb samples in 0246, Cr
-		//in 1357, BES register update on besvcnt
-	        card->regs.besglobctl = 0;
-	}
-#endif
         break;
 
     case MGA_VID_FORMAT_YUY2:	
@@ -689,16 +671,6 @@ static int mga_vid_ioctl(struct inode *i
 	switch(cmd) 
 	{
 		case MGA_VID_CONFIG:
-			//FIXME remove
-//			printk(KERN_DEBUG "mga_vid: vcount = %d\n",readl(card->mmio_base + VCOUNT));
-#ifdef MP_DEBUG
-			printk(KERN_DEBUG "mga_vid: mmio_base = %p\n",card->mmio_base);
-			printk(KERN_DEBUG "mga_vid: mem_base = %08x\n",card->mem_base);
-			//FIXME remove
-
-			printk(KERN_DEBUG "mga_vid: Received configuration\n");
-#endif			
-
  			if(copy_from_user(&card->config,(mga_vid_config_t*) arg,sizeof(mga_vid_config_t)))
 			{
 				printk(KERN_ERR "mga_vid: failed copy from userspace\n");
@@ -901,7 +873,6 @@ static void mga_param_buff_fill( mga_car
     len += snprintf(&buf[len],size-len,PARAM_CONTRAST"%d\n",card->contrast);
     len += snprintf(&buf[len],size-len,PARAM_BLACKIE"%s\n",card->regs.blackie?"on":"off");
     card->param_buff_len = len;
-    // check boundaries of mga_param_buff before writing to it!!!
 }
 
 
@@ -1099,26 +1070,14 @@ static void cards_init(mga_card_t * card
 		    card->ram_size = 16;
 		}
 	    }else{
-		switch((card_option>>10)&0x17){
-//		    case 0x10:
-//		    case 0x13:  card->ram_size = 8; break;
-		    default: card->ram_size = 8;
+		    /* 
+		     * Don't do any autodetection on G200 cards
+		     * and force them to 8MB 
+		     */
+		    card->ram_size = 8;
 		}
 } 
 
-#if 0
-//	    printk("List resources -----------\n");
-	    for(int temp=0;temp<DEVICE_COUNT_RESOURCE;temp++){
-	        struct resource *res=&dev->resource[temp];
-	        if(res->flags){
-	          int size=(1+res->end-res->start)>>20;
-	          printk(KERN_DEBUG "res %d:  start: 0x%X   end: 0x%X  (%d MB) flags=0x%X\n",temp,res->start,res->end,size,res->flags);
-	          if(res->flags&(IORESOURCE_MEM|IORESOURCE_PREFETCH)){
-	              if(size>card->ram_size && size<=64) card->ram_size=size;
-	          }
-	        }
-	    }
-#endif
 	    printk(KERN_INFO "mga_vid: detected RAMSIZE is %d MB\n", (unsigned int) card->ram_size);
 #endif
         }



More information about the MPlayer-matrox mailing list